def filtered_runs(self, **filters): self._sync_runs_meta() args = click_util.Args(**filters) args.archive = self._runs_dir args.remote = None args.runs = [] return runs_impl.runs_for_args(args)
def _view_files(args): with util.TempDir("guild-view-") as logdir: log.debug("Using logdir %s", logdir) list_runs_cb = lambda: runs_impl.runs_for_args(args) monitor = run_util.RunsMonitor( list_runs_cb, logdir, VIEW_FILES_REFRESH_INTERVAL) monitor.start() click.launch(logdir) print("Monitoring runs at %s (Press CTRL+C to quit)" % logdir) try: util.wait_forever() except KeyboardInterrupt: pass log.debug("Stopping") monitor.stop() log.debug("Removing logdir %s", logdir) # Handled by ctx mgr if util.PLATFORM != "Windows": cli.out()
def runs(self): return runs_impl.runs_for_args(self._args)