Skip to content

Commit

Permalink
Fixes araffin#6 - Update multiprocessing notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
araffin committed Dec 24, 2019
1 parent dbf4e39 commit e6a4c36
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions 3_multiprocessing.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"!apt install swig cmake libopenmpi-dev zlib1g-dev\n",
"!pip install stable-baselines[mpi]==2.8.0\n",
"# Stable Baselines only supports tensorflow 1.x for now\n",
"%tensorflow_version 1.x"
"%tensorflow_version 1.x"
],
"execution_count": 0,
"outputs": []
Expand Down Expand Up @@ -208,7 +208,6 @@
" Utility function for multiprocessed env.\n",
" \n",
" :param env_id: (str) the environment ID\n",
" :param num_env: (int) the number of environment you wish to have in subprocesses\n",
" :param seed: (int) the inital seed for RNG\n",
" :param rank: (int) index of the subprocess\n",
" \"\"\"\n",
Expand Down Expand Up @@ -357,16 +356,17 @@
"source": [
"training_steps_per_second = [TRAIN_STEPS / t for t in training_times]\n",
"\n",
"plt.figure()\n",
"plt.subplot(1,2,1)\n",
"plt.figure(figsize=(9, 4))\n",
"plt.subplots_adjust(wspace=0.5)\n",
"plt.subplot(1, 2, 1)\n",
"plt.errorbar(PROCESSES_TO_TEST, reward_averages, yerr=reward_std, capsize=2)\n",
"plt.xlabel('Processes')\n",
"plt.ylabel('Average return')\n",
"plt.subplot(1,2,2)\n",
"plt.subplot(1, 2, 2)\n",
"plt.bar(range(len(PROCESSES_TO_TEST)), training_steps_per_second)\n",
"plt.xticks(range(len(PROCESSES_TO_TEST)),PROCESSES_TO_TEST)\n",
"plt.xticks(range(len(PROCESSES_TO_TEST)), PROCESSES_TO_TEST)\n",
"plt.xlabel('Processes')\n",
"plt.ylabel('Training steps per second')"
"_ = plt.ylabel('Training steps per second')"
],
"execution_count": 0,
"outputs": [
Expand Down

0 comments on commit e6a4c36

Please sign in to comment.