one4all 排坑记录

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.mfbz.cn/a/426388.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

重学SpringBoot3-自动配置机制

重学SpringBoot3-自动配置机制 引言Spring Boot 自动配置原理示例&#xff1a;Spring Boot Web 自动配置深入理解总结相关阅读 引言 Spring Boot 的自动配置是其最强大的特性之一&#xff0c;它允许开发者通过最少的配置实现应用程序的快速开发和部署。这一切都得益于 Spring …

JCL中IEFBR14和COND

JCL中IEFBR14和COND ​ COND CODE&#xff0c;就是反映JCL中STEP运行状态的参数&#xff0c;JCL正常终了的COND CODE 是0000&#xff0c;另外笔者在执行某些工具JCL时候&#xff0c;比方说简单一个COMPARE吧&#xff0c;可能会出现0012、0004或者0016&#xff0c;0001&#xf…

linux安全--DNS欺骗,钓鱼网站搭建

目录 一&#xff0c;实验准备 首先让client能上网 1&#xff09;实现全网互通&#xff0c;实现全网互通过程请看 2&#xff09;SNAT源地址转换 3&#xff09;部署DHCP服务 4)配置DHCP服务 5&#xff09;启动服务 6&#xff09;安装DNS服务 7&#xff09;DNS配置 8)启动DNS…

代码随想录第46天|● 121. 买卖股票的最佳时机 ● 122.买卖股票的最佳时机II

文章目录 ● 121. 买卖股票的最佳时机思路一&#xff1a;贪心&#xff08;效率最快&#xff09;代码&#xff1a; 思路二&#xff1a;动态规划-dp数组代码&#xff1a; 思路三&#xff1a;动态规划 常数储存代码&#xff1a; ● 122.买卖股票的最佳时机II思路一&#xff1a;动态…

rocky使用yum安装msyql8.0

先查看一下源是否有mysql和mysql的版本 yum list mysql* 直接yum install mysql-server 会安装相关7个包 安装完毕后systemctl start mysqld启动mysql 然后mysql_secure_installation配置权限 mysql8的配置稍微有点不一样&#xff0c;按照英文提示来就行&#xff0c;不会的…

华为配置攻击检测功能示例

配置攻击检测功能示例 组网图形 图1 配置攻击检测功能示例组网图 业务需求组网需求数据规划配置思路配置注意事项操作步骤配置文件 业务需求 企业用户通过WLAN接入网络&#xff0c;以满足移动办公的最基本需求。且在覆盖区域内移动发生漫游时&#xff0c;不影响用户的业务使用。…

Mysql实战(1)之环境安装

1&#xff0c;进入&#xff1a;MySQL :: MySQL Downloads 2&#xff0c; 3&#xff0c; 4&#xff0c;

STM32用标准库编写按键控制LED灯的proteus仿真

首先打开proteus仿真软件&#xff0c;绘制电路图&#xff1a; 或是下载我已经建立好的工程修改&#xff1a; 链接&#xff1a;https://pan.baidu.com/s/1Nx5p3Tif6eHBIVkcPfsj9w?pwd1234 提取码&#xff1a;1234 第一步复制整个工程文件夹&#xff0c;就不用重新配置的辛苦…

解决虚拟机启动报错:“End kernel panic - not syncing: attempted to kill the idle task”

原本能正常运行的虚拟机&#xff0c;很长一段时间没用后&#xff0c;今天再次启动&#xff0c;然后就出现下面的问题&#xff1a; 然后走了一些弯路&#xff0c;比如说删除该虚拟机然后新建一个虚拟机&#xff08;问题未解决&#xff09;、直接删除VitualBox重新安装&#xff0…

【SQL】1321. 餐馆营业额变化增长(自连接;窗口函数rows between 、range between)

前述 窗口函数相关知识推荐阅读&#xff1a; 通俗易懂的学会&#xff1a;SQL窗口函数 窗口函数rows between 、range between的使用 MySQL中的DATEDIFF()函数 mysql data类型的加减 常用函数&#xff1a; ROUND() 函数&#xff1a;用于将数值四舍五入到指定的小数位数。FLOO…

【Linux网络命令系列】ping curl telnet三剑客

&#x1f49d;&#x1f49d;&#x1f49d;欢迎来到我的博客&#xff0c;很高兴能够在这里和您见面&#xff01;希望您在这里可以感受到一份轻松愉快的氛围&#xff0c;不仅可以获得有趣的内容和知识&#xff0c;也可以畅所欲言、分享您的想法和见解。 推荐:kwan 的首页,持续学…

HADOOP HDFS详解

目录 第一章 概述 1.1大数据的特征(4V) 1.2 大数据的应用场景 1.3大数据的发展前景 1.4企业大数据的一般处理流程 1.4.1数据源 1.4.2数据采集或者同步 1.4.3数据存储 1.4.4 数据清洗 1.4.5 数据分析 1.4.6数据展示 第二章 hadoop介绍 2.1.hadoop 目标 2.2 hadoop的…

07OpenCV 图像模糊

文章目录 图像掩膜操作模糊原理均值滤波高斯滤波中值滤波双边滤波算子代码 图像掩膜操作 图像掩膜操作 模糊原理 Smooth/Blur是图像处理中最简单和常用的操作之一 使用操作的原因之一就是为了给图像预处理时候减低噪声 图像噪声是指存在于图像数据中的不必要的或多余的干扰信…

求Sn=a+aa+aaa+aaaa+aaaaa的前n项之和

求Snaaaaaaaaaaaaaaa的前5项之和&#xff0c;其中a是一个数字&#xff0c; 例如&#xff1a;222222222222222 int main() {int a;scanf("%d", &a);int n;scanf("%d", &n);int sum 0;int tmp 0;for (int i 0; i < n; i){tmp tmp * 10 a;sum…

JavaSec 基础之五大不安全组件

文章目录 不安全组件(框架)-Shiro&FastJson&Jackson&XStream&Log4jLog4jShiroJacksonFastJsonXStream 不安全组件(框架)-Shiro&FastJson&Jackson&XStream&Log4j Log4j Apache的一个开源项目&#xff0c;是一个基于Java的日志记录框架。 历史…

检查链表是否有环,返回值为bool和从头节点进入环的第一个节点两种情况

题目1&#xff08;不返回节点&#xff09; 给定单链表&#xff0c;检查链表是否有环。 代码实现&#xff1a; bool IsCircle(List plist) {assert(plist ! NULL);if (plist NULL||plist->nextNULL)return false;Node* p plist->next;//慢指针,一次走一步Node* q pl…

k8s 网络概念与策略控制

一、Kubernetes 基本网络模型 Kubernetes 的容器网络模型可以把它归结为约法三章和四大目标。 1、约法三章 约法三章确保了Kubernetes容器网络模型的基本特性&#xff1a; ① 任意两个 pod 之间可以直接通信&#xff1a;在Kubernetes中&#xff0c;每个 Pod 都被分配了一个…

Ankie聊AI:什么是人工智能?人工智能和普通程序的区别

什么是人工智能&#xff1f; 虽然AI历史很悠久&#xff0c;上个世纪50年代就有各种概念&#xff0c;但是发展很慢。第一次对人类的冲击就是1997年IBM深蓝击败国际象棋世界冠军&#xff0c;引起了人们的广泛关注&#xff0c;之后又销声匿迹。突然间2016人工智能alphaGO战胜了围…

【网站项目】154大学生创新创业平台竞赛管理子系统

&#x1f64a;作者简介&#xff1a;拥有多年开发工作经验&#xff0c;分享技术代码帮助学生学习&#xff0c;独立完成自己的项目或者毕业设计。 代码可以私聊博主获取。&#x1f339;赠送计算机毕业设计600个选题excel文件&#xff0c;帮助大学选题。赠送开题报告模板&#xff…
最新文章