Ray sgd get_model error


I am running this example code on CPU on baremetal machine:

I get the error:

Traceback (most recent call last):
File “ray_sgd_example_code.py”, line 146, in
train_example(num_workers=args.num_workers, use_gpu=args.use_gpu)
File “ray_sgd_example_code.py”, line 97, in train_example
m = trainer1.get_model(to_cpu=ray.util.client.ray.is_connected())
TypeError: get_model() got an unexpected keyword argument ‘to_cpu’

$ ray --version
ray, version 1.3.0

Can you please help

I had to comment out this line from the example to make it run on CPU:

#m = trainer1.get_model(to_cpu=ray.util.client.ray.is_connected())

cc @amogkam could you help him?

Hey @asm582 if you’re using Ray 1.3 can you make sure to use the examples in the releases/1.3.0 branch.

If you want to use the examples on master branch, they will work if you upgrade to the nightly Ray.

Thank you @amogkam , I was indeed running examples from the master branch and it seems like they are not backward complatible.