GAIL-4-BARK / bark-ml

Machine Learning Applied to Autonomous Driving
MIT License
0 stars 0 forks source link

Ferenc torok/jupyter notebook training and visualization #57

Closed ferenctorok closed 4 years ago

ferenctorok commented 4 years ago

training and visualization demonstration is added to docs/report/gail.ipynb. Also, the required files, like expert trajectories and the pretrained agent checkpoints are also added.

marcelbrucker commented 4 years ago

The directory ./docs/report/data/expert_trajectories you specify in the gail_param.json file does not exist. This causes an error. Can you add it in your next commit?


ValueError Traceback (most recent call last)

in 33 params["ML"]["GAILRunner"]["tf2rl"]["expert_path_dir"], 34 normalize_features=params["ML"]["Settings"]["NormalizeFeatures"], ---> 35 env=env # the unwrapped env has to be used, since that contains the unnormalized spaces. 36 ) 37 /private/var/tmp/_bazel_Marcel/91a07cff622db1938472a1924f8cfd53/execroot/bark_ml/bazel-out/darwin-fastbuild/bin/docs/report/run.runfiles/bark_ml/bark_ml/library_wrappers/lib_tf2rl/load_expert_trajectories.py in load_expert_trajectories(dirname, normalize_features, env) 19 dict: The expert trajectories in tf2rl format: {'obs': [], 'next_obs': [], 'act': []} 20 """ ---> 21 joblib_files = list_files_in_dir(os.path.expanduser(dirname), file_ending='.jblb') 22 expert_trajectories = load_trajectories(joblib_files) 23 /private/var/tmp/_bazel_Marcel/91a07cff622db1938472a1924f8cfd53/execroot/bark_ml/bazel-out/darwin-fastbuild/bin/docs/report/run.runfiles/bark_ml/bark_ml/library_wrappers/lib_tf2rl/load_save_utils.py in list_files_in_dir(dir_path, file_ending) 15 """ 16 if not os.path.isdir(dir_path): ---> 17 raise ValueError(f'Cannot list files in {dir_path}. Not a directory.') 18 files = [f for f in os.listdir( 19 dir_path) if os.path.isfile(os.path.join(dir_path, f))] ValueError: Cannot list files in data/expert_trajectories. Not a directory.
ferenctorok commented 4 years ago

Thanks, fixed it!