MCPcopy Create free account
hub / github.com/It4innovations/hyperqueue / command

Function command

benchmarks/src/cli.py:102–137  ·  view source on GitHub ↗
(
            workdir: Optional[Path] = None,
            queue: Optional[str] = None,
            project: Optional[str] = None,
            init_script: Optional[Path] = None,
            node_count: Optional[int] = 1,
            walltime_h: Optional[int] = 1,
            wait: bool = False,
            clear: bool = False,
            postprocess_only: bool = False,
        )

Source from the content-addressed store, hash-verified

100
101 @app.command(name=case.name())
102 def command(
103 workdir: Optional[Path] = None,
104 queue: Optional[str] = None,
105 project: Optional[str] = None,
106 init_script: Optional[Path] = None,
107 node_count: Optional[int] = 1,
108 walltime_h: Optional[int] = 1,
109 wait: bool = False,
110 clear: bool = False,
111 postprocess_only: bool = False,
112 ):
113 if workdir is None:
114 workdir = case.get_workdir()
115 workdir = workdir.absolute()
116 if clear:
117 shutil.rmtree(workdir, ignore_errors=True)
118
119 if queue is not None or project is not None or init_script is not None:
120 assert queue is not None and project is not None and init_script is not None
121 slurm = SlurmCliOptions(
122 queue=queue,
123 project=project,
124 init_script=init_script,
125 node_count=node_count,
126 wait_for_job=wait,
127 walltime_h=walltime_h,
128 )
129 else:
130 slurm = None
131
132 run_test_case(
133 workdir=workdir,
134 case=case,
135 slurm_cli=slurm,
136 postprocess_only=postprocess_only,
137 )
138
139 command.__doc__ = f"""
140Run the {case.name()} benchmark.

Callers 4

parse_hq_directivesFunction · 0.85
verify_root_cliFunction · 0.85
generate_completionFunction · 0.85
mainFunction · 0.85

Calls 3

SlurmCliOptionsClass · 0.85
run_test_caseFunction · 0.85
get_workdirMethod · 0.80

Tested by 1

verify_root_cliFunction · 0.68