Skip to content

Commit

Permalink
fix: reload of old exps in dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
ankeko committed May 17, 2024
1 parent b5e7360 commit 8a0835e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
11 changes: 9 additions & 2 deletions niceml/experiments/experimentinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,16 @@ def as_save_dict(self) -> dict:
LAST_MODIFIED_KEY: self.last_modified,
}

def is_modified(self, other: "ExperimentInfo") -> bool:
def is_modified(
self, other: "ExperimentInfo", ignore_missing_timestamp: Optional[bool] = True
) -> bool:
"""Checks if the other experiment info is modified"""
return self.last_modified != other.last_modified
if self.last_modified != other.last_modified:
if ignore_missing_timestamp:
if self.last_modified is None or other.last_modified is None:
return False
return True
return False


def load_exp_info(
Expand Down
2 changes: 1 addition & 1 deletion niceml/experiments/experimentmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def is_exp_modified(self, exp_info: ExperimentInfo) -> bool:
if exp_info.short_id not in self.exp_dict_short_id:
return True
exp = self.get_exp_by_id(exp_info.short_id)
return exp.exp_info.is_modified(exp_info)
return exp_info.is_modified(exp.exp_info)

def get_datasets(self) -> List[str]:
"""Returns a list of all datasets used in the experiments"""
Expand Down

0 comments on commit 8a0835e

Please sign in to comment.