3_multiprocessing.ipynb: unused param in docstring and plot space
rbahumi opened this issue · 1 comments
First, I just want to say thank you very much for these notebooks they are very helpful!
Second, I have two small comments regarding the 3rd notebook, sorry if they are annoying...
- In the make_env() function there is unused param 'num_env' in the docstring
- The plots are overlapping, and the last line output is printed to the screen:
Adding the following matplotlib configs and capturing the last output with an underscore fixes the issue:
plt.figure(figsize=(9, 4))
plt.subplots_adjust(wspace=0.5)
.....
_ = plt.ylabel('Training steps per second')
Full code example:
training_steps_per_second = [s / t for s,t in zip(steps_per_experiment, training_times)]
plt.figure(figsize=(9, 4))
plt.subplots_adjust(wspace=0.5)
plt.subplot(1,2,1)
plt.errorbar(PROCESSES_TO_TEST, reward_averages, yerr=reward_std, capsize=2, c='k', marker='o')
plt.xlabel('Processes')
plt.ylabel('Average return')
plt.subplot(1,2,2)
plt.bar(range(len(PROCESSES_TO_TEST)), training_steps_per_second)
plt.xticks(range(len(PROCESSES_TO_TEST)),PROCESSES_TO_TEST)
plt.xlabel('Processes')
_ = plt.ylabel('Training steps per second')
Hello,
Thanks again for the remarks, I will fix that soon ;)
In the make_env() function there is unused param 'num_env' in the docstring
Oops... I think I wanted to write something like the make_vec_env
that is now available in the v2.9.0 version. I should also update the evaluate_policy
and the check_env
.
The plots are overlapping, and the last line output is printed to the screen:
Thanks for the fixes. You will be credited in the README ;)