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",