-
Notifications
You must be signed in to change notification settings - Fork 5
/
setup.py
54 lines (45 loc) · 1.65 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import argparse
import glob
import os
import shutil
def copy_cfg_files(src_folder: str, dest_folder: str):
src_files = glob.glob(src_folder)
for file in src_files:
shutil.copy(file, dest_folder)
print(f"Copied files from `{src_folder}` to `{dest_folder}`.")
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument(
"--hab-lab-path", type=str, required=True, help="path to habitat-lab"
)
args = parser.parse_args()
# copy dataset configs
src_folder = "configs/dataset/*"
dest_folder = os.path.join(
args.hab_lab_path, "../habitat-lab/habitat-lab/habitat/config/habitat/dataset/objectnav"
)
copy_cfg_files(src_folder, dest_folder)
# copy task specs
src_folder = "configs/task/*"
dest_folder = os.path.join(
args.hab_lab_path, "habitat-lab/habitat/config/benchmark/nav/objectnav/"
)
copy_cfg_files(src_folder, dest_folder)
# copy pretraining configs
src_folder = "configs/pretraining/*"
dest_folder = os.path.join(
args.hab_lab_path, "habitat-baselines/habitat_baselines/config/objectnav"
)
copy_cfg_files(src_folder, dest_folder)
# copy zero-shot eval configs
src_folder = "configs/hm3d_zero-shot_eval/*"
dest_folder = os.path.join(
args.hab_lab_path, "habitat-baselines/habitat_baselines/config/objectnav"
)
copy_cfg_files(src_folder, dest_folder)
# copy HM3D-finetuning configs
src_folder = "configs/hm3d_finetuning/*"
dest_folder = os.path.join(
args.hab_lab_path, "habitat-baselines/habitat_baselines/config/objectnav"
)
copy_cfg_files(src_folder, dest_folder)