-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgenerate_cidds.py
More file actions
34 lines (28 loc) 路 914 Bytes
/
Copy pathgenerate_cidds.py
File metadata and controls
34 lines (28 loc) 路 914 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
from __future__ import annotations
import argparse
from lejit.cli import main
def parse_args() -> argparse.Namespace:
parser = argparse.ArgumentParser()
parser.add_argument("--model-bundle", required=True)
parser.add_argument("--output", required=True)
parser.add_argument("--n-samples", type=int)
parser.add_argument("--device", default="cpu")
return parser.parse_args()
if __name__ == "__main__":
args = parse_args()
raise SystemExit(
main(
[
"generate",
"--config",
"configs/cidds/generate.toml",
"--model-bundle",
args.model_bundle,
"--output",
args.output,
"--device",
args.device,
*(["--n-samples", str(args.n_samples)] if args.n_samples is not None else []),
]
)
)