-
Notifications
You must be signed in to change notification settings - Fork 45
Support passing runtime envs to explorer and trainer #446
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -494,13 +494,14 @@ async def serve(self) -> None: | |
| self.service.set_latest_model_version(step_num) | ||
|
|
||
| @classmethod | ||
| def get_actor(cls, config: Config): | ||
| def get_actor(cls, config: Config, runtime_env: Optional[dict] = None): | ||
| """Get a Ray actor for the explorer.""" | ||
| return ( | ||
| ray.remote(cls) | ||
| .options( | ||
| name=config.explorer.name, | ||
| namespace=ray.get_runtime_context().namespace, | ||
| runtime_env=runtime_env, | ||
| ) | ||
| .remote(config) | ||
| ) | ||
|
Comment on lines
+497
to
507
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The change to support |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,7 +8,7 @@ | |
| import time | ||
| import traceback | ||
| from abc import ABC, abstractmethod | ||
| from typing import Dict, List, Tuple | ||
| from typing import Dict, List, Optional, Tuple | ||
|
|
||
| import pandas as pd | ||
| import ray | ||
|
|
@@ -216,11 +216,15 @@ async def is_alive(self) -> bool: | |
| return True | ||
|
|
||
| @classmethod | ||
| def get_actor(cls, config: Config): | ||
| def get_actor(cls, config: Config, runtime_env: Optional[dict] = None): | ||
pan-x-c marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| """Get a Ray actor for the trainer.""" | ||
| return ( | ||
| ray.remote(cls) | ||
| .options(name=config.trainer.name, namespace=ray.get_runtime_context().namespace) | ||
| .options( | ||
| name=config.trainer.name, | ||
| namespace=ray.get_runtime_context().namespace, | ||
| runtime_env=runtime_env, | ||
| ) | ||
| .remote(config) | ||
| ) | ||
|
Comment on lines
+219
to
229
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.