Use pygit2 backend for fetch_refspecs (#8907)

fix: #8762
1. partly solve #8787 and #8477
2. Improve the performance
3. Bump `scmrepo` into 0.1.9
This commit is contained in:
Gao
2023-02-06 16:07:00 +02:00
committed by GitHub
parent d84196db62
commit e1acab5113
2 changed files with 10 additions and 14 deletions
+9 -13
View File
@@ -335,21 +335,17 @@ class BaseExecutor(ABC):
# fetch experiments
try:
dest_scm.fetch_refspecs(
self.git_url,
[f"{ref}:{ref}" for ref in refs],
on_diverged=on_diverged_ref,
force=force,
**kwargs,
)
refspecs = [f"{ref}:{ref}" for ref in refs]
# update last run checkpoint (if it exists)
if has_checkpoint:
dest_scm.fetch_refspecs(
self.git_url,
[f"{EXEC_CHECKPOINT}:{EXEC_CHECKPOINT}"],
force=True,
**kwargs,
)
refspecs.append(f"{EXEC_CHECKPOINT}:{EXEC_CHECKPOINT}")
dest_scm.fetch_refspecs(
self.git_url,
refspecs,
on_diverged=on_diverged_ref,
force=force or has_checkpoint,
**kwargs,
)
except SCMError:
pass
+1 -1
View File
@@ -49,7 +49,7 @@ dependencies = [
"rich>=10.13.0",
"pyparsing>=2.4.7",
"typing-extensions>=3.7.4",
"scmrepo==0.1.7",
"scmrepo==0.1.9",
"dvc-render==0.1.0",
"dvc-task==0.1.11",
"dvclive>=1.2.2",