fix(profiling): publish preview rows to existing dataset

This commit is contained in:
Pepijn
2026-04-16 11:54:35 +02:00
parent 40470648d1
commit b27e838376
2 changed files with 7 additions and 2 deletions
+6 -1
View File
@@ -61,7 +61,12 @@ def upload_targets(
commit_message: str | None = None,
) -> dict[str, str]:
api = HfApi(token=token)
api.create_repo(repo_id=repo_id, repo_type=repo_type, private=private, exist_ok=True)
try:
repo_exists = api.repo_exists(repo_id=repo_id, repo_type=repo_type)
except Exception:
repo_exists = True
if not repo_exists:
api.create_repo(repo_id=repo_id, repo_type=repo_type, private=private, exist_ok=True)
uploaded: dict[str, str] = {}
for target in targets:
api.upload_file(