Skip to content

Commit

Permalink
fix: loading pre 1.11.0 (#1460)
Browse files Browse the repository at this point in the history
* small fix

* fix: fix
  • Loading branch information
Samoed authored Nov 15, 2024
1 parent 58c459b commit 1b920ac
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions mteb/load_results/task_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,10 +291,14 @@ def from_disk(cls, path: Path, load_historic_data: bool = True) -> TaskResult:
)

pre_1_11_load = (
"mteb_version" in data
and data["mteb_version"] is not None
and Version(data["mteb_version"]) < Version("1.11.0")
(
"mteb_version" in data
and data["mteb_version"] is not None
and Version(data["mteb_version"]) < Version("1.11.0")
)
or "mteb_version" not in data
) # assume it is before 1.11.0 if the version is not present

try:
obj = cls.model_validate(data)
except Exception as e:
Expand Down

0 comments on commit 1b920ac

Please sign in to comment.