Spaces:
Runtime error
Runtime error
Fixed bugs from the refactor of repo access. Now it should save trace again.
Browse files- src/architectures.py +3 -3
src/architectures.py
CHANGED
@@ -279,16 +279,16 @@ class Architecture:
|
|
279 |
if cls.save_repo is None and not cls.save_repo_load_error:
|
280 |
try:
|
281 |
hf_write_token = hf_api_token(write=True)
|
282 |
-
cls.save_repo = Repository(local_dir=cls.trace_dir, clone_from=cls.
|
283 |
except Exception as err:
|
284 |
cls.save_repo_load_error = True
|
285 |
print(f"Error connecting to the save repo {err} - persistence now disabled")
|
286 |
|
287 |
if cls.save_repo is not None:
|
288 |
-
with open(cls.
|
289 |
test_json = json.load(f)
|
290 |
test_json['tests'].append(data)
|
291 |
-
with open(cls.
|
292 |
json.dump(test_json, f, indent=2)
|
293 |
cls.save_repo.push_to_hub()
|
294 |
|
|
|
279 |
if cls.save_repo is None and not cls.save_repo_load_error:
|
280 |
try:
|
281 |
hf_write_token = hf_api_token(write=True)
|
282 |
+
cls.save_repo = Repository(local_dir=cls.trace_dir, clone_from=cls.save_repo_url, token=hf_write_token)
|
283 |
except Exception as err:
|
284 |
cls.save_repo_load_error = True
|
285 |
print(f"Error connecting to the save repo {err} - persistence now disabled")
|
286 |
|
287 |
if cls.save_repo is not None:
|
288 |
+
with open(cls.trace_file, 'r') as f:
|
289 |
test_json = json.load(f)
|
290 |
test_json['tests'].append(data)
|
291 |
+
with open(cls.trace_file, 'w') as f:
|
292 |
json.dump(test_json, f, indent=2)
|
293 |
cls.save_repo.push_to_hub()
|
294 |
|