You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When checking the active property of a run object after calling run.close(), a TypeError is raised.
In [5]: run=aim.Run()
In [6]: run.activeOut[6]: TrueIn [7]: run.close()
In [8]: run.active---------------------------------------------------------------------------TypeErrorTraceback (mostrecentcalllast)
CellIn[8], line1---->1run.activeFile~/.pyenv/versions/3.11.8/envs/nabla-3.11.8/lib/python3.11/site-packages/aim/sdk/run.py:217, inStructuredRunMixin.active(self)
209 @property210defactive(self):
211"""Check if run is active or not. 212 213 :getter: Returns run's active state. 214 :type: bool 215 """217ifself.end_time:
218returnFalse219else:
File~/.pyenv/versions/3.11.8/envs/nabla-3.11.8/lib/python3.11/site-packages/aim/sdk/run.py:192, inStructuredRunMixin.end_time(self)
187"""Run finalization time [UTC] as timestamp. 188 189 :getter: Returns run finalization time. 190 """191try:
---->192returnself.meta_run_tree['end_time']
193exceptKeyError:
194# run saved with old version. fallback to sqlite data195returnself.props.end_timeTypeError: 'NoneType'objectisnotsubscriptable
To reproduce
Initialize a run object using aim.Run().
Check the active property of the run object. (It returns True as expected).
Close the run object using run.close().
Check the active property of the run object again.
Expected behavior
After calling run.close(), the active property should return False without raising an exception.
🐛 Bug
When checking the active property of a run object after calling run.close(), a TypeError is raised.
To reproduce
Expected behavior
After calling run.close(), the active property should return False without raising an exception.
Environment
aim-ui==3.19.2
aimrecords==0.0.7
aimrocks==0.4.0
Additional information
The error appears to be caused by self.meta_run_tree['end_time'] returning None.
A check should be added to ensure self.meta_run_tree is not None before attempting to read the end_time key.
Thank you for looking into this issue.
The text was updated successfully, but these errors were encountered: