diff --git a/week01_intro/crossentropy_method.ipynb b/week01_intro/crossentropy_method.ipynb index 2e0daf44c..7f3b39d4e 100644 --- a/week01_intro/crossentropy_method.ipynb +++ b/week01_intro/crossentropy_method.ipynb @@ -22,7 +22,7 @@ "import os\n", "if type(os.environ.get(\"DISPLAY\")) is not str or len(os.environ.get(\"DISPLAY\")) == 0:\n", " !bash ../xvfb start\n", - " %env DISPLAY = : 1" + " os.environ['DISPLAY'] = ':1'" ] }, { diff --git a/week01_intro/deep_crossentropy_method.ipynb b/week01_intro/deep_crossentropy_method.ipynb index a5c3e1bce..c490ee0ad 100644 --- a/week01_intro/deep_crossentropy_method.ipynb +++ b/week01_intro/deep_crossentropy_method.ipynb @@ -25,7 +25,7 @@ "import os\n", "if type(os.environ.get(\"DISPLAY\")) is not str or len(os.environ.get(\"DISPLAY\")) == 0:\n", " !bash ../xvfb start\n", - " %env DISPLAY = : 1" + " os.environ['DISPLAY'] = ':1'" ] }, { diff --git a/week01_intro/seminar_gym_interface.ipynb b/week01_intro/seminar_gym_interface.ipynb index 1ba5d6df2..e38645a75 100644 --- a/week01_intro/seminar_gym_interface.ipynb +++ b/week01_intro/seminar_gym_interface.ipynb @@ -18,7 +18,7 @@ "import os\n", "if type(os.environ.get(\"DISPLAY\")) is not str or len(os.environ.get(\"DISPLAY\")) == 0:\n", " !bash ../xvfb start\n", - " %env DISPLAY = : 1" + " os.environ['DISPLAY'] = ':1'" ] }, { diff --git a/week03_model_free/homework.ipynb b/week03_model_free/homework.ipynb index 13c6221a6..23894ae92 100644 --- a/week03_model_free/homework.ipynb +++ b/week03_model_free/homework.ipynb @@ -39,7 +39,7 @@ "import os\n", "if type(os.environ.get(\"DISPLAY\")) is not str or len(os.environ.get(\"DISPLAY\")) == 0:\n", " !bash ../xvfb start\n", - " %env DISPLAY = : 1\n", + " os.environ['DISPLAY'] = ':1'\n", "\n", "import numpy as np\n", "import matplotlib.pyplot as plt\n", @@ -428,7 +428,7 @@ "import os\n", "if type(os.environ.get(\"DISPLAY\")) is not str or len(os.environ.get(\"DISPLAY\")) == 0:\n", " !bash ../xvfb start\n", - " %env DISPLAY = : 1\n", + " os.environ['DISPLAY'] = ':1'\n", "\n", "%load_ext autoreload\n", "%autoreload 2\n", diff --git a/week03_model_free/seminar_qlearning.ipynb b/week03_model_free/seminar_qlearning.ipynb index 40201444b..01bb2addf 100644 --- a/week03_model_free/seminar_qlearning.ipynb +++ b/week03_model_free/seminar_qlearning.ipynb @@ -26,7 +26,7 @@ "import os\n", "if type(os.environ.get(\"DISPLAY\")) is not str or len(os.environ.get(\"DISPLAY\")) == 0:\n", " !bash ../xvfb start\n", - " %env DISPLAY = : 1\n", + " os.environ['DISPLAY'] = ':1'\n", "\n", "import numpy as np\n", "import matplotlib.pyplot as plt\n", diff --git a/week04_approx_rl/homework_lasagne.ipynb b/week04_approx_rl/homework_lasagne.ipynb index f3334f096..916817922 100644 --- a/week04_approx_rl/homework_lasagne.ipynb +++ b/week04_approx_rl/homework_lasagne.ipynb @@ -38,7 +38,7 @@ "\n", " !bash ../xvfb start", "\n", - " %env DISPLAY = : 1" + " os.environ['DISPLAY'] = ':1'" ] }, { diff --git a/week04_approx_rl/homework_pytorch_debug.ipynb b/week04_approx_rl/homework_pytorch_debug.ipynb index f106fc63f..e34bb70d8 100644 --- a/week04_approx_rl/homework_pytorch_debug.ipynb +++ b/week04_approx_rl/homework_pytorch_debug.ipynb @@ -53,7 +53,7 @@ "import os\n", "if type(os.environ.get(\"DISPLAY\")) is not str or len(os.environ.get(\"DISPLAY\")) == 0:\n", " !bash ../xvfb start\n", - " %env DISPLAY = : 1" + " os.environ['DISPLAY'] = ':1'" ] }, { diff --git a/week04_approx_rl/homework_pytorch_main.ipynb b/week04_approx_rl/homework_pytorch_main.ipynb index 6bdc0958e..b1562d625 100644 --- a/week04_approx_rl/homework_pytorch_main.ipynb +++ b/week04_approx_rl/homework_pytorch_main.ipynb @@ -53,7 +53,7 @@ "import os\n", "if type(os.environ.get(\"DISPLAY\")) is not str or len(os.environ.get(\"DISPLAY\")) == 0:\n", " !bash ../xvfb start\n", - " %env DISPLAY = : 1" + " os.environ['DISPLAY'] = ':1'" ] }, { diff --git a/week04_approx_rl/homework_tf.ipynb b/week04_approx_rl/homework_tf.ipynb index a7b812eeb..1e6b87c80 100644 --- a/week04_approx_rl/homework_tf.ipynb +++ b/week04_approx_rl/homework_tf.ipynb @@ -23,7 +23,7 @@ "\n", " !bash ../xvfb start", "\n", - " %env DISPLAY = : 1" + " os.environ['DISPLAY'] = ':1'" ] }, { diff --git a/week04_approx_rl/seminar_lasagne.ipynb b/week04_approx_rl/seminar_lasagne.ipynb index e7e68c2f5..ad632d0ab 100644 --- a/week04_approx_rl/seminar_lasagne.ipynb +++ b/week04_approx_rl/seminar_lasagne.ipynb @@ -30,7 +30,7 @@ "\n", " !bash ../xvfb start", "\n", - " %env DISPLAY = : 1" + " os.environ['DISPLAY'] = ':1'" ] }, { diff --git a/week04_approx_rl/seminar_pytorch.ipynb b/week04_approx_rl/seminar_pytorch.ipynb index 38b357376..db2142bcb 100644 --- a/week04_approx_rl/seminar_pytorch.ipynb +++ b/week04_approx_rl/seminar_pytorch.ipynb @@ -28,7 +28,7 @@ "import os\n", "if type(os.environ.get(\"DISPLAY\")) is not str or len(os.environ.get(\"DISPLAY\")) == 0:\n", " !bash ../xvfb start\n", - " %env DISPLAY = : 1" + " os.environ['DISPLAY'] = ':1'" ] }, { diff --git a/week04_approx_rl/seminar_tf.ipynb b/week04_approx_rl/seminar_tf.ipynb index 837a46053..4ac75b7ca 100644 --- a/week04_approx_rl/seminar_tf.ipynb +++ b/week04_approx_rl/seminar_tf.ipynb @@ -26,7 +26,7 @@ "import os\n", "if type(os.environ.get(\"DISPLAY\")) is not str or len(os.environ.get(\"DISPLAY\"))==0:\n", " !bash ../xvfb start\n", - " %env DISPLAY=:1" + " os.environ['DISPLAY'] = ':1'" ] }, { diff --git a/week06_policy_based/a2c-optional.ipynb b/week06_policy_based/a2c-optional.ipynb index c3cebdd7d..c31029ae3 100644 --- a/week06_policy_based/a2c-optional.ipynb +++ b/week06_policy_based/a2c-optional.ipynb @@ -23,7 +23,7 @@ "import os\n", "if type(os.environ.get(\"DISPLAY\")) is not str or len(os.environ.get(\"DISPLAY\")) == 0:\n", " !bash ../xvfb start\n", - " %env DISPLAY = : 1" + " os.environ['DISPLAY'] = ':1'" ] }, { diff --git a/week06_policy_based/reinforce_lasagne.ipynb b/week06_policy_based/reinforce_lasagne.ipynb index a49aa29ee..d0dad65a1 100644 --- a/week06_policy_based/reinforce_lasagne.ipynb +++ b/week06_policy_based/reinforce_lasagne.ipynb @@ -40,7 +40,7 @@ "\n", " !bash ../xvfb start", "\n", - " %env DISPLAY = : 1" + " os.environ['DISPLAY'] = ':1'" ] }, { diff --git a/week06_policy_based/reinforce_pytorch.ipynb b/week06_policy_based/reinforce_pytorch.ipynb index c2c9660cc..e705b86ff 100644 --- a/week06_policy_based/reinforce_pytorch.ipynb +++ b/week06_policy_based/reinforce_pytorch.ipynb @@ -34,7 +34,7 @@ "import os\n", "if type(os.environ.get(\"DISPLAY\")) is not str or len(os.environ.get(\"DISPLAY\")) == 0:\n", " !bash ../xvfb start\n", - " %env DISPLAY = : 1" + " os.environ['DISPLAY'] = ':1'" ] }, { diff --git a/week06_policy_based/reinforce_tensorflow.ipynb b/week06_policy_based/reinforce_tensorflow.ipynb index 0578857cf..c46aaaacf 100644 --- a/week06_policy_based/reinforce_tensorflow.ipynb +++ b/week06_policy_based/reinforce_tensorflow.ipynb @@ -19,11 +19,10 @@ "metadata": {}, "outputs": [], "source": [ - "%env THEANO_FLAGS = 'floatX=float32'\n", "import os\n", "if type(os.environ.get(\"DISPLAY\")) is not str or len(os.environ.get(\"DISPLAY\")) == 0:\n", " !bash ../xvfb start\n", - " %env DISPLAY = : 1" + " os.environ['DISPLAY'] = ':1'" ] }, { diff --git a/week08_pomdp/practice_pytorch.ipynb b/week08_pomdp/practice_pytorch.ipynb index 4e390f9a0..3aa2ed99d 100644 --- a/week08_pomdp/practice_pytorch.ipynb +++ b/week08_pomdp/practice_pytorch.ipynb @@ -21,7 +21,7 @@ "import os\n", "if type(os.environ.get(\"DISPLAY\")) is not str or len(os.environ.get(\"DISPLAY\")) == 0:\n", " !bash ../xvfb start\n", - " %env DISPLAY = : 1" + " os.environ['DISPLAY'] = ':1'" ] }, { diff --git a/week08_pomdp/practice_tensorflow.ipynb b/week08_pomdp/practice_tensorflow.ipynb index d7e9a6839..198e71162 100644 --- a/week08_pomdp/practice_tensorflow.ipynb +++ b/week08_pomdp/practice_tensorflow.ipynb @@ -36,7 +36,7 @@ "\n", " !bash ../xvfb start", "\n", - " %env DISPLAY = : 1" + " os.environ['DISPLAY'] = ':1'" ] }, { diff --git a/week08_pomdp/practice_theano.ipynb b/week08_pomdp/practice_theano.ipynb index 85a5c88e4..21cae474f 100644 --- a/week08_pomdp/practice_theano.ipynb +++ b/week08_pomdp/practice_theano.ipynb @@ -25,7 +25,7 @@ "\n", " !bash ../xvfb start", "\n", - " %env DISPLAY = : 1" + " os.environ['DISPLAY'] = ':1'" ] }, { diff --git a/week09_policy_II/ppo.ipynb b/week09_policy_II/ppo.ipynb index 85194e1c6..396e678cf 100644 --- a/week09_policy_II/ppo.ipynb +++ b/week09_policy_II/ppo.ipynb @@ -27,7 +27,7 @@ "import os\n", "if type(os.environ.get(\"DISPLAY\")) is not str or len(os.environ.get(\"DISPLAY\")) == 0:\n", " !bash ../xvfb start\n", - " %env DISPLAY = : 1" + " os.environ['DISPLAY'] = ':1'" ] }, { diff --git a/week09_policy_II/seminar_TRPO_pytorch.ipynb b/week09_policy_II/seminar_TRPO_pytorch.ipynb index d97e74301..d241a3fbb 100644 --- a/week09_policy_II/seminar_TRPO_pytorch.ipynb +++ b/week09_policy_II/seminar_TRPO_pytorch.ipynb @@ -19,7 +19,7 @@ "import os\n", "if type(os.environ.get(\"DISPLAY\")) is not str or len(os.environ.get(\"DISPLAY\")) == 0:\n", " !bash ../xvfb start\n", - " %env DISPLAY = : 1" + " os.environ['DISPLAY'] = ':1'" ] }, { diff --git a/week09_policy_II/seminar_TRPO_tensorflow.ipynb b/week09_policy_II/seminar_TRPO_tensorflow.ipynb index 1084b55ad..c13af6562 100644 --- a/week09_policy_II/seminar_TRPO_tensorflow.ipynb +++ b/week09_policy_II/seminar_TRPO_tensorflow.ipynb @@ -10,7 +10,7 @@ "import os\n", "if type(os.environ.get(\"DISPLAY\")) is not str or len(os.environ.get(\"DISPLAY\")) == 0:\n", " !bash ../xvfb start\n", - " %env DISPLAY = : 1" + " os.environ['DISPLAY'] = ':1'" ] }, { diff --git a/week09_policy_II/seminar_TRPO_theano.ipynb b/week09_policy_II/seminar_TRPO_theano.ipynb index d8e03a73f..a7cc23348 100644 --- a/week09_policy_II/seminar_TRPO_theano.ipynb +++ b/week09_policy_II/seminar_TRPO_theano.ipynb @@ -10,7 +10,7 @@ "import os\n", "if type(os.environ.get(\"DISPLAY\")) is not str or len(os.environ.get(\"DISPLAY\")) == 0:\n", " !bash ../xvfb start\n", - " %env DISPLAY = : 1" + " os.environ['DISPLAY'] = ':1'" ] }, { diff --git a/week10_planning/seminar_MCTS.ipynb b/week10_planning/seminar_MCTS.ipynb index c8b6e2fa2..28dffc41e 100644 --- a/week10_planning/seminar_MCTS.ipynb +++ b/week10_planning/seminar_MCTS.ipynb @@ -15,7 +15,7 @@ "import os\n", "if type(os.environ.get(\"DISPLAY\")) is not str or len(os.environ.get(\"DISPLAY\")) == 0:\n", " !bash ../xvfb start\n", - " %env DISPLAY = : 1\n", + " os.environ['DISPLAY'] = ':1'\n", "\n", "import numpy as np\n", "import matplotlib.pyplot as plt\n",