Skip to content

Commit 7eb6b25

Browse files
committed
🐛 Fixed reconnect issue due to failing Run name
1 parent 774d444 commit 7eb6b25

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

simvue/run.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -982,7 +982,10 @@ def reconnect(self, run_id: str) -> bool:
982982

983983
self._id = run_id
984984
self._sv_obj = RunObject(identifier=self._id, _read_only=False)
985+
self._name = self._sv_obj.name
986+
self._sv_obj.status = self._status
985987
self._sv_obj.system = get_system()
988+
self._sv_obj.commit()
986989
self._start()
987990

988991
return True

tests/functional/test_run_class.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1177,6 +1177,7 @@ def test_reconnect(mode, monkeypatch: pytest.MonkeyPatch) -> None:
11771177

11781178
with simvue.Run() as run:
11791179
run.reconnect(run_id)
1180+
assert run._sv_obj.status == "running"
11801181
run.log_metrics({"test_metric": 1})
11811182
run.log_event("Testing!")
11821183

0 commit comments

Comments
 (0)