Skip to content

Commit 21e4c61

Browse files
authored
Apply '_enable_goodbye_message' check to both goodbye messages. (#319)
1 parent 5ff96f7 commit 21e4c61

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

nemo_run/run/experiment.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1244,17 +1244,17 @@ def __exit__(self, exc_type, exc_value, tb):
12441244
self._cleanup(tunnels=False)
12451245
if self._launched:
12461246
Path(os.path.join(self._exp_dir, self._DONE_FILE)).touch()
1247-
self.console.print(
1248-
Syntax(
1249-
self.GOODBYE_MESSAGE_PYTHON.format(
1250-
exp_id=self._id,
1251-
tasks=list(map(lambda job: job.id, self.jobs)),
1252-
),
1253-
"python",
1254-
theme=os.environ.get("NEMO_RUN_CODE_THEME", "monokai"),
1255-
)
1256-
)
12571247
if self._enable_goodbye_message:
1248+
self.console.print(
1249+
Syntax(
1250+
self.GOODBYE_MESSAGE_PYTHON.format(
1251+
exp_id=self._id,
1252+
tasks=list(map(lambda job: job.id, self.jobs)),
1253+
),
1254+
"python",
1255+
theme=os.environ.get("NEMO_RUN_CODE_THEME", "monokai"),
1256+
)
1257+
)
12581258
self.console.print(
12591259
Syntax(
12601260
self.GOODBYE_MESSAGE_BASH.format(

0 commit comments

Comments
 (0)