Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/borglab/gtsfm into unifie…
Browse files Browse the repository at this point in the history
…d-config
  • Loading branch information
senselessdev1 authored and senselessdev1 committed Aug 15, 2023
2 parents c25f940 + ca840ff commit 46ac6c4
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions gtsfm/runner/gtsfm_runner_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def construct_argparser(self) -> argparse.ArgumentParser:
help="Number of threads per each worker",
)
parser.add_argument(
"--worker_memory_limit", type=str, default="auto", help="Memory limit per worker, e.g. `8GB`"
"--worker_memory_limit", type=str, default=None, help="Memory limit per worker, e.g. `8GB`"
)
parser.add_argument(
"--config_name",
Expand Down Expand Up @@ -260,11 +260,13 @@ def run(self) -> GtsfmData:
self.loader._input_worker = io_worker
self.scene_optimizer._output_worker = io_worker
else:
cluster = LocalCluster(
n_workers=self.parsed_args.num_workers,
threads_per_worker=self.parsed_args.threads_per_worker,
memory_limit=self.parsed_args.worker_memory_limit,
)
local_cluster_kwargs = {
"n_workers": self.parsed_args.num_workers,
"threads_per_worker": self.parsed_args.threads_per_worker,
}
if self.parsed_args.worker_memory_limit is not None:
local_cluster_kwargs["memory_limit"] = self.parsed_args.worker_memory_limit
cluster = LocalCluster(**local_cluster_kwargs)
client = Client(cluster)

# Create process graph.
Expand Down

0 comments on commit 46ac6c4

Please sign in to comment.