danijar / dreamerv2

Mastering Atari with Discrete World Models
https://danijar.com/dreamerv2
MIT License
898 stars 195 forks source link

Plot.py not working properly #34

Closed lcdbezerra closed 2 years ago

lcdbezerra commented 2 years ago

When running python3 common/plot.py --indir ~/logdir/exp --outdir ~/plots --xaxis step --yaxis eval_return --bins 1e6 I get:

NotADirectoryError: [Errno 20] Not a directory: '/home/USER/logdir/exp/variables.pkl'

It seems that the code is treating files as folders. If I make --indir ~/logdir instead (one level up) I get:

Traceback (most recent call last):
  File "/home/USER/code/dreamerv2/dreamerv2/common/plot.py", line 571, in <module>
    main(parse_args())
  File "/home/USER/code/dreamerv2/dreamerv2/common/plot.py", line 482, in main
    runs = load_runs(args)
  File "/home/USER/code/dreamerv2/dreamerv2/common/plot.py", line 72, in load_runs
    task, method, seed = filename.relative_to(indir).parts[:-1]
ValueError: not enough values to unpack (expected 3, got 1)

I ran training with: python dreamerv2/train.py --logdir ~/logdir/exp --configs dmc_vision --task dmc_walker_walk

Packages:

python=3.9.12

danijar commented 2 years ago

It expects better subdirs for task, method, and seed inside the logdir.