fix: only download experiments if they are not present

Experiments won't change anyway, so let's assume they are up-to-date if
they are on disk.
This commit is contained in:
Sefa Eyeoglu 2022-04-20 19:48:57 +02:00
parent 005e462e06
commit c32f0c42a1
No known key found for this signature in database
GPG Key ID: C10411294912A422

View File

@ -90,8 +90,13 @@ def main():
for x in experiment_ids:
version = experiments.versions[x]
experiment_path = os.path.join(UPSTREAM_DIR, VERSIONS_DIR, f"{x}.json")
print("Updating experiment " + version.id)
fetch_zipped_version(os.path.join(UPSTREAM_DIR, VERSIONS_DIR, f"{x}.json"), version.url)
if not os.path.isfile(experiment_path):
fetch_zipped_version(experiment_path, version.url)
else:
print("Already have experiment " + version.id)
remote_versions.index.write(version_manifest_path)