Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

workaround for pickle problem #74

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

albertz
Copy link
Member

@albertz albertz commented Feb 22, 2022

I got the strange error:

AttributeError: 'BeamSearchJob' object has no attribute '_sis_alias_prefixes'

When running a job called OldToNewTranscriptions, which (indirectly only) depends on some output of BeamSearchJob.

Full error: https://gist.github.com/albertz/cb04e53879d43734e9f3fb62b4e09da1

Job code: https://gist.github.com/albertz/8429f7ad06bf32832b7c6ff227598982

The error occurred during unpickling. While debugging, I noticed that it would go into the if sis_id in created_jobs code branch and it had an empty object (_sis_init was never called). So extending the check to if sis_id in created_jobs and vars(created_jobs[sis_id]) fixed the problem for me.

I have not fully unterstand the real issue here and I'm not sure this is the best fix. But anyway.

@albertz albertz requested a review from JackTemaki February 22, 2022 13:21
@JackTemaki JackTemaki requested a review from critias February 22, 2022 13:24
Copy link
Contributor

@JackTemaki JackTemaki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The vars should never be empty if everything is normal, so this fix is okay for me.

@critias
Copy link
Contributor

critias commented Feb 23, 2022

Looking at your fix my guess is that there is some circular dependency and your fix now creates a second job.
I can't reproduce the problem, to verify this guess. Pickle and load works fine for me with your given job definition. Could you send me the pkl file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants