From 40ea31b05219991a7f9287ce56170122defb4b5f Mon Sep 17 00:00:00 2001 From: Valentin Boettcher Date: Fri, 9 Dec 2022 15:19:54 -0500 Subject: [PATCH] add a utility to get all snapshots from the path --- hopsflow/util.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hopsflow/util.py b/hopsflow/util.py index a4b8492..7e213b8 100644 --- a/hopsflow/util.py +++ b/hopsflow/util.py @@ -872,13 +872,17 @@ def ensemble_mean_online( return aggregate.ensemble_value -def get_online_values_from_cache(path): +def get_all_snaphot_paths(path): path = Path(path) all_versions = list(path.parent.glob(path.stem + "*" + path.suffix)) final = all_versions[0] all_versions = all_versions[1:] + [final] + return all_versions + +def get_online_values_from_cache(path): + all_versions = get_all_snaphot_paths(path) vals = [] for path in all_versions: