Skip to content

Commit 9494332

Browse files
authored
Forward current environment variables when autotuning batch size (#849)
1 parent 1045399 commit 9494332

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

opennmt/runner.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -559,9 +559,8 @@ def _auto_tune_batch_size(
559559
with tf.io.gfile.GFile(config_path, mode="w") as config_file:
560560
yaml.dump(run_config, config_file)
561561

562-
env = {
563-
"TF_CPP_MIN_LOG_LEVEL": "2",
564-
}
562+
env = os.environ.copy()
563+
env["TF_CPP_MIN_LOG_LEVEL"] = "2"
565564
args = [
566565
sys.executable or "python",
567566
"-m",

0 commit comments

Comments
 (0)