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

WIP: worker environments #505

Closed
wants to merge 6 commits into from
Closed

WIP: worker environments #505

wants to merge 6 commits into from

Conversation

jcrist
Copy link
Member

@jcrist jcrist commented Sep 9, 2016

Todo:

  • Client.register_environment updates state on scheduler and workers
  • environment state updated when workers are added
  • environment state updated when workers are removed
  • tests for managing environment state
  • scheduler takes environments into account when assigning tasks
  • Client.submit can take environment names in workers=
  • Tests for scheduling with environments

- Returns set of workers that fit the names/hosts/environments provided
- Now works with environment names as well
- Used most places where `self.coerce_address` was used before.
workers.extend([host + ':' + port
for port in self.host_info[host]['ports']])
# TODO replace with worker_list
workers = self.workers_set(workers)
Copy link
Member

Choose a reason for hiding this comment

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

Hooray!

@@ -1091,6 +1092,28 @@ def get_dataset(self, name):
return sync(self.loop, self._get_dataset, tokey(name))

@gen.coroutine
def _register_environment(self, name, env):
if not isinstance(env, Environment):
env = Environment(condition=env)
Copy link
Member

Choose a reason for hiding this comment

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

we could also do this with keyword arguments, like the following:

def register_environment(self, name, environment=None, condition=None):
    ...

@mrocklin
Copy link
Member

Considering names for a moment. I'm colliding a bit here with the recent conda work that allows the client to upload conda environments for all of the workers to restart themselves in. This feature is unpublished and so can be easily renamed, but the current name is upload_environment. We'll need to change one or both terms.

Thoughts on names for either of the two concepts currently called environments?

@mrocklin
Copy link
Member

This PR has gone stale. Closing for now.

@mrocklin mrocklin closed this Apr 15, 2019
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.

None yet

2 participants