"examples/python_rs/vscode:/vscode.git/clone" did not exist on "61abae51e19a9533e4f968b39e3df83f6ef8a77c"
Unverified Commit 14fdedca authored by jihan.yang's avatar jihan.yang Committed by GitHub
Browse files

Modify global gt database to support multi-machine

parent 3b9549c9
...@@ -64,7 +64,8 @@ class DataBaseSampler(object): ...@@ -64,7 +64,8 @@ class DataBaseSampler(object):
db_data_path = self.root_path.resolve() / self.sampler_cfg.DB_DATA_PATH[0] db_data_path = self.root_path.resolve() / self.sampler_cfg.DB_DATA_PATH[0]
sa_key = self.sampler_cfg.DB_DATA_PATH[0] sa_key = self.sampler_cfg.DB_DATA_PATH[0]
if cur_rank % num_gpus == 0 and not os.path.exists(f"/dev/shm/{sa_key}"): # assume 8 gpus per machine
if cur_rank % 8 == 0 and not os.path.exists(f"/dev/shm/{sa_key}"):
gt_database_data = np.load(db_data_path) gt_database_data = np.load(db_data_path)
common_utils.sa_create(f"shm://{sa_key}", gt_database_data) common_utils.sa_create(f"shm://{sa_key}", gt_database_data)
......
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