-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Closed
Labels
docsAn issue or change related to documentationAn issue or change related to documentationtriageNeeds triage (eg: priority, bug/not-bug, and owning component)Needs triage (eg: priority, bug/not-bug, and owning component)
Description
Description
The PyTorch + Ray Train code located in group-tab:: PyTorch + Ray Train can't run successful because missing import the ray module.
2023-11-21 02:38:49,607 ERROR tune.py:1139 -- Trials did not complete: [TorchTrainer_21974_00000]
ray.exceptions.RayTaskError(NameError): [36mray::_Inner.train() [39m (pid=12332, ip=x.x.x.x, actor_id=ea59b6fd5af4141ec9bd37a50a000000, repr=TorchTrainer)
File "/home/ray/anaconda3/lib/python3.8/site-packages/ray/tune/trainable/trainable.py", line 400, in train
raise skipped from exception_cause(skipped)
File "/home/ray/anaconda3/lib/python3.8/site-packages/ray/train/_internal/utils.py", line 54, in check_for_failure
ray.get(object_ref)
ray.exceptions.RayTaskError(NameError): [36mray::_RayTrainWorker__execute.get_next() [39m (pid=12422, ip=x.x.x.x, actor_id=cd089a5e2962e8711458f0800a000000, repr=<ray.train._internal.worker_group.RayTrainWorker object at 0x7f0bdc662f70>)
File "/home/ray/anaconda3/lib/python3.8/site-packages/ray/train/_internal/worker_group.py", line 33, in __execute
raise skipped from exception_cause(skipped)
File "/home/ray/anaconda3/lib/python3.8/site-packages/ray/train/_internal/utils.py", line 129, in discard_return_wrapper
train_func(*args, **kwargs)
File "ray_train_pytorch_script.py", line 18, in train_func
model = ray.train.torch.prepare_model(model)
NameError: name 'ray' is not defined
Link
https://docs.ray.io/en/latest/train/getting-started-pytorch.html#quickstart
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
docsAn issue or change related to documentationAn issue or change related to documentationtriageNeeds triage (eg: priority, bug/not-bug, and owning component)Needs triage (eg: priority, bug/not-bug, and owning component)