From 0596f68b5b0017c8508443ab421427140303d2b5 Mon Sep 17 00:00:00 2001 From: Kristian Hartikainen Date: Tue, 28 Apr 2020 09:06:32 +0100 Subject: [PATCH] Fix/train limit logging (#140) * Ignore _do_training_repeats diagnostics when they're None * Fix max-failures typo in instrument.py * Add commented gpu dependencies to conda environment.yml --- environment.yml | 2 ++ examples/instrument.py | 2 +- softlearning/algorithms/rl_algorithm.py | 6 ++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/environment.yml b/environment.yml index 67410534e..ffa415d17 100644 --- a/environment.yml +++ b/environment.yml @@ -7,5 +7,7 @@ dependencies: - pip>=20.0 - conda>=4.7 - pyopengl-accelerate==3.1.3b1 +# - cudatoolkit==10.1.243 +# - cudnn==7.6.5 - pip: - -r ./requirements.txt diff --git a/examples/instrument.py b/examples/instrument.py index 623822138..3c5e7fb8b 100644 --- a/examples/instrument.py +++ b/examples/instrument.py @@ -258,7 +258,7 @@ def run_example_debug(example_module_name, example_argv): of all cpus once ray local mode supports custom resources. """ - debug_example_argv = ['--with-server=False', '--max-failure=0'] + debug_example_argv = ['--with-server=False', '--max-failures=0'] for option in example_argv: if '--trial-cpus' in option: available_cpus = multiprocessing.cpu_count() diff --git a/softlearning/algorithms/rl_algorithm.py b/softlearning/algorithms/rl_algorithm.py index 094a562fa..554aa07e8 100644 --- a/softlearning/algorithms/rl_algorithm.py +++ b/softlearning/algorithms/rl_algorithm.py @@ -184,8 +184,10 @@ def _train(self): gt.stamp('sample') if self.ready_to_train: - update_diagnostics.append(self._do_training_repeats( - timestep=self._total_timestep)) + repeat_diagnostics = self._do_training_repeats( + timestep=self._total_timestep) + if repeat_diagnostics is not None: + update_diagnostics.append(repeat_diagnostics) gt.stamp('train')