Skip to content

Commit

Permalink
exp show: use unique executor name for dvc-task & standalone tempdir …
Browse files Browse the repository at this point in the history
…exps
  • Loading branch information
pmrowla committed Jun 29, 2022
1 parent 5519519 commit b5010ee
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
10 changes: 7 additions & 3 deletions dvc/repo/experiments/executor/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class TempDirExecutor(BaseLocalExecutor):
# suggestions) that are not applicable outside of workspace runs
WARN_UNTRACKED = True
QUIET = True
DEFAULT_LOCATION = "temp"
DEFAULT_LOCATION = "tempdir"

def init_git(self, scm: "Git", branch: Optional[str] = None):
from dulwich.repo import Repo as DulwichRepo
Expand Down Expand Up @@ -127,7 +127,9 @@ def from_stash_entry(
makedirs(parent_dir, exist_ok=True)
tmp_dir = mkdtemp(dir=parent_dir)
try:
executor = cls._from_stash_entry(repo, stash_rev, entry, tmp_dir)
executor = cls._from_stash_entry(
repo, stash_rev, entry, tmp_dir, **kwargs
)
logger.debug("Init temp dir executor in '%s'", tmp_dir)
return executor
except Exception:
Expand All @@ -150,7 +152,9 @@ def from_stash_entry(
**kwargs,
):
root_dir = repo.scm.root_dir
executor = cls._from_stash_entry(repo, stash_rev, entry, root_dir)
executor = cls._from_stash_entry(
repo, stash_rev, entry, root_dir, **kwargs
)
logger.debug("Init workspace executor in '%s'", root_dir)
return executor

Expand Down
5 changes: 4 additions & 1 deletion dvc/repo/experiments/queue/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ def setup_exp(entry_dict: Dict[str, Any]) -> str:
# TODO: split executor.init_cache into separate subtask - we can release
# exp.scm_lock before DVC push
executor = BaseStashQueue.setup_executor(
repo.experiments, entry, TempDirExecutor
repo.experiments,
entry,
TempDirExecutor,
location="dvc-task",
)
infofile = repo.experiments.celery_queue.get_infofile_path(entry.stash_rev)
executor.info.dump_json(infofile)
Expand Down

0 comments on commit b5010ee

Please sign in to comment.