Tancik/lint and format scripts (#140)

* Lint and formatter to include scripts folder
This commit is contained in:
Matthew Tancik authored and GitHub committed 2022-07-14 11:12:23 -07:00
1 parent 0b246d6978
commit e0fb77bf1a
7 files changed
+32 -13

No files matched your search

+3 -3
View File
@@ -93,13 +93,13 @@ def _distributed_worker(
logger.error("Process group URL: %s", dist_url)
raise e
assert comms._LOCAL_PROCESS_GROUP is None
assert comms._LOCAL_PROCESS_GROUP is None # pylint: disable=protected-access
num_machines = world_size // num_gpus_per_machine
for i in range(num_machines):
ranks_on_i = list(range(i * num_gpus_per_machine, (i + 1) * num_gpus_per_machine))
pg = dist.new_group(ranks_on_i)
if i == machine_rank:
comms._LOCAL_PROCESS_GROUP = pg
comms._LOCAL_PROCESS_GROUP = pg # pylint: disable=protected-access
assert num_gpus_per_machine <= torch.cuda.device_count()
torch.cuda.set_device(local_rank)
@@ -229,4 +229,4 @@ def main(config: DictConfig):
if __name__ == "__main__":
main()
main() # pylint: disable=no-value-for-parameter