forked from ray-project/ray
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[air] Add annotation for Tune module. (ray-project#27060)
Co-authored-by: Kai Fricke <[email protected]> Signed-off-by: Stefan van der Kleij <[email protected]>
- Loading branch information
1 parent
8ba407f
commit 5f25a98
Showing
51 changed files
with
267 additions
and
273 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,12 @@ | ||
from functools import lru_cache | ||
import getpass | ||
import os | ||
|
||
|
||
@lru_cache() | ||
def is_ray_cluster(): | ||
def _is_ray_cluster(): | ||
"""Checks if the bootstrap config file exists. | ||
This will always exist if using an autoscaling cluster/started | ||
with the ray cluster launcher. | ||
""" | ||
return os.path.exists(os.path.expanduser("~/ray_bootstrap_config.yaml")) | ||
|
||
|
||
def get_ssh_user(): | ||
"""Returns ssh username for connecting to cluster workers.""" | ||
|
||
return getpass.getuser() | ||
|
||
|
||
def get_ssh_key(): | ||
"""Returns ssh key to connecting to cluster workers. | ||
If the env var TUNE_CLUSTER_SSH_KEY is provided, then this key | ||
will be used for syncing across different nodes. | ||
""" | ||
path = os.environ.get( | ||
"TUNE_CLUSTER_SSH_KEY", os.path.expanduser("~/ray_bootstrap_key.pem") | ||
) | ||
if os.path.exists(path): | ||
return path | ||
return None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
from ray.tune.experiment.experiment import Experiment, convert_to_experiment_list | ||
from ray.tune.experiment.experiment import Experiment, _convert_to_experiment_list | ||
from ray.tune.experiment.trial import Trial | ||
|
||
__all__ = ["Experiment", "convert_to_experiment_list", "Trial"] | ||
__all__ = ["Experiment", "_convert_to_experiment_list", "Trial"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.