enerzyme.models.modelhub.compare_path#
- enerzyme.models.modelhub.compare_path(path1, path2, preference: Literal['best', 'last'] = 'best', model_rank: int | None = None) int[source]#
Compare two paths in the order of
preference: if the preference is “best”, then the path of the best checkpoint is prioritized; otherwise, the path of the last checkpoint is prioritized.
model_rank: explicit model rank is prioritized.
version: latest version is prioritized.
Params:#
- path1: str
The first path to compare.
- path2: str
The second path to compare.
- preference: Literal[“best”, “last”]
The preference between the best checkpoint and the last checkpoint.
- model_rank: Optional[int]
The model rank. Only used for deep ensemble to make sure that the model with the correct rank is selected.
Returns:#
- int
The difference between the two paths. When the difference is positive, path1 prioritized over path2.