From 949433208c66bf4db129ed5670cfcb12c7f933fa Mon Sep 17 00:00:00 2001 From: Guillaume Klein Date: Thu, 1 Jul 2021 15:02:52 +0200 Subject: [PATCH] Forward current environment variables when autotuning batch size (#849) --- opennmt/runner.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/opennmt/runner.py b/opennmt/runner.py index 43bfbe182..d7ab2e71f 100644 --- a/opennmt/runner.py +++ b/opennmt/runner.py @@ -559,9 +559,8 @@ def _auto_tune_batch_size( with tf.io.gfile.GFile(config_path, mode="w") as config_file: yaml.dump(run_config, config_file) - env = { - "TF_CPP_MIN_LOG_LEVEL": "2", - } + env = os.environ.copy() + env["TF_CPP_MIN_LOG_LEVEL"] = "2" args = [ sys.executable or "python", "-m",