Unverified Commit d90a36d1 authored by Atharva Ingle's avatar Atharva Ingle Committed by GitHub
Browse files

remove check for main process for trackers initialization (#18706)

parent 0f257a87
...@@ -414,10 +414,8 @@ def main(): ...@@ -414,10 +414,8 @@ def main():
checkpointing_steps = None checkpointing_steps = None
# We need to initialize the trackers we use, and also store our configuration. # We need to initialize the trackers we use, and also store our configuration.
# We initialize the trackers only on main process because `accelerator.log` # The trackers initializes automatically on the main process.
# only logs on main process and we don't want empty logs/runs on other processes.
if args.with_tracking: if args.with_tracking:
if accelerator.is_main_process:
experiment_config = vars(args) experiment_config = vars(args)
# TensorBoard cannot log Enums, need the raw value # TensorBoard cannot log Enums, need the raw value
experiment_config["lr_scheduler_type"] = experiment_config["lr_scheduler_type"].value experiment_config["lr_scheduler_type"] = experiment_config["lr_scheduler_type"].value
......
...@@ -516,10 +516,8 @@ def main(): ...@@ -516,10 +516,8 @@ def main():
checkpointing_steps = None checkpointing_steps = None
# We need to initialize the trackers we use, and also store our configuration. # We need to initialize the trackers we use, and also store our configuration.
# We initialize the trackers only on main process because `accelerator.log` # The trackers initializes automatically on the main process.
# only logs on main process and we don't want empty logs/runs on other processes.
if args.with_tracking: if args.with_tracking:
if accelerator.is_main_process:
experiment_config = vars(args) experiment_config = vars(args)
# TensorBoard cannot log Enums, need the raw value # TensorBoard cannot log Enums, need the raw value
experiment_config["lr_scheduler_type"] = experiment_config["lr_scheduler_type"].value experiment_config["lr_scheduler_type"] = experiment_config["lr_scheduler_type"].value
......
...@@ -560,10 +560,8 @@ def main(): ...@@ -560,10 +560,8 @@ def main():
checkpointing_steps = None checkpointing_steps = None
# We need to initialize the trackers we use, and also store our configuration. # We need to initialize the trackers we use, and also store our configuration.
# We initialize the trackers only on main process because `accelerator.log` # The trackers initializes automatically on the main process.
# only logs on main process and we don't want empty logs/runs on other processes.
if args.with_tracking: if args.with_tracking:
if accelerator.is_main_process:
experiment_config = vars(args) experiment_config = vars(args)
# TensorBoard cannot log Enums, need the raw value # TensorBoard cannot log Enums, need the raw value
experiment_config["lr_scheduler_type"] = experiment_config["lr_scheduler_type"].value experiment_config["lr_scheduler_type"] = experiment_config["lr_scheduler_type"].value
......
...@@ -513,10 +513,8 @@ def main(): ...@@ -513,10 +513,8 @@ def main():
checkpointing_steps = None checkpointing_steps = None
# We need to initialize the trackers we use, and also store our configuration. # We need to initialize the trackers we use, and also store our configuration.
# We initialize the trackers only on main process because `accelerator.log` # The trackers initializes automatically on the main process.
# only logs on main process and we don't want empty logs/runs on other processes.
if args.with_tracking: if args.with_tracking:
if accelerator.is_main_process:
experiment_config = vars(args) experiment_config = vars(args)
# TensorBoard cannot log Enums, need the raw value # TensorBoard cannot log Enums, need the raw value
experiment_config["lr_scheduler_type"] = experiment_config["lr_scheduler_type"].value experiment_config["lr_scheduler_type"] = experiment_config["lr_scheduler_type"].value
......
...@@ -787,10 +787,8 @@ def main(): ...@@ -787,10 +787,8 @@ def main():
checkpointing_steps = None checkpointing_steps = None
# We need to initialize the trackers we use, and also store our configuration. # We need to initialize the trackers we use, and also store our configuration.
# We initialize the trackers only on main process because `accelerator.log` # The trackers initializes automatically on the main process.
# only logs on main process and we don't want empty logs/runs on other processes.
if args.with_tracking: if args.with_tracking:
if accelerator.is_main_process:
experiment_config = vars(args) experiment_config = vars(args)
# TensorBoard cannot log Enums, need the raw value # TensorBoard cannot log Enums, need the raw value
experiment_config["lr_scheduler_type"] = experiment_config["lr_scheduler_type"].value experiment_config["lr_scheduler_type"] = experiment_config["lr_scheduler_type"].value
......
...@@ -512,10 +512,8 @@ def main(): ...@@ -512,10 +512,8 @@ def main():
metric = evaluate.load("mean_iou") metric = evaluate.load("mean_iou")
# We need to initialize the trackers we use, and also store our configuration. # We need to initialize the trackers we use, and also store our configuration.
# We initialize the trackers only on main process because `accelerator.log` # The trackers initializes automatically on the main process.
# only logs on main process and we don't want empty logs/runs on other processes.
if args.with_tracking: if args.with_tracking:
if accelerator.is_main_process:
experiment_config = vars(args) experiment_config = vars(args)
# TensorBoard cannot log Enums, need the raw value # TensorBoard cannot log Enums, need the raw value
experiment_config["lr_scheduler_type"] = experiment_config["lr_scheduler_type"].value experiment_config["lr_scheduler_type"] = experiment_config["lr_scheduler_type"].value
......
...@@ -581,10 +581,8 @@ def main(): ...@@ -581,10 +581,8 @@ def main():
checkpointing_steps = None checkpointing_steps = None
# We need to initialize the trackers we use, and also store our configuration. # We need to initialize the trackers we use, and also store our configuration.
# We initialize the trackers only on main process because `accelerator.log` # The trackers initializes automatically on the main process.
# only logs on main process and we don't want empty logs/runs on other processes.
if args.with_tracking: if args.with_tracking:
if accelerator.is_main_process:
experiment_config = vars(args) experiment_config = vars(args)
# TensorBoard cannot log Enums, need the raw value # TensorBoard cannot log Enums, need the raw value
experiment_config["lr_scheduler_type"] = experiment_config["lr_scheduler_type"].value experiment_config["lr_scheduler_type"] = experiment_config["lr_scheduler_type"].value
......
...@@ -459,10 +459,8 @@ def main(): ...@@ -459,10 +459,8 @@ def main():
checkpointing_steps = None checkpointing_steps = None
# We need to initialize the trackers we use, and also store our configuration. # We need to initialize the trackers we use, and also store our configuration.
# We initialize the trackers only on main process because `accelerator.log` # The trackers initializes automatically on the main process.
# only logs on main process and we don't want empty logs/runs on other processes.
if args.with_tracking: if args.with_tracking:
if accelerator.is_main_process:
experiment_config = vars(args) experiment_config = vars(args)
# TensorBoard cannot log Enums, need the raw value # TensorBoard cannot log Enums, need the raw value
experiment_config["lr_scheduler_type"] = experiment_config["lr_scheduler_type"].value experiment_config["lr_scheduler_type"] = experiment_config["lr_scheduler_type"].value
......
...@@ -574,10 +574,8 @@ def main(): ...@@ -574,10 +574,8 @@ def main():
checkpointing_steps = None checkpointing_steps = None
# We need to initialize the trackers we use, and also store our configuration. # We need to initialize the trackers we use, and also store our configuration.
# We initialize the trackers only on main process because `accelerator.log` # The trackers initializes automatically on the main process.
# only logs on main process and we don't want empty logs/runs on other processes.
if args.with_tracking: if args.with_tracking:
if accelerator.is_main_process:
experiment_config = vars(args) experiment_config = vars(args)
# TensorBoard cannot log Enums, need the raw value # TensorBoard cannot log Enums, need the raw value
experiment_config["lr_scheduler_type"] = experiment_config["lr_scheduler_type"].value experiment_config["lr_scheduler_type"] = experiment_config["lr_scheduler_type"].value
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment