Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running raylab experiment crashes #134

Open
danielpalen opened this issue Nov 20, 2020 · 1 comment
Open

Running raylab experiment crashes #134

danielpalen opened this issue Nov 20, 2020 · 1 comment

Comments

@danielpalen
Copy link

  • raylab version: 0.14.14
  • Python version: 3.7.9
  • Operating System: Ubuntu 18.04.5 LTS

When running raylab experiment "PG" --config examples/PG/cartpole_defaults.py I get the following error:

Traceback (most recent call last):
  File "/home/palenicek/miniconda3/envs/raylab_test/bin/raylab", line 8, in <module>
    sys.exit(raylab())
  File "/home/palenicek/miniconda3/envs/raylab_test/lib/python3.7/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/palenicek/miniconda3/envs/raylab_test/lib/python3.7/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/palenicek/miniconda3/envs/raylab_test/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/palenicek/miniconda3/envs/raylab_test/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/palenicek/miniconda3/envs/raylab_test/lib/python3.7/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/palenicek/miniconda3/envs/raylab_test/lib/python3.7/site-packages/raylab/cli/utils.py", line 164, in wrapped
    return func(*args, tune_kwargs=tune_kwargs, **kwargs)
  File "/home/palenicek/miniconda3/envs/raylab_test/lib/python3.7/site-packages/raylab/cli/utils.py", line 19, in wrapped
    return func(*args, **kwargs)
  File "/home/palenicek/miniconda3/envs/raylab_test/lib/python3.7/site-packages/click/decorators.py", line 21, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/palenicek/miniconda3/envs/raylab_test/lib/python3.7/site-packages/raylab/cli/utils.py", line 51, in wrapped
    process_tune_kwargs(ctx, **tune_kwargs)
  File "/home/palenicek/miniconda3/envs/raylab_test/lib/python3.7/site-packages/raylab/cli/utils.py", line 172, in process_tune_kwargs
    delete_if_necessary(ctx, osp.join(local_dir, name))
  File "/home/palenicek/miniconda3/envs/raylab_test/lib/python3.7/posixpath.py", line 94, in join
    genericpath._check_arg_types('join', a, *p)
  File "/home/palenicek/miniconda3/envs/raylab_test/lib/python3.7/genericpath.py", line 153, in _check_arg_types
    (funcname, s.__class__.__name__)) from None
TypeError: join() argument must be str or bytes, not 'NoneType'

I tried installing ray lab both using pip, as well as from source master and the last stable release version 0.10.0. I always get this error.

I am not sure, what the problem is. From the documentation I am also not 100% sure on how raylab should be used. I tried running the cli commands, as well as the /example files directly. All of which gave me the above error.

Any ideas on how to fix this issue?

@0xangelo
Copy link
Owner

Hi Daniel and sorry for the late reply.

I believe this error is due to missing the --name parameter in the raylab experiment command (I forgot to set this as a required parameter via click). Moreover, examples/PG/cartpole_defaults.py uses a deprecated rllib config, use_pytorch, which may give an error in newer versions of ray.

I successfully ran the following on a fresh virtual environment after installing raylab==0.14.4, ray==0.8.7, and gym-cartpole-swingup==0.1.0:

raylab experiment PG --config cartpole_defaults.py --name PG

where I substituted "framework": "torch" for "use_pytorch": True.

I'll fix these two issues (the required name parameter and deprecated config key) as soon as possible. Thanks for submitting the issue!

I also apologize for not expanding upon the documentation on how to use raylab. The project is on hold for now as I finish my MSc degree and I'll try to give it a bit of polish after that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants