one4all 排坑记录

news2024/9/25 11:15:08

one4all 排坑记录

  • 任务
    • 踩坑回顾
      • 动作
      • 踩坑
      • 动作
      • 踩坑
      • 动作
      • 新一步
      • 测试Habitat-sim
    • 测试habitat-lab
    • 继续ONE4ALL

任务

看了《One-4-All: Neural Potential Fields for Embodied Navigation》这篇论文,感觉挺有意思,他也开源了代码。视觉语言导航是我一直想做的事情,这个项目用的也是Habitat这个仿真环境,我看很多做VLN的都用这个环境。尝试复现这个项目,然后搞清楚Habitat环境是怎么回事。

踩坑回顾

没有说的,就是按照原项目readme做的

动作

  1. 照例,新建文件夹,然后git clone
  2. readme说用venv创建虚拟环境,但我习惯用conda了,所以:
conda create -n ONE4ALL python=3.10
conda activate ONE4ALL

踩坑

安装依赖时:

pip3 install -r requirements.txt

报错:

Running command git clone --filter=blob:none --quiet https://github.com/facebookincubator/submitit /tmp/pip-install-l7el9026/submitit_2fc7c3624f664ace92cc27ec82088ad7
  fatal: 无法访问 'https://github.com/facebookincubator/submitit/':gnutls_handshake() failed: Error in the pull function.
  error: subprocess-exited-with-error
  
  × git clone --filter=blob:none --quiet https://github.com/facebookincubator/submitit /tmp/pip-install-l7el9026/submitit_2fc7c3624f664ace92cc27ec82088ad7 did not run successfully.
  │ exit code: 128
  ╰─> See above for output.
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× git clone --filter=blob:none --quiet https://github.com/facebookincubator/submitit /tmp/pip-install-l7el9026/submitit_2fc7c3624f664ace92cc27ec82088ad7 did not run successfully.
│ exit code: 128
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

这种问题常遇到,一般是git的代理设置问题,但检查后发现没问题,再次运行,报错:

Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cu113
Collecting submitit (from -r requirements.txt (line 6))
  Cloning https://github.com/facebookincubator/submitit (to revision escape_all) to /tmp/pip-install-4zalxp9i/submitit_20dd99e9b81e4548b972292505b58f6e
  Running command git clone --filter=blob:none --quiet https://github.com/facebookincubator/submitit /tmp/pip-install-4zalxp9i/submitit_20dd99e9b81e4548b972292505b58f6e
  WARNING: Did not find branch or tag 'escape_all', assuming revision or ref.
  Running command git checkout -q escape_all
  error: 路径规格 'escape_all' 未匹配任何 git 已知文件
  error: subprocess-exited-with-error
  
  × git checkout -q escape_all did not run successfully.
  │ exit code: 1
  ╰─> See above for output.
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× git checkout -q escape_all did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

问题在于找不到escape_all这个分支。打开submitit这个项目,发现里面确实没有这个分支。我尝试不指定分支,把requirements命令改为:

git+https://github.com/facebookincubator/submitit#egg=submitit

这个问题没有报错,如果以后出问题,可能就出在这里的版本不对。真实的为啥非要用实验的分支,用稳定的多好。
然后又遇到了其他包的版本错误:

Collecting matplotlib==3.5.1 (from -r requirements.txt (line 16))
  Downloading matplotlib-3.5.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (6.7 kB)
ERROR: Could not find a version that satisfies the requirement numpy==1.22.2 (from versions: 1.24.1, 1.26.3)
ERROR: No matching distribution found for numpy==1.22.2

尝试不指定版本:

pip3 install matplotlib

报错,但是成功安装了:

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
vcstools 0.1.42 requires pyyaml, which is not installed.
wstool 0.1.17 requires pyyaml, which is not installed.
Successfully installed contourpy-1.2.0 cycler-0.12.1 fonttools-4.49.0 kiwisolver-1.4.5 matplotlib-3.8.3 numpy-1.26.4 packaging-23.2 pillow-10.2.0 pyparsing-3.1.1 python-dateutil-2.8.2 six-1.16.0

那就按照提示,补充安装:

pip3 install pyyaml catkin-pkg roskpkg

最后报错:

ERROR: Could not find a version that satisfies the requirement roskpkg (from versions: none)
ERROR: No matching distribution found for roskpkg

找不到就找不到吧,可能也用不到。
继续按照readme手动安装剩下的,不再指定版本了:

pip3 install numpy Pillow pytorch-lightning protobuf scikit-image scipy torch torchvision setuptools pykeops seaborn tensorflow-gpu tensorflow-probability einops prettytable tqdm imageio-ffmpeg

然后torch竟然找不到版本了:

ERROR: Ignored the following versions that require a different python version: 1.6.2 Requires-Python >=3.7,<3.10; 1.6.3 Requires-Python >=3.7,<3.10; 1.7.0 Requires-Python >=3.7,<3.10; 1.7.1 Requires-Python >=3.7,<3.10
ERROR: Could not find a version that satisfies the requirement torch (from versions: none)
ERROR: No matching distribution found for torch

然后我把环境删了重建,一个个包手动install,几乎所有的包都没问题了,只有tensorflow-gpu顽固不化!

Specifications:

  - tensorflow-gpu -> python[version='2.7.*|3.6.*|3.7.*|3.8.*|3.9.*|3.5.*|>=3.5,<3.6.0a0|>=3.6,<3.7.0a0|>=2.7,<2.8.0a0']

Your python: python=3.10

难道只能新建一个低版本python环境,重新安装包了吗?我不服气,网上搜下,看有没有新的希望。宁猜怎么着?还真有!参考博客说,tensorflow2.9适配python3.10.我一看requirements,人家本来就要求的tensorflow-gpu==2.9.1。于是我顺理成章地运行:

pip3 install tensorflow-gpu==2.9.1

解决!
全过程:

pip3 install empy rospkg pyyaml catkin_pkg
pip3 install submitit hydra-submitit-launcher
pip3 install torch torchvision
pip3 install pandas albumentations networkx rich hydra-core hydra-colorlog
pip3 install hydra_optuna_sweeper scikit-learn comet_ml gym imageio matplotlib numpy Pillow pytorch-lightning protobuf scikit-image scipy
pip3 install setuptools pykeops seaborn einops prettytable tqdm imageio-ffmpeg
pip3 install tensorflow-probability
pip3 install tensorflow-gpu==2.9.1

动作

按照readme执行:

pip3 install geomloss

踩坑

readme中的:

cd mazelab
pip3 install -e .
export PYTHONPATH=<path_to>/one4all/:$PYTHONPATH

让我摸不到头脑,明明没有cd mazelab这个目录啊。我一搜,哦,原来有个mazelab的python项目,是用来生成迷宫的:mazelab项目
于是,新建一个目录,进入目录,查看requirements里面的东西我的环境里都有了,然后按照mazelab的readme执行:

pip3 install -e .

于是顺利安装成功:Successfully installed mazelab-0.2.0

动作

按照readme指示,查看cmake版本:

cmake --version

我是:cmake version 3.22.1,满足大于3.10了。
接下来是要安装Habiat了,包含Habitat-sim和Habitat-lab,他都用的源码安装。我看meta的官方仓库,Habitat-sim推荐用conda安装,Habitat-lab要clone下来安装。我头铁,就要按官方的来!
对于Habitat-sim的conda安装,meta给了这么几种选择:
在这里插入图片描述
比较一下发现,基本都是一样的,只有两个区别:如果要bullet,就加上withbullet,如果没有显示器,就加上headless。我有显示器,然后看原本要源码安装的语句python setup.py --bullet --with-cuda build_ext --parallel 8 install --cmake-args="-DUSE_SYSTEM_ASSIMP=ON"也有bullet的字眼,最后habitat-lab的安装要求中也要求执行conda install habitat-sim withbullet -c conda-forge -c aihabitat,于是我选择执行:

conda install habitat-sim withbullet -c conda-forge -c aihabitat

结果是他一直卡在种地方循环,我只能结束掉他:

Collecting package metadata (current_repodata.json): done
Solving environment: unsuccessful initial attempt using frozen solve. Retrying with flexible solve.
Solving environment: unsuccessful attempt using repodata from current_repodata.json, retrying with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: unsuccessful initial attempt using frozen solve. Retrying with flexible solve.

似乎是环境不对,和其他包不兼容。我按照官网要求,建个环境试一试:

conda create -n habitat python=3.9 cmake=3.14.0
conda activate habitat
conda install habitat-sim withbullet -c conda-forge -c aihabitat

发现没有任何问题。那在我的环境里不行,有3中可能:

  • cmake的原因
  • python3.10的原因
  • 其他包的原因
    我决定删掉官方环境,新建一个3.10,不指定cmake的环境:
conda create -n habitat python=3.10
conda activate habitat
conda install habitat-sim withbullet -c conda-forge -c aihabitat

发现不行。说明大概率是python3.10或者cmake问题。
我再进行这个尝试:

conda create -n habitat python=3.10 cmake=3.14.0
conda activate habitat
conda install habitat-sim withbullet -c conda-forge -c aihabitat

发现还是不行。可能和cmake没关系?得要python3.9才行?
再试试python3.9,不指定cmake的:

conda create -n habitat python=3.9
conda activate habitat
conda install habitat-sim withbullet -c conda-forge -c aihabitat

发现没问题。。。还真得python3.9啊。。。
算了我git下来安装!我就不退版本!
按照readme来,执行到

pip3 install -r requirements.txt

基本没问题,有一个版本报错:

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
albumentations 1.4.0 requires numpy>=1.24.4, but you have numpy 1.23.5 which is incompatible.

重新安装这个版本就行:

pip3 install numpy==1.24.4

然后关键一步:

python setup.py --bullet --with-cuda build_ext --parallel 8 install --cmake-args="-DUSE_SYSTEM_ASSIMP=ON"

成功!没有报错。
安装Habitat-Lab,前几步没事,到最后一步出错:

python setup.py develop --all
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --help

error: option --allow-hosts requires argument

按照chatgpt的指示,我运行:

python setup.py develop --all --allow-hosts=*

成功

发现之前没有测试,测试下:

python -m habitat_sim.utils.datasets_download --uids habitat_test_scenes --data-path /home/lcy-magic/VLN_TEST/Habitat_data

报错:

git:'lfs' 不是一个 git 命令。参见 'git --help'

chatgpt说这是没安装Git LFS,于是安装:

sudo apt install git-lfs
git lfs install

再次运行:

python -m habitat_sim.utils.datasets_download --uids habitat_test_scenes --data-path /home/lcy-magic/VLN_TEST/Habitat_data

报错:

stderr: 'fatal: unable to access 'https://huggingface.co/datasets/ai-habitat/habitat_test_scenes.git/': gnutls_handshake() failed: Error in the pull function.'

参照chatgpt的提示执行:

git remote set-url origin git@huggingface.co:datasets/ai-habitat/habitat_test_scenes.git

然后再下载就没问题了。
执行这个语句时候又出错了:

python examples/viewer.py --scene /home/lcy-magic/VLN_TEST/Habitat_data/scene_datasets/habitat-test-scenes/skokloster-castle.glb

报错:

EGL: Failed to get EGL display: Success
Platform::GlfwApplication::tryCreate(): cannot create a window with core OpenGL context, falling back to compatibility context
EGL: Failed to get EGL display: Success
Platform::GlfwApplication::tryCreate(): cannot create a window with OpenGL context

可是运行这个就没问题:

./build/viewer /home/lcy-magic/VLN_TEST/Habitat_data/scene_datasets/habitat-test-scenes/skokloster-castle.glb

有人遇到了相同的问题,发了issue:参考issue。太长了,明天再看。
首先,我把原来的数据库删了,重新在默认位置下载了,因为改语句麻烦,然后开始看issue排查问题:
首先检查安装GLVND,他是一个用于管理OpenGL的函数库:

sudo apt install libglvnd-dev
glxinfo | grep OpenGL

发现我安装好了,没问题。但是intel的,可能是这个问题:

OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) Graphics (ADL GT2)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 21.2.6
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.6 (Compatibility Profile) Mesa 21.2.6
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 21.2.6
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:

这篇博客参考博客说,可以用Bumblebee切换显卡。安装Bumblebee,N卡驱动,并进行配置:

sudo apt install bumblebee primus nvidia-prime
sudo gedit /etc/bumblebee/bumblebee.conf

把配置改为:

Driver=nvidia

重启bumblebee服务:

sudo systemctl restart bumblebeed

执行完后等一会儿,我就是太急了直接强制关机,导致驱动掉了,进不去图形界面。最后是ctrl+alt+fn+f2进入tty界面,然后安装了525版本驱动再重启才好的(我用推荐的驱动没有用,最后看别人用525我也试一试没想到解决了)。
然后我重启,好像没用,而且我的笔记本外接显示器也不识别了,然后我又运行了:

sudo prime-select nvidia

再次重启,两个显示器都正常显示了,而且:
在这里插入图片描述
可能就是应该用这个语句,感谢这个博客参考博客
如果要换回核显,就:sudo prime-select intel
不知道有没有,随时指定用哪种显卡的方式。
这时候再回去运行:

./build/viewer /home/lcy-magic/VLN_TEST/habitat-sim/data/scene_datasets/habitat-test-scenes/skokloster-castle.glb
python examples/viewer.py --scene /home/lcy-magic/VLN_TEST/habitat-sim/data/scene_datasets/habitat-test-scenes/skokloster-castle.glb

在这里插入图片描述

新一步

接下来要生成数据和训练了。原文说:

We’ll use the Habitat simulator for data generation and navigation. You first need to download the relevant scenes (at least Annawan) from the official Gibson repositiory. Make sure to put the relevant .glb and .navmesh files under the data_habitat/versioned_data/habitat_test_scenes_1.0 directory.

我就填了PDF表,提交上去,然后下载了最小的那个给habitat的数据集。后面遇到了很多波折,运行不起来。还是先验证着仿真环境吧,说不定是这里面的问题。

测试Habitat-sim

前面测试过这俩没问题:

/home/lcy-magic/VLN_TEST/habitat-sim/build/viewer /home/lcy-magic/VLN_TEST/habitat-sim/data/scene_datasets/habitat-test-scenes/skokloster-castle.glb
python /home/lcy-magic/VLN_TEST/habitat-sim/examples/viewer.py --scene /home/lcy-magic/VLN_TEST/habitat-sim/data/scene_datasets/habitat-test-scenes/skokloster-castle.glb

然后物理交互测试:

python -m habitat_sim.utils.datasets_download --uids replica_cad_dataset
/home/lcy-magic/VLN_TEST/habitat-sim/build/viewer /home/lcy-magic/VLN_TEST/habitat-sim/data/scene_datasets/habitat-test-scenes/skokloster-castle.glb
python /home/lcy-magic/VLN_TEST/habitat-sim/src_python/habitat_sim/utils/datasets_download.py --uids replica_cad_dataset
/home/lcy-magic/VLN_TEST/habitat-sim/build/viewer --enable-physics --dataset /home/lcy-magic/VLN_TEST/habitat-sim/data/replica_cad/replicaCAD.scene_dataset_config.json -- apt_1
python /home/lcy-magic/VLN_TEST/habitat-sim/examples/viewer.py --dataset /home/lcy-magic/VLN_TEST/habitat-sim/data/replica_cad/replicaCAD.scene_dataset_config.json --scene apt_1

没问题
测试非交互式:

python /home/lcy-magic/VLN_TEST/habitat-sim/examples/example.py --scene /home/lcy-magic/VLN_TEST/habitat-sim/data/scene_datasets/habitat-test-scenes/skokloster-castle.glb

测试benchmark:
数据可以这么获取:

wget http://dl.fbaipublicfiles.com/habitat/mp3d_example.zip

执行:

python /home/lcy-magic/VLN_TEST/habitat-sim/examples/benchmark.py --scene /home/lcy-magic/VLN_TEST/habitat-sim/data/mp3d_example/17DRP5sb8fy/17DRP5sb8fy.glb

报错:

---------------------- rgb ------------------------ 
Traceback (most recent call last):
  File "/home/lcy-magic/VLN_TEST/habitat-sim/examples/benchmark.py", line 120, in <module>
    perf[key] = demo_runner.benchmark(settings)
  File "/home/lcy-magic/VLN_TEST/habitat-sim/examples/demo_runner.py", line 395, in benchmark
    perfs = pool.map(self._bench_target, range(nprocs))
  File "/home/lcy-magic/anaconda3/envs/ONE4ALL/lib/python3.10/multiprocessing/pool.py", line 367, in map
    return self._map_async(func, iterable, mapstar, chunksize).get()
  File "/home/lcy-magic/anaconda3/envs/ONE4ALL/lib/python3.10/multiprocessing/pool.py", line 774, in get
    raise self._value
  File "/home/lcy-magic/anaconda3/envs/ONE4ALL/lib/python3.10/multiprocessing/pool.py", line 540, in _handle_tasks
    put(task)
  File "/home/lcy-magic/anaconda3/envs/ONE4ALL/lib/python3.10/multiprocessing/connection.py", line 206, in send
    self._send_bytes(_ForkingPickler.dumps(obj))
  File "/home/lcy-magic/anaconda3/envs/ONE4ALL/lib/python3.10/multiprocessing/reduction.py", line 51, in dumps
    cls(buf, protocol).dump(obj)
TypeError: cannot pickle '_magnum.Color4' object

而运行:

python /home/lcy-magic/VLN_TEST/habitat-sim/examples/example.py --scene /home/lcy-magic/VLN_TEST/habitat-sim/data/mp3d_example/17DRP5sb8fy/17DRP5sb8fy.glb
python /home/lcy-magic/VLN_TEST/habitat-sim/examples/example.py --scene /home/lcy-magic/VLN_TEST/habitat-sim/data/mp3d_example/17DRP5sb8fy/17DRP5sb8fy.glb --enable_physics

是没问题的。害又卡在这里了。

测试habitat-lab

运行:

python /home/lcy-magic/VLN_TEST/habitat-lab/examples/example.py

没问题。中间遇到了以前遇到过的问题,老办法解决就行:
在这里插入图片描述
运行:

python /home/lcy-magic/VLN_TEST/habitat-lab/examples/interactive_play.py --never-end

提示我没有Pygame,安装:

pip3 install pygame

运行后又说我没有Pybullet,安装:

pip3 install pybullet

再运行,还是有报错:

X Error of failed request:  BadAccess (attempt to access private resource denied)
  Major opcode of failed request:  152 (GLX)
  Minor opcode of failed request:  5 (X_GLXMakeCurrent)
  Serial number of failed request:  178
  Current serial number in output stream:  178

habitat-lab的readme说:

Note: Interactive testing currently fails on Ubuntu 20.04 with an error: X Error of failed request: BadAccess (attempt to access private resource denied). We are working on fixing this, and will update instructions once we have a fix. The script works without errors on MacOS.

麻了,看来近期没戏了。

继续ONE4ALL

想直接跳到navigation看效果,按reame指示下载,并整理目录。
下载下来是个压缩包,解压后就叫components,正是他要的目录。但是原本这个项目就有一个这个目录。原本的目录是空的,我把新下载的替换掉他。乍一看和readme要求的不一样:

components
└── habitat
    ├── backbone.ckpt
    ├── fk.ckpt
    └── geodesic_regressors
        ├── annawan.ckpt
        ...

但你要用tree命令查看,发现是一样的:

./components/
├── habitat
│   ├── backbone.ckpt
│   ├── fd.ckpt
│   └── geodesic_regressors
│       ├── aloha.ckpt
│       ├── annawan.ckpt
│       ├── cantwell.ckpt
│       ├── dunmor.ckpt
│       ├── eastville.ckpt
│       ├── hambleton.ckpt
│       ├── nicut.ckpt
│       └── sodaville.ckpt
└── jackal
    ├── backbone.ckpt
    ├── backbone_finetuned.ckpt
    ├── fd.ckpt
    └── gr.ckpt

3 directories, 14 files

接下来运行:

ython /home/lcy-magic/VLN_TEST/one4all/run_habitat.py policy=habitat_o4a env=habitat sim_env=Annawan difficulty=hard test_params.n_trajectories=10

报错:

Traceback (most recent call last):
  File "/home/lcy-magic/VLN_TEST/one4all/run_habitat.py", line 10, in main
    from src.run_habitat import run_habitat
  File "/home/lcy-magic/VLN_TEST/one4all/src/run_habitat.py", line 17, in <module>
    from src import utils
  File "/home/lcy-magic/VLN_TEST/one4all/src/utils/__init__.py", line 146, in <module>
    logger: List[pl.loggers.LightningLoggerBase],
AttributeError: module 'pytorch_lightning.loggers' has no attribute 'LightningLoggerBase'

Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.

糟糕,看似是pytorch_lightning版本问题。
看requirements要求的是1.6.0,结果我的:

pip3 show pytorch_lightning

是2.2.0的。

Name: pytorch-lightning
Version: 2.2.0.post0
Summary: PyTorch Lightning is the lightweight PyTorch wrapper for ML researchers. Scale your models. Write less boilerplate.
Home-page: https://github.com/Lightning-AI/lightning
Author: Lightning AI et al.
Author-email: pytorch@lightning.ai
License: Apache-2.0
Location: /home/lcy-magic/anaconda3/envs/ONE4ALL/lib/python3.10/site-packages
Requires: fsspec, lightning-utilities, numpy, packaging, PyYAML, torch, torchmetrics, tqdm, typing-extensions
Required-by:

看来要降版本了。看博客参考博客说,这个功能,1.9的版本后就没有了。我先退到指定版本吧:

pip3 install pytorch_lightning==1.6.0

然后提示可能会有问题:

DEPRECATION: pytorch-lightning 1.6.0 has a non-standard dependency specifier torch>=1.8.*. pip 24.0 will enforce this behaviour change. A possible replacement is to upgrade to a newer version of pytorch-lightning or contact the author to suggest that they release a version with a conforming dependency specifiers. Discussion can be found at https://github.com/pypa/pip/issues/12063

先测试行不行:
报错:

Error executing job with overrides: ['policy=habitat_o4a', 'env=habitat', 'sim_env=Annawan', 'difficulty=hard', 'test_params.n_trajectories=10']
Traceback (most recent call last):
  File "/home/lcy-magic/VLN_TEST/one4all/run_habitat.py", line 17, in main
    return run_habitat(cfg)
  File "/home/lcy-magic/VLN_TEST/one4all/src/run_habitat.py", line 83, in run_habitat
    habitat_config = habitat.get_config(config_paths="conf_habitat/imagenav.yaml")
TypeError: get_config() got an unexpected keyword argument 'config_paths'

Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.

好吧,那就给他设为1吧:

export HYDRA_FULL_ERROR=1

报错信息确实多了,但没啥有用信息,害。看代码:

habitat_config = habitat.get_config(config_paths="conf_habitat/imagenav.yaml")

再去看函数定义的头:

def get_config(
    config_path: str,
    overrides: Optional[List[str]] = None,
    configs_dir: str = _HABITAT_CFG_DIR,
) -> DictConfig:

看来是拼写错误,改成:

habitat_config = habitat.get_config(config_path="conf_habitat/imagenav.yaml")

再运行,开始报新的错误了。报错太长了,应该把之前的环境变量取消掉:

unset HYDRA_FULL_ERROR

再运行,报错:

Error executing job with overrides: ['policy=habitat_o4a', 'env=habitat', 'sim_env=Annawan', 'difficulty=hard', 'test_params.n_trajectories=10']
Traceback (most recent call last):
  File "/home/lcy-magic/VLN_TEST/one4all/run_habitat.py", line 17, in main
    return run_habitat(cfg)
  File "/home/lcy-magic/VLN_TEST/one4all/src/run_habitat.py", line 83, in run_habitat
    habitat_config = habitat.get_config(config_path="conf_habitat/imagenav.yaml")
  File "/home/lcy-magic/VLN_TEST/habitat-lab/habitat-lab/habitat/config/default.py", line 131, in get_config
    with lock, initialize_config_dir(
  File "/home/lcy-magic/anaconda3/envs/ONE4ALL/lib/python3.10/site-packages/hydra/initialize.py", line 170, in __init__
    Hydra.create_main_hydra2(task_name=job_name, config_search_path=csp)
  File "/home/lcy-magic/anaconda3/envs/ONE4ALL/lib/python3.10/site-packages/hydra/_internal/hydra.py", line 68, in create_main_hydra2
    GlobalHydra.instance().initialize(hydra)
  File "/home/lcy-magic/anaconda3/envs/ONE4ALL/lib/python3.10/site-packages/hydra/core/global_hydra.py", line 16, in initialize
    raise ValueError(
ValueError: GlobalHydra is already initialized, call GlobalHydra.instance().clear() if you want to re-initialize

Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.

听起来不严重,是初始化的语句问题。修改为:

GlobalHydra.instance().clear()
habitat_config = habitat.get_config(config_path="conf_habitat/imagenav.yaml")

并在文件开头import:

from hydra.core.global_hydra import GlobalHydra

再次运行,又遇到经典问题:

File "/home/lcy-magic/VLN_TEST/habitat-lab/habitat-lab/habitat/config/default.py", line 85, in patch_config
    sim_config = cfg.habitat.simulator
omegaconf.errors.ConfigAttributeError: Key 'habitat' is not in struct
    full_key: habitat
    object_type=dict

之前运行数据训练的代码就卡在这个地方,真的服了。我看网上别人的config里也都没有habitat这个key啊!

算了,我暂时放弃了,呜呜呜。因为habitat-sim的配置还不太熟悉。打算找个star、fork人多的项目,复现一下,然后学清楚habitat的使用,再回来排错,思路会清晰很多。如果有大佬知道我该怎么办,请不吝指教,谢谢。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1486707.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

CSS_实现三角形和聊天气泡框

如何用css画出一个三角形 1、第一步 写一个正常的盒子模型&#xff0c;先给个正方形的div&#xff0c;便于观察&#xff0c;给div设置宽高和背景颜色 <body><div class"box"></div> </body> <style>.box {width: 100px;height: 100px…

第三百七十九回

文章目录 1. 概念介绍2. 使用方法3. 代码与效果3.1 示例代码3.2 运行效果 4. 内容总结 013pickers2.gif 我们在上一章回中介绍了"如何实现Numberpicker"相关的内容&#xff0c;本章回中将介绍wheelChoose组件.闲话休提&#xff0c;让我们一起Talk Flutter吧。 1. 概念…

sql 注入 之sqli-labs/less-5 双注入,也称:报错注入

该关卡返回正确或者错误页面,还有错误的代码&#xff0c;所以可以使用报错注入。报错注入的方式&#xff1a; updatexml 函数注入&#xff1a; mysql5.1.5 版本以上支持该函数&#xff0c;返回数据限制32位 模板&#xff1a;select * from user where id1 and (updatexml(&q…

MySQL:开始深入其数据(三)DQL的后续

上一章学习mysql语句里的where和join,这一章我们开始分析group by ,having,order by,limit语句。 three,too,one,go! 文章目录 重温select语法having:order by:limit 重温select语法 SELECT [ALL | DISTINCT] { * | table.* | [ table.field1 [ as alias1] [, table.field2 [a…

[通用] iPad 用于 Windows 扩展屏解决方案 Moonlight + Sunshine + Easy Virtual Display

文章目录 前言推流端 Sunshine 安装设置接收端安装 Moonlight安装虚拟屏幕软件 Easy Virtual Display 前言 上期博客讲了如何利用原生的 NVIDIA’s GameStream 传输协议实现 iPad 当作 Windows 副屏&#xff0c;对于非N卡用户&#xff0c;有一个软件 Sunshine 可以代替 Nvidia…

【详识JAVA语言】面向对象程序三大特性之二:继承

继承 为什么需要继承 Java中使用类对现实世界中实体来进行描述&#xff0c;类经过实例化之后的产物对象&#xff0c;则可以用来表示现实中的实体&#xff0c;但是 现实世界错综复杂&#xff0c;事物之间可能会存在一些关联&#xff0c;那在设计程序是就需要考虑。 比如&…

GO泛型相关

通过引入 类型形参 和 类型实参 这两个概念&#xff0c;我们让一个函数获得了处理多种不同类型数据的能力&#xff0c;这种编程方式被称为 泛型编程。 2. Go的泛型 类型形参 (Type parameter)类型实参(Type argument)类型形参列表( Type parameter list)类型约束(Type constr…

【IEEEE会议征稿】第六届下一代数据驱动网络国际学术会议(NGDN 2024)

第六届下一代数据驱动网络国际学术会议&#xff08;NGDN 2024&#xff09; The Sixth International Conference on Next Generation Data-driven Networks 基于前几届在英国埃克塞特 (ISPA 2020) 、中国沈阳 (TrustCom 2021) 和中国武汉(IEEETrustCom-2022)成功举办的经验&a…

048 异常

什么是异常 异常体系结构 异常的继承关系 Error Exception 异常处理机制 try&#xff1a;用{}将可能产生异常的代码包裹catch&#xff1a;与try搭配使用&#xff0c;捕获try包裹代码中抛出的异常并进行后续动作finally&#xff1a;跟在try后&#xff0c;在try和catch之后执行…

使用 Grafana 使用JSON API 请求本地接口 报错 bad gateway(502)解决

一 . 问题&#xff1a; 在用docker部署Grafana 来实现仪表盘的展示&#xff0c;使用到比较多的就是使用JAON API插件调用本地部署的API&#xff0c;比如访问localhost下的 /test_data 接口&#xff0c;一般我们使用的是http://localhost:8080/test_data&#xff0c; 但是在访…

java 使用easyui开发导出excle打开错误

解决&#xff1a; contentType 加字符编码 ;charsetutf-8 就好了

[AutoSar]BSW_Com08 CAN driver 模块介绍及参数配置说明 (一)

目录 关键词平台说明一、缩写和定义二、CAN driver 所在位置三、CAN 模块的主要功能四、功能规格4.1 Driver State Machine4.2 CAN控制器状态机4.3 CAN控制器状态机转换4.3.1 调用function Can_Init 导致的状态转换4.3.2 调用Can_ChangeBaudrate导致的状态转换4.3.3 调用Can_Se…

无穷积分例子

以下几个题容易出错&#xff0c;特意记录一下。 判断积分式的敛散性 ∫ − ∞ ∞ 1 x 2 e 1 x d x \int _{-\infty } ^ {\infty} \frac{1}{x^2} e ^{\frac{1}{x}} dx ∫−∞∞​x21​ex1​dx 要注意瑕点0的处理。无穷积分&#xff0c;一般将积分域按瑕点拆分并分别积分。 判断…

谷粒商城【成神路】-【8】——商品上架

目录 1.数据模型封装 1.es数据模型 2.将es数据模型封装为JAVA bean 3.根据前端发送请求,编写controller 2.模型实现 2.1服务controller 2.2服务service 2.3服务远程调用接口 2.4检索服务controller 2.5检索服务保存到es 2.6库存查询服务 1.数据模型封装 1.es数据模…

Linux多线程服务端编程:使用muduo C++网络库 学习笔记 附录D 关于TCP并发连接的几个思考题与试验

前几天作者在新浪微博上出了两道有关TCP的思考题&#xff0c;引发了一场讨论&#xff08;http://weibo.com/1701018393/eCuxDrtaONn&#xff09;。 第一道初级题目是&#xff1a;有一台机器&#xff0c;它有一个IP&#xff0c;上面运行了一个TCP服务程序&#xff0c;程序只侦听…

STM32学习7 按键扫描

STM32学习7 按键扫描 一、实验电路介绍二、按键GPIO初始化三、扫描原理1. GPIO引脚配置2. 状态轮询3. 按键状态检测4. 循环扫描的优缺点优点&#xff1a;缺点&#xff1a; 四、一次扫描与持续扫描五、代码实现1. 头文件定义2. 函数实现3. 主体函数 一、实验电路介绍 本实验使用…

代码随想录算法训练营第七天

● 自己看到题目的第一想法 第454题.四数相加II 方法&#xff1a; 方法一&#xff1a; 暴力法 思路&#xff1a; 注意&#xff1a; 代码&#xff1a; class Solution { public:int fourSumCount(vector<int>& nums1, vector<int>& nums2, vector<i…

ABB眼中AI推动机器人创新的三大方向

文 | BFT机器人 ABB的历史是一部充满革新与进步的史诗&#xff0c;它的机器人篇章始于1974年&#xff0c;那一年它向世界推出了被誉为“全球首个商用全电动机器人”的IRB 6。时隔半个世纪&#xff0c;ABB的机器人产品线已变得无比强大和多元&#xff0c;囊括了先进的工业机械臂…

OpenAI 与开源多语言嵌入模型

原文地址&#xff1a;OpenAI vs Open-Source Multilingual Embedding Models 选择最适合您的数据的模型 2024 年 2 月 25 日 OpenAI最近发布了他们的新一代embedding模型&#xff0c;称为embeddingv3&#xff0c;他们描述是他们性能最好的embedding模型&#xff0c;具有更高…

MySQL8安装切换密码验证方式

一、MySQL8中新增了一种密码验证方式&#xff1a;caching_sha2_password&#xff0c;如果安装时选择了如下方式&#xff1a; 则数据库使用新的caching_sha2_password密码验证方式。 二、如果安装时选择了caching_sha2_password验证方式&#xff0c;而安装后想发回传统的mysql_…