Skip to content

workaround for pickle problem - #74

Open
albertz wants to merge 1 commit into
masterfrom
albert-job-pickle-problem-fix
Open

workaround for pickle problem#74
albertz wants to merge 1 commit into
masterfrom
albert-job-pickle-problem-fix

Conversation

@albertz

@albertz albertz commented Feb 22, 2022

Copy link
Copy Markdown
Member

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

@JackTemaki JackTemaki left a comment

Copy link
Copy Markdown
Contributor

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

critias commented Feb 23, 2022

Copy link
Copy Markdown
Contributor

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