dvc/repo/experiments/__init__.py
def _reproduce(self, executors: dict, jobs: Optional[int] = 1) -> dict:
        """Run dvc repro for the specified ExperimentExecutors in parallel.

        Returns dict containing successfully executed experiments.
        """
        result = {}

        with ProcessPoolExecutor(max_workers=jobs) as workers:
            futures = {}
            for rev, executor in executors.items():
                future = workers.submit(
                    executor.reproduce,
                    executor.dvc_dir,
                    cwd=executor.dvc.root_dir,
                    **executor.repro_kwargs,
                )
                futures[future] = (rev, executor)
            for future in as_completed(futures):
                rev, executor = futures[future]
                exc = future.exception()
                if exc is None:
                    exp_hash = future.result()
                    logger.debug(f"ran exp based on {executor.baseline_rev}")
                    self._scm_checkout(executor.baseline_rev)
                    self._collect_output(executor.baseline_rev, executor)
                    remove(self.args_file)
                    try:
                        exp_rev = self._commit(exp_hash)
                    except UnchangedExperimentError:
                        logger.debug(
                            "Experiment '%s' identical to baseline '%s'",
                            rev,
                            executor.baseline_rev,
                        )
                        exp_rev = executor.baseline_rev
                    logger.info("Reproduced experiment '%s'.", exp_rev[:7])
                    result[rev] = {exp_rev: exp_hash}
                else:
                    logger.exception(
                        "Failed to reproduce experiment '%s'", rev
                    )
                executor.cleanup()

        return result
Run dvc repro for the specified ExperimentExecutors in parallel.

        Returns dict containing successfully executed experiments.
        
Run dvc repro for the specified ExperimentExecutors in parallel.
Returns dict containing successfully executed experiments.
Run dvc repro for the specified ExperimentExecutors in parallel . Returns dict containing successfully executed experiments .
def _reproduce(self, executors: dict, jobs: Optional[int] = 1) -> dict:
        result = {}
        with ProcessPoolExecutor(max_workers=jobs) as workers:
            futures = {}
            for rev, executor in executors.items():
                future = workers.submit(
                    executor.reproduce,
                    executor.dvc_dir,
                    cwd=executor.dvc.root_dir,
                    **executor.repro_kwargs,
                )
                futures[future] = (rev, executor)
            for future in as_completed(futures):
                rev, executor = futures[future]
                exc = future.exception()
                if exc is None:
                    exp_hash = future.result()
                    logger.debug(f"ran exp based on {executor.baseline_rev}")
                    self._scm_checkout(executor.baseline_rev)
                    self._collect_output(executor.baseline_rev, executor)
                    remove(self.args_file)
                    try:
                        exp_rev = self._commit(exp_hash)
                    except UnchangedExperimentError:
                        logger.debug(
                            "Experiment '%s' identical to baseline '%s'",
                            rev,
                            executor.baseline_rev,
                        )
                        exp_rev = executor.baseline_rev
                    logger.info("Reproduced experiment '%s'.", exp_rev[:7])
                    result[rev] = {exp_rev: exp_hash}
                else:
                    logger.exception(
                        "Failed to reproduce experiment '%s'", rev
                    )
                executor.cleanup()
        return result
def _reproduce ( self , executors : dict , jobs : Optional [ int ] = 1 ) -> dict : result = { } with ProcessPoolExecutor ( max_workers = jobs ) as workers : futures = { } for rev , executor in executors . items ( ) : future = workers . submit ( executor . reproduce , executor . dvc_dir , cwd = executor . dvc . root_dir , ** executor . repro_kwargs , ) futures [ future ] = ( rev , executor ) for future in as_completed ( futures ) : rev , executor = futures [ future ] exc = future . exception ( ) if exc is None : exp_hash = future . result ( ) logger . debug ( f"ran exp based on {executor.baseline_rev}" ) self . _scm_checkout ( executor . baseline_rev ) self . _collect_output ( executor . baseline_rev , executor ) remove ( self . args_file ) try : exp_rev = self . _commit ( exp_hash ) except UnchangedExperimentError : logger . debug ( "Experiment '%s' identical to baseline '%s'" , rev , executor . baseline_rev , ) exp_rev = executor . baseline_rev logger . info ( "Reproduced experiment '%s'." , exp_rev [ : 7 ] ) result [ rev ] = { exp_rev : exp_hash } else : logger . exception ( "Failed to reproduce experiment '%s'" , rev ) executor . cleanup ( ) return result
Run dvc repro for the specified ExperimentExecutors in parallel.
Run dvc repro for the specified ExperimentExecutors in parallel .
"""Run dvc repro for the specified ExperimentExecutors in parallel.

        Returns dict containing successfully executed experiments.
        """
self
executors
dict
jobs
Optional[int]