mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-13 19:33:46 +08:00
Tancik/lint and format scripts (#140)
* Lint and formatter to include scripts folder
This commit is contained in:
1 parent
0b246d6978
commit
e0fb77bf1a
7 files changed
+32
-13
No files matched your search
@@ -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
|
||||
Reference in new issue
Block a user