Quentin Gallouédec commited on
Commit
9beca9b
1 Parent(s): 7b86855

don't commit if nothing

Browse files
Files changed (1) hide show
  1. src/backend.py +4 -3
src/backend.py CHANGED
@@ -70,9 +70,10 @@ def _backend_routine():
70
 
71
  commits.append(CommitOperationAdd(path_in_repo=path_in_repo, path_or_fileobj=local_path))
72
 
73
- API.create_commit(
74
- repo_id=RESULTS_REPO, commit_message="Add evaluation results", operations=commits, repo_type="dataset"
75
- )
 
76
 
77
 
78
  def backend_routine():
 
70
 
71
  commits.append(CommitOperationAdd(path_in_repo=path_in_repo, path_or_fileobj=local_path))
72
 
73
+ if len(commits) > 0:
74
+ API.create_commit(
75
+ repo_id=RESULTS_REPO, commit_message="Add evaluation results", operations=commits, repo_type="dataset"
76
+ )
77
 
78
 
79
  def backend_routine():