From e2379640cf846758fe1b440c0e4f2e5d14535bab Mon Sep 17 00:00:00 2001 From: akshay-krishnan Date: Wed, 26 Jul 2023 10:49:52 -0400 Subject: [PATCH 01/11] temp sh runner location on falcon --- .github/scripts/execute_single_benchmark_self_hosted.sh | 2 +- environment_linux.yml | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/scripts/execute_single_benchmark_self_hosted.sh b/.github/scripts/execute_single_benchmark_self_hosted.sh index 154386d5a..7ac78616c 100755 --- a/.github/scripts/execute_single_benchmark_self_hosted.sh +++ b/.github/scripts/execute_single_benchmark_self_hosted.sh @@ -3,7 +3,7 @@ # Datasets are stored in /usr/local/gtsfm-data in order to reduce runtimes by not # redownloading each (very large) dataset every CI run. Any new datasets must be # downloaded and stored in /usr/local/gtsfm-data before running this action. -DATASET_PREFIX=/usr/local/gtsfm-data +DATASET_PREFIX=/home/akrishnan86/gtsfm/data DATASET_NAME=$1 CONFIG_NAME=$2 diff --git a/environment_linux.yml b/environment_linux.yml index 77279c384..227e4f566 100644 --- a/environment_linux.yml +++ b/environment_linux.yml @@ -6,6 +6,7 @@ channels: # channel. - pytorch - conda-forge + - nvidia dependencies: # python essentials - python=3.8 @@ -33,8 +34,8 @@ dependencies: - scipy - hydra-core # 3rd party algorithms for different modules - - cudatoolkit>=10.2 - - pytorch>=1.12.0 + - pytorch-cuda=11.8 + - pytorch - torchvision>=0.13.0 - kornia # io From f44b2af6ef7add2432df2494361a584df6b7fdb1 Mon Sep 17 00:00:00 2001 From: akshay-krishnan Date: Wed, 26 Jul 2023 10:52:10 -0400 Subject: [PATCH 02/11] fake assert --- gtsfm/runner/gtsfm_runner_base.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gtsfm/runner/gtsfm_runner_base.py b/gtsfm/runner/gtsfm_runner_base.py index 348d7a54d..1fdc258c8 100644 --- a/gtsfm/runner/gtsfm_runner_base.py +++ b/gtsfm/runner/gtsfm_runner_base.py @@ -225,7 +225,8 @@ def setup_ssh_cluster_with_retries(self): def run(self) -> GtsfmData: """Run the SceneOptimizer.""" start_time = time.time() - + logging.info('starting runner') + assert False # create dask cluster if self.parsed_args.cluster_config: cluster = self.setup_ssh_cluster_with_retries() From 1672120d7baecb92f9f50db1e47f28b300b739e6 Mon Sep 17 00:00:00 2001 From: akshay-krishnan Date: Wed, 26 Jul 2023 11:06:24 -0400 Subject: [PATCH 03/11] update cacher --- gtsfm/configs/skydio_front_end.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtsfm/configs/skydio_front_end.yaml b/gtsfm/configs/skydio_front_end.yaml index adb0ee549..38ced30ab 100644 --- a/gtsfm/configs/skydio_front_end.yaml +++ b/gtsfm/configs/skydio_front_end.yaml @@ -17,7 +17,7 @@ SceneOptimizer: _target_: gtsfm.frontend.correspondence_generator.image_correspondence_generator.ImageCorrespondenceGenerator matcher: - _target_: gtsfm.frontend.catcher.image_matcher_cacher + _target_: gtsfm.frontend.cacher.image_matcher_cacher matcher_obj: _target_: gtsfm.frontend.matcher.loftr.LOFTR From 99d42624f92925330085666b8d0e243141bea77d Mon Sep 17 00:00:00 2001 From: akshay-krishnan Date: Fri, 28 Jul 2023 02:36:36 -0400 Subject: [PATCH 04/11] add installation --- .github/workflows/benchmark-self-hosted.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/benchmark-self-hosted.yml b/.github/workflows/benchmark-self-hosted.yml index a40ffdab2..6f54604f6 100644 --- a/.github/workflows/benchmark-self-hosted.yml +++ b/.github/workflows/benchmark-self-hosted.yml @@ -53,6 +53,10 @@ jobs: # bash # cache-environment: true # post-cleanup: "all" + - name: Enter gtsfm directory and install it + run: + cd $GITHUB_WORKSPACE + pip install -e . - name: Download third-party weights run: | ./download_model_weights.sh From 6be5d5d05d58b645680f5de2dc17397ce00dae69 Mon Sep 17 00:00:00 2001 From: Akshay Krishnan Date: Thu, 27 Jul 2023 23:43:02 -0700 Subject: [PATCH 05/11] Update benchmark-self-hosted.yml --- .github/workflows/benchmark-self-hosted.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/benchmark-self-hosted.yml b/.github/workflows/benchmark-self-hosted.yml index 6f54604f6..ae88a8d58 100644 --- a/.github/workflows/benchmark-self-hosted.yml +++ b/.github/workflows/benchmark-self-hosted.yml @@ -53,10 +53,9 @@ jobs: # bash # cache-environment: true # post-cleanup: "all" - - name: Enter gtsfm directory and install it + - name: Enter gtsfm directory + install it run: - cd $GITHUB_WORKSPACE - pip install -e . + cd $GITHUB_WORKSPACE && pip install -e . - name: Download third-party weights run: | ./download_model_weights.sh From e70fdba77d0fbe7a536938ca4c75cc4e6671cc81 Mon Sep 17 00:00:00 2001 From: Akshay Krishnan Date: Thu, 27 Jul 2023 23:51:19 -0700 Subject: [PATCH 06/11] netvlad link update --- download_model_weights.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/download_model_weights.sh b/download_model_weights.sh index d1d00eeb0..56d7b1241 100755 --- a/download_model_weights.sh +++ b/download_model_weights.sh @@ -43,4 +43,7 @@ wget $D2NET_CKPT_URL -O $D2NET_WEIGHTS_DIR/d2_tf.pth ##################### NetVLAD ############################# -python thirdparty/hloc/download_netvlad.py \ No newline at end of file +NETVLAD_WEIGHTS_DIR="./thirdparty/hloc/weights" +NETVLAD_CKPT_URL="https://github.com/johnwlambert/gtsfm-datasets-mirror/releases/download/gerrard-hall-100/VGG16-NetVLAD-Pitts30K.mat" +mkdir $NETVLAD_WEIGHTS_DIR +wget $NETVLAD_CKPT_URL -O $NETVLAD_WEIGHTS_DIR/VGG16-NetVLAD-Pitts30K.mat From dc5f00172cd2ad02dbe4380ff69586080ff46568 Mon Sep 17 00:00:00 2001 From: akshay-krishnan Date: Fri, 28 Jul 2023 02:54:11 -0400 Subject: [PATCH 07/11] remove debug lines --- gtsfm/runner/gtsfm_runner_base.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/gtsfm/runner/gtsfm_runner_base.py b/gtsfm/runner/gtsfm_runner_base.py index ac772513c..6cd4d1036 100644 --- a/gtsfm/runner/gtsfm_runner_base.py +++ b/gtsfm/runner/gtsfm_runner_base.py @@ -225,8 +225,6 @@ def setup_ssh_cluster_with_retries(self): def run(self) -> GtsfmData: """Run the SceneOptimizer.""" start_time = time.time() - logging.info('starting runner') - assert False # create dask cluster if self.parsed_args.cluster_config: cluster = self.setup_ssh_cluster_with_retries() From 483ce62e9bd6eea4e9fad174db4d08807d7c5e1b Mon Sep 17 00:00:00 2001 From: Travis Driver Date: Fri, 28 Jul 2023 11:23:37 -0700 Subject: [PATCH 08/11] Move cluster environment settings to new file --- environment_cluster.yml | 59 +++++++++++++++++++++++++++++++++++++++++ environment_linux.yml | 3 +-- 2 files changed, 60 insertions(+), 2 deletions(-) create mode 100644 environment_cluster.yml diff --git a/environment_cluster.yml b/environment_cluster.yml new file mode 100644 index 000000000..73ff22945 --- /dev/null +++ b/environment_cluster.yml @@ -0,0 +1,59 @@ +name: gtsfm-v1 +channels: + # This environment is identical to the default Linux environment except that + # we install a different PyTorch version that works on the cluster. + # + # for priority order, we prefer pytorch as the highest priority as it supplies + # latest stable packages for numerous deep learning based methods. conda-forge + # supplies higher versions of packages like opencv compared to the defaults + # channel. + - pytorch + - conda-forge + - nvidia +dependencies: + # python essentials + - python=3.8 + - pip + # formatting and dev environment + - black + - coverage + - mypy + - pylint + - pytest + - flake8 + - isort + # dask and related + - dask # same as dask[complete] pip distribution + - asyncssh + - python-graphviz + # core functionality and APIs + - matplotlib==3.4.2 + - networkx + - numpy + - nodejs + - pandas + - pillow>=8.0.1 + - scikit-learn + - scipy + - hydra-core + # 3rd party algorithms for different modules + - pytorch-cuda=11.8 + - pytorch + - torchvision>=0.13.0 + - kornia + # io + - h5py + - plotly=4.14.3 + - tabulate + - simplejson + # testing + - parameterized + - pip: + - open3d + - opencv-python>=4.5.4.58 + - pydegensac + - colour + - pycolmap>=0.1.0 + - trimesh[easy] + - gtsam==4.2a8 + - pydot diff --git a/environment_linux.yml b/environment_linux.yml index 227e4f566..c85dadea2 100644 --- a/environment_linux.yml +++ b/environment_linux.yml @@ -34,8 +34,7 @@ dependencies: - scipy - hydra-core # 3rd party algorithms for different modules - - pytorch-cuda=11.8 - - pytorch + - pytorch>=1.12.0 - torchvision>=0.13.0 - kornia # io From ddc35d867fe995b30ba1a94663aa94aa1e4f7452 Mon Sep 17 00:00:00 2001 From: Travis Driver Date: Fri, 28 Jul 2023 11:23:59 -0700 Subject: [PATCH 09/11] Move cluster environment settings to new file --- environment_linux.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/environment_linux.yml b/environment_linux.yml index c85dadea2..0c8d20e2a 100644 --- a/environment_linux.yml +++ b/environment_linux.yml @@ -6,7 +6,6 @@ channels: # channel. - pytorch - conda-forge - - nvidia dependencies: # python essentials - python=3.8 From ff4a53b4a749e216465d6e36b56bb48969ddb4bc Mon Sep 17 00:00:00 2001 From: Travis Driver Date: Fri, 28 Jul 2023 11:29:27 -0700 Subject: [PATCH 10/11] Cleanup --- gtsfm/runner/gtsfm_runner_base.py | 1 + 1 file changed, 1 insertion(+) diff --git a/gtsfm/runner/gtsfm_runner_base.py b/gtsfm/runner/gtsfm_runner_base.py index 6cd4d1036..59521458e 100644 --- a/gtsfm/runner/gtsfm_runner_base.py +++ b/gtsfm/runner/gtsfm_runner_base.py @@ -225,6 +225,7 @@ def setup_ssh_cluster_with_retries(self): def run(self) -> GtsfmData: """Run the SceneOptimizer.""" start_time = time.time() + # create dask cluster if self.parsed_args.cluster_config: cluster = self.setup_ssh_cluster_with_retries() From e7faf63cd02c3caaca9001073e5f848a604897f5 Mon Sep 17 00:00:00 2001 From: Travis Driver Date: Fri, 28 Jul 2023 11:30:33 -0700 Subject: [PATCH 11/11] Cleanup --- environment_linux.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/environment_linux.yml b/environment_linux.yml index 0c8d20e2a..77279c384 100644 --- a/environment_linux.yml +++ b/environment_linux.yml @@ -33,6 +33,7 @@ dependencies: - scipy - hydra-core # 3rd party algorithms for different modules + - cudatoolkit>=10.2 - pytorch>=1.12.0 - torchvision>=0.13.0 - kornia