Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions examples/04_training/01_train_dynedge.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,10 @@ def main(
gpus=config["fit"]["gpus"],
)

if results is None:
# Only the global-zero rank holds the output in multi-device runs.
return

# Save predictions and model to file
db_name = path.split("/")[-1].split(".")[0]
path = os.path.join(archive, db_name, run_name)
Expand Down
4 changes: 4 additions & 0 deletions examples/04_training/02_train_tito_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,10 @@ def main(
gpus=config["fit"]["gpus"],
)

if results is None:
# Only the global-zero rank holds the output in multi-device runs.
return

# Save predictions and model to file
db_name = path.split("/")[-1].split(".")[0]
path = os.path.join(archive, db_name, run_name)
Expand Down
4 changes: 4 additions & 0 deletions examples/04_training/03_train_dynedge_from_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ def main(
additional_attributes=additional_attributes + ["event_no"],
gpus=config.fit["gpus"],
)

if results is None:
# Only the global-zero rank holds the output in multi-device runs.
return
results.to_csv(f"{path}/results.csv")


Expand Down
4 changes: 4 additions & 0 deletions examples/04_training/04_train_multiclassifier_from_configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,10 @@ def main(
additional_attributes=additional_attributes + ["event_no"],
gpus=config.fit["gpus"],
)

if results is None:
# Only the global-zero rank holds the output in multi-device runs.
return
results.to_csv(f"{path}/results.csv")


Expand Down
4 changes: 4 additions & 0 deletions examples/04_training/05_train_RNN_TITO.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,10 @@ def main(
gpus=config["fit"]["gpus"],
)

if results is None:
# Only the global-zero rank holds the output in multi-device runs.
return

# Save predictions and model to file
db_name = path.split("/")[-1].split(".")[0]
path = os.path.join(archive, db_name, run_name)
Expand Down
4 changes: 4 additions & 0 deletions examples/04_training/06_train_icemix_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,10 @@ def main(
gpus=config["fit"]["gpus"],
)

if results is None:
# Only the global-zero rank holds the output in multi-device runs.
return

# Save predictions and model to file
db_name = path.split("/")[-1].split(".")[0]
path = os.path.join(archive, db_name, run_name)
Expand Down
4 changes: 4 additions & 0 deletions examples/04_training/07_train_normalizing_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,10 @@ def main(
gpus=config["fit"]["gpus"],
)

if results is None:
# Only the global-zero rank holds the output in multi-device runs.
return

# Save predictions and model to file
db_name = path.split("/")[-1].split(".")[0]
path = os.path.join(archive, db_name, run_name)
Expand Down
4 changes: 4 additions & 0 deletions examples/04_training/08_train_grit_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,10 @@ def main(
gpus=config["fit"]["gpus"],
)

if results is None:
# Only the global-zero rank holds the output in multi-device runs.
return

# Save predictions and model to file
db_name = path.split("/")[-1].split(".")[0]
path = os.path.join(archive, db_name, run_name)
Expand Down
Loading
Loading