ray

ImportError: cannot import name 'Checkpoint' from 'ray.air'

ImportError: cannot import name 'Checkpoint' from 'ray.air' Question: I’m trying to follow this tutorial to tune hyperparameters in PyTorch using Ray, copy-pasted everything but I get the following error: ImportError: cannot import name ‘Checkpoint’ from ‘ray.air’ from this line of import: from ray.air import Checkpoint I installed ray using pip install -U "ray[tune]" as suggested …

Total answers: 1

Distributing a python function across multiple worker nodes

Distributing a python function across multiple worker nodes Question: I’m trying to understand what would be a good framework that integrates easily with existing python code and allows distributing a huge dataset across multiple worker nodes to perform some transformation or operation on it. The expectation is that each worker node should be assigned data …

Total answers: 2

Ray monitoring fails when binding to empty address

Ray monitoring fails when binding to empty address Question: I’m learning to use RLlib. I’ve been running it in my debugger on an example script, and it works, but for some reason I get an error message about the monitoring service failing. This is the traceback: File "/home/ramrachum/.venvs/ray_env/lib/python3.10/site-packages/ray/autoscaler/_private/monitor.py", line 600, in <module> monitor = Monitor( …

Total answers: 1

Ray | AttributeError: 'BroadModel' object has no attribute 'model'

Ray | AttributeError: 'BroadModel' object has no attribute 'model' Question: I am using ray tune to find to optimal hyperparameters value for this model: class BroadModel(tune.Trainable): os.environ[‘TF_CPP_MIN_LOG_LEVEL’] = ‘3’ def build_model(self, config): global convB2, drop2, convA2, poolA, poolB window_size = 200 self.x_gyro, self.x_acc, x_mag, q = load_data_train() self.Att_quat = Att_q(q) self.x_gyro_t, self.x_acc_t, x_mag_t, q_t = …

Total answers: 2

Pytorch and ray tune: why the error; raise TuneError("Trials did not complete", incomplete_trials)?

Pytorch and ray tune: why the error; raise TuneError("Trials did not complete", incomplete_trials)? Question: I want to embed hyperparameter optimisation with ray into my pytorch script. I wrote this code (which is a reproducible example): ## Standard libraries CHECKPOINT_PATH = "/home/ad1/new_dev_v1" DATASET_PATH = "/home/ad1/" import torch device = torch.device("cuda:0") if torch.cuda.is_available() else torch.device("cpu") from importlib …

Total answers: 3

How do dependencies get to a Ray cluster?

How do dependencies get to a Ray cluster? Question: I’m trying to figure out whether Ray will work for an application, and I’m trying to understand how dependencies get to the workers in a Ray cluster. Ex: let’s say I have @ray.remote def foo(): a = do_something_requiring_pandas() b = do_something_requiring_openmpi() return a + b How …

Total answers: 1

rllib use custom registered environments

rllib use custom registered environments Question: Rllib docs provide some information about how to create and train a custom environment. There is some information about registering that environment, but I guess it needs to work differently than gym registration. I’m testing this out working with the SimpleCorridor environment. If I add the registration code to …

Total answers: 2

Cannot install RAY

Cannot install RAY Question: Ray library from RISE lab (https://rise.cs.berkeley.edu/blog/pandas-on-ray/) I am using Windows 10 Pro, 64-bit and running these scripts from Anaconda prompt. I have tried both pip install ray and pip3 install ray with the same result Collecting ray Could not find a version that satisfies the requirement ray (from versions: ) No …

Total answers: 3