-
Notifications
You must be signed in to change notification settings - Fork 25
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
store worker wrapper in Job #184
Conversation
It just crossed my mind that the worker_wrapper does not go in the hash creation. So that could potentially mean that if you want to run the same setup with two different images that this would break, right? |
You could just put the image in the constructor, store it somewhere e.g. Thinking about this, maybe it would be better create a class method e.g. |
correct. nothing that is defined in the global_settings does.
I would say "not work" as opposed to "break". You cannot do this in a single sisyphus experiment folder, as the first time you create a Job the worker_wrapper is stored and any further time the Job is "created" the old instance with the old worker wrapper is returned. Running the same setup multiple times with different worker_wrappers was also never the point of my implementation. I wanted a subset of Jobs in my graph to use different worker wrappers.
that would necessitate to touch all existing Job implementations to add such a constructor or overwrite the default method. Now let me disembark on a little rant here, that I - in principle - dislike that global_settings stop being settings that are applied globally. But it is already used this way when different configs set different
And I cannot deny the huge convenience boost of writing
instead of finding and iterating over all Jobs of the subgraph and manually modifying their Therefore the idea would be to enable a similar behavior also for the worker_wrapper.
I would love to have a cleaner interface. The nicest interface that I would imagine would involve a function |
I misunderstood how you planed to use it. I thought you planed to overwrite I totally agree to your rant and some times really regret to ever create Anyway, this ship has probably sailed a while ago and |
So, do I get an approval now? :D |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright :)
In on of our setups we wanted to use different worker wrapper functions for different parts of the setup.
Therefore I propose to store the currently defined
gs.worker_wrapper
at the creation time of the Job in the Job. Then different parts of the setup can change the worker_wrapper as they go.