MCPcopy
hub / github.com/treeverse/dvc / _repro_commit

Method _repro_commit

dvc/repo/experiments/executor/base.py:553–584  ·  view source on GitHub ↗
(
        cls,
        dvc,
        info,
        exp_hash,
        repro_force,
        message: Optional[str] = None,
    )

Source from the content-addressed store, hash-verified

551
552 @classmethod
553 def _repro_commit(
554 cls,
555 dvc,
556 info,
557 exp_hash,
558 repro_force,
559 message: Optional[str] = None,
560 ) -> tuple[Optional[str], Optional["ExpRefInfo"], bool]:
561 with cls.auto_push(dvc):
562 cls.commit(
563 dvc.scm,
564 exp_hash,
565 exp_name=info.name,
566 force=repro_force,
567 message=message,
568 )
569
570 ref: Optional[str] = dvc.scm.get_ref(EXEC_BRANCH, follow=False)
571 exp_ref: Optional[ExpRefInfo] = ExpRefInfo.from_ref(ref) if ref else None
572 if cls.WARN_UNTRACKED:
573 untracked = dvc.scm.untracked_files()
574 if untracked:
575 logger.warning(
576 (
577 "The following untracked files were present in "
578 "the experiment directory after reproduction but "
579 "will not be included in experiment commits:\n"
580 "\t%s"
581 ),
582 ", ".join(untracked),
583 )
584 return ref, exp_ref, repro_force
585
586 @classmethod
587 @contextmanager

Callers 1

reproduceMethod · 0.80

Calls 4

auto_pushMethod · 0.80
from_refMethod · 0.80
joinMethod · 0.80
commitMethod · 0.45

Tested by

no test coverage detected