You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sub-packages/bionemo-evo2/src/bionemo/evo2/run/predict.py
+10Lines changed: 10 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -105,6 +105,11 @@ def parse_args():
105
105
default=None,
106
106
help="Output dir that will contain the generated text produced by the Evo2 model. If not provided, the output will be logged.",
107
107
)
108
+
ap.add_argument(
109
+
"--files-per-subdir",
110
+
type=int,
111
+
help="Number of files to write to each subdirectory. If provided, subdirectories with N files each will be created. Ignored unless --write-interval is 'batch'.",
112
+
)
108
113
ap.add_argument(
109
114
"--full-fp8",
110
115
action="store_true",
@@ -374,6 +379,7 @@ def predict(
374
379
hybrid_override_pattern: str|None=None,
375
380
num_layers: int|None=None,
376
381
seq_len_interpolation_factor: int|None=None,
382
+
files_per_subdir: int|None=None,
377
383
):
378
384
"""Inference workflow for Evo2.
379
385
@@ -422,6 +428,8 @@ def predict(
422
428
write_interval=write_interval,
423
429
batch_dim_key_defaults={"token_logits": 0},
424
430
seq_dim_key_defaults={"token_logits": 1},
431
+
files_per_subdir=files_per_subdir,
432
+
save_all_model_parallel_ranks=False, # only write one copy of predictions.
"""Invoked with Trainer.fit, validate, test, and predict are called. Will immediately fail when 'write_interval' is 'epoch' and 'trainer.num_devices' > 1.
0 commit comments