Add --max_cpu_cores argument for parallel processing in evaluation scripts
This commit is contained in:
@@ -77,6 +77,12 @@ def parse_args() -> argparse.Namespace:
|
||||
)
|
||||
p.add_argument("--batch_size", type=int, default=256)
|
||||
p.add_argument("--num_workers", type=int, default=0)
|
||||
p.add_argument(
|
||||
"--max_cpu_cores",
|
||||
type=int,
|
||||
default=-1,
|
||||
help="Maximum number of CPU cores to use for parallel data construction.",
|
||||
)
|
||||
p.add_argument("--seed", type=int, default=0)
|
||||
p.add_argument("--min_pos", type=int, default=20)
|
||||
p.add_argument(
|
||||
@@ -171,6 +177,7 @@ def main() -> None:
|
||||
age_bins_years=age_bins_years,
|
||||
seed=args.seed,
|
||||
show_progress=show_progress,
|
||||
n_jobs=int(args.max_cpu_cores),
|
||||
)
|
||||
|
||||
device = torch.device(args.device)
|
||||
|
||||
Reference in New Issue
Block a user