diff --git a/molskill/data/standardization.py b/molskill/data/standardization.py index 2f2ab19..fd85542 100644 --- a/molskill/data/standardization.py +++ b/molskill/data/standardization.py @@ -30,10 +30,11 @@ def get_population_moments( """ if moment_csv is None: - LOGGER.info("Standardization moments not found. Downloading from remote...") moment_csv = MOMENT_CSV - os.makedirs(ASSET_PATH, exist_ok=True) - download(DEFAULT_MOMENTS_REMOTE, moment_csv) + if (not os.path.exists(moment_csv)) or (os.path.getsize(moment_csv) == 0): + LOGGER.info("Standardization moments not found. Downloading from remote...") + os.makedirs(ASSET_PATH, exist_ok=True) + download(DEFAULT_MOMENTS_REMOTE, moment_csv) population_df = pd.read_csv(moment_csv, index_col="descriptor") assert set(population_df.keys()) == {