def _collect_executor(self, executor, exp_hash, force) -> Mapping[(str, str)]:
    del self.repo.scm
    results = {}

    def on_diverged(ref: str, checkpoint: bool):
        ref_info = ExpRefInfo.from_ref(ref)
        if checkpoint:
            raise CheckpointExistsError(ref_info.name)
        raise ExperimentExistsError(ref_info.name)
    for ref in executor.fetch_exps(self.scm, force=force, on_diverged=on_diverged):
        exp_rev = self.scm.get_ref(ref)
        if exp_rev:
            logger.debug("Collected experiment '%s'.", exp_rev[:7])
            results[exp_rev] = exp_hash
    return results
def _collect_executor(self, executor, exp_hash, force) -> Mapping[(str, str)]:
    del self.repo.scm
    results = {}

    def on_diverged(ref: str, checkpoint: bool):
        ref_info = ExpRefInfo.from_ref(ref)
        if checkpoint:
            raise CheckpointExistsError(ref_info.name)
        raise ExperimentExistsError(ref_info.name)
    for ref in executor.fetch_exps(self.scm, force=force, on_diverged=on_diverged):
        exp_rev = self.scm.get_ref(ref)
        if exp_rev:
            logger.debug("Collected experiment '%s'.", exp_rev[:7])
            results[exp_rev] = exp_hash
    return results