jhejna / few-shot-preference-rl

MIT License
27 stars 4 forks source link

"Invalid space provided" #5

Open Daivd093 opened 9 months ago

Daivd093 commented 9 months ago

I'm trying to reproduce the results of the paper, but as a local job instead of using SLURM. But when I'm trying to do the pretraining it gives me:

[research] Replay Buffer not distributed. Alloc-ing in __init__

Followed by this message:

File "/home/ml2022/David/few-shot-preference-rl/research/utils/utils.py", line 210, in np_dataset_alloc
raise ValueError("Invalid space provided")  # ValueError: Invalid space provided

The input I'm trying to give to the script is as follows:

python tools/run_local.py --entry-point scripts/metaworld/collect_policy_dataset.py --cpus 8 --gpus 1 --valid-gpus 1 --arguments benchmark=ml10 tasks-per-env=25 cross-env-ep=10 within-env-ep=25 expert-ep=15 random-ep=2 epsilon=0.1 num-workers=10 noise-type=gaussian path=datasets/mw

What should I do in order to get the local job to work? Is there something wrong with the input parameters?

JennyLiu0716 commented 2 months ago

same issue

JennyLiu0716 commented 2 months ago

I checked the type of space, it is gymnasium.spaces.box.Box. I suppose this should be similar to gym.spaces.Box, so I just modified a little bit to avoid the asserted error.

jhejna commented 2 months ago

Hi!

I'm not 100% sure what this issue is. However, note that the code was developed 3+ yrs ago, and so was intended for gym==0.23.1 not gymnasium and development on ubuntu. This error seems to be a result of not having the correct dependencies.

Let me know if that fixes the issue!