kengz / SLM-Lab

Modular Deep Reinforcement Learning framework in PyTorch. Companion library of the book "Foundations of Deep Reinforcement Learning".
https://slm-lab.gitbook.io/slm-lab/
MIT License
1.23k stars 263 forks source link

Book branch problem, need your help #492

Open JuliusMa opened 2 years ago

JuliusMa commented 2 years ago

Describe the bug In the SLM_Lab-book branch,I run the reinfoce-cartpolp with search mode.There is a exception coming out . It happened on the search.py when worked on the line of 129 which is"for ray_trial in ray_trials"

To Reproduce

  1. windows os
  2. on the book branch

Error logs

_<class 'ray.tune.analysis.experiment_analysis.ExperimentAnalysis'> Traceback (most recent call last): File "D:/PythonProject/SLM-Lab-book/run_lab.py", line 99, in main() File "D:/PythonProject/SLM-Lab-book/run_lab.py", line 91, in main get_spec_and_run(*args) File "D:/PythonProject/SLM-Lab-book/run_lab.py", line 75, in get_spec_and_run run_spec(spec, lab_mode) File "D:/PythonProject/SLM-Lab-book/run_lab.py", line 55, in run_spec Experiment(spec).run() File "D:\PythonProject\SLM-Lab-book\slm_lab\experiment\control.py", line 204, in run trial_data_dict = search.run_ray_search(self.spec) File "D:\PythonProject\SLM-Lab-book\slm_lab\experiment\search.py", line 130, in run_ray_search for ray_trial in raytrials: TypeError: 'ExperimentAnalysis' object is not iterable

problem

kengz commented 2 years ago

Hi sorry we don't officially support windows. But there's a guide made by a user for windows could you please try with that and see? https://slm-lab.gitbook.io/slm-lab/setup/installation

kengz commented 2 years ago

On second look, looks like you're running in a bash shell. I suspect this is due to the version of ray. Could you share the output of:

conda activate lab
conda list