| 11 | |
| 12 | class CmdExperimentsPull(CmdBase): |
| 13 | def run(self): |
| 14 | pulled_exps = self.repo.experiments.pull( |
| 15 | self.args.git_remote, |
| 16 | self.args.experiment, |
| 17 | all_commits=self.args.all_commits, |
| 18 | rev=self.args.rev, |
| 19 | num=self.args.num, |
| 20 | force=self.args.force, |
| 21 | pull_cache=self.args.pull_cache, |
| 22 | dvc_remote=self.args.dvc_remote, |
| 23 | jobs=self.args.jobs, |
| 24 | run_cache=self.args.run_cache, |
| 25 | ) |
| 26 | |
| 27 | if pulled_exps: |
| 28 | ui.write( |
| 29 | f"Pulled experiment '{pulled_exps}'", |
| 30 | f"from Git remote '{self.args.git_remote}'.", |
| 31 | ) |
| 32 | else: |
| 33 | ui.write("No experiments to pull.") |
| 34 | if not self.args.pull_cache: |
| 35 | ui.write( |
| 36 | "To pull cached outputs for this experiment" |
| 37 | "from DVC remote storage," |
| 38 | "re-run this command without '--no-cache'." |
| 39 | ) |
| 40 | |
| 41 | return 0 |
| 42 | |
| 43 | |
| 44 | def add_parser(experiments_subparsers, parent_parser): |