DeprecationWarning
Started a local Ray instance. View the dashboard at http://127.0.0.1:8265
2024-01-26 18:46:32,146 INFO tune.py:220 -- Initializing Ray automatically. For cluster usage or custom Ray initialization, call ray.init(...) before tune.run(...).
2024-01-26 18:46:32,149 INFO tune.py:592 -- [output] This will use the new output engine with verbosity 2. To disable the new output and use the legacy output engine, set the environment variable RAY_AIR_NEW_OUTPUT=0. For more information, please see https://github.com/ray-project/ray/issues/36949
Traceback (most recent call last):
File "src/models/train_model.py", line 124, in ray.init(...) before tune.run(...).
2024-01-26 18:57:02,408 INFO tune.py:592 -- [output] This will use the new output engine with verbosity 2. To disable the new output and use the legacy output engine, set the environment variable RAY_AIR_NEW_OUTPUT=0. For more information, please see https://github.com/ray-project/ray/issues/36949
Traceback (most recent call last):
File "src/models/train_model.py", line 124, in checkpoint_dir argument in your training function is deprecated.
Please use ray.train.get_checkpoint() to access your checkpoint as a
ray.train.Checkpoint object instead. See below for an example:
Before
from ray import tune
def train_fn(config, checkpoint_dir=None): if checkpoint_dir: torch.load(os.path.join(checkpoint_dir, "checkpoint.pt")) ...
tuner = tune.Tuner(train_fn) tuner.fit()
After
from ray import train, tune
def train_fn(config): checkpoint: train.Checkpoint = train.get_checkpoint() if checkpoint: with checkpoint.as_directory() as checkpoint_dir: torch.load(os.path.join(checkpoint_dir, "checkpoint.pt")) ...
tuner = tune.Tuner(train_fn) tuner.fit()