CIA-Oceanix / 4dvarnet-starter

Streamlined version of the 4dvarnet algorithm: probably a good starting point to understand and applying it
8 stars 14 forks source link

According to the dependencies, there is an error during the installation #14

Open Dickerman-coder opened 7 months ago

Dickerman-coder commented 7 months ago

Hello, I encountered an error message saying "unable to run" while using it.

According to the dependencies, there is an error during the installation.

git clone https://github.com/CIA-Oceanix/4dvarnet-starter.git
cd 4dvarnet-starter
conda install -c conda-forge mamba
conda create -n 4dvarnet-starter python=3.8
conda activate 4dvarnet-starter
mamba env update -f environment.yaml

When I run python main.py xp=base, it throws an error.

(4dvarnet-starter) D:\DOWNLOAD\4dvarnet\4dvarnet-starter>python main.py xp=base
Traceback (most recent call last):
  File "C:\Anaconda3\envs\4dvarnet-starter\lib\site-packages\hydra\_internal\utils.py", line 220, in run_and_report
    return func()
  File "C:\Anaconda3\envs\4dvarnet-starter\lib\site-packages\hydra\_internal\utils.py", line 458, in <lambda>
    lambda: hydra.run(
  File "C:\Anaconda3\envs\4dvarnet-starter\lib\site-packages\hydra\_internal\hydra.py", line 105, in run
    cfg = self.compose_config(
  File "C:\Anaconda3\envs\4dvarnet-starter\lib\site-packages\hydra\_internal\hydra.py", line 594, in compose_config
    cfg = self.config_loader.load_configuration(
  File "C:\Anaconda3\envs\4dvarnet-starter\lib\site-packages\hydra\_internal\config_loader_impl.py", line 142, in load_configuration
    return self._load_configuration_impl(
  File "C:\Anaconda3\envs\4dvarnet-starter\lib\site-packages\hydra\_internal\config_loader_impl.py", line 244, in _load_configuration_impl
    parsed_overrides, caching_repo = self._parse_overrides_and_create_caching_repo(
  File "C:\Anaconda3\envs\4dvarnet-starter\lib\site-packages\hydra\_internal\config_loader_impl.py", line 230, in _parse_overrides_and_create_caching_repo
    self._process_config_searchpath(config_name, parsed_overrides, caching_repo)
  File "C:\Anaconda3\envs\4dvarnet-starter\lib\site-packages\hydra\_internal\config_loader_impl.py", line 215, in _process_config_searchpath
    if not source.available():
  File "C:\Anaconda3\envs\4dvarnet-starter\lib\site-packages\hydra\_internal\core_plugins\importlib_resources_config_source.py", line 64, in available
    files = resources.files(self.path)
  File "C:\Anaconda3\envs\4dvarnet-starter\lib\site-packages\importlib_resources\_common.py", line 48, in wrapper
    return func(anchor)
  File "C:\Anaconda3\envs\4dvarnet-starter\lib\site-packages\importlib_resources\_common.py", line 58, in files
    return from_package(resolve(anchor))
  File "C:\Anaconda3\envs\4dvarnet-starter\lib\functools.py", line 875, in wrapper
    return dispatch(args[0].__class__)(*args, **kw)
  File "C:\Anaconda3\envs\4dvarnet-starter\lib\site-packages\importlib_resources\_common.py", line 84, in _
    return importlib.import_module(cand)
  File "C:\Anaconda3\envs\4dvarnet-starter\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 843, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "D:\DOWNLOAD\4dvarnet\4dvarnet-starter\contrib\__init__.py", line 2, in <module>
    import contrib.lorenz63 #noqa
  File "D:\DOWNLOAD\4dvarnet\4dvarnet-starter\contrib\lorenz63\__init__.py", line 1, in <module>
    from contrib.lorenz63.models import percent_err
  File "D:\DOWNLOAD\4dvarnet\4dvarnet-starter\contrib\lorenz63\models.py", line 1, in <module>
    import src.models
  File "D:\DOWNLOAD\4dvarnet\4dvarnet-starter\src\models.py", line 3, in <module>
    import pytorch_lightning as pl
  File "C:\Anaconda3\envs\4dvarnet-starter\lib\site-packages\pytorch_lightning\__init__.py", line 25, in <module>
    from lightning_fabric.utilities.seed import seed_everything  # noqa: E402
  File "C:\Anaconda3\envs\4dvarnet-starter\lib\site-packages\lightning_fabric\__init__.py", line 29, in <module>
    from lightning_fabric.fabric import Fabric  # noqa: E402
  File "C:\Anaconda3\envs\4dvarnet-starter\lib\site-packages\lightning_fabric\fabric.py", line 21, in <module>
    import torch
  File "C:\Anaconda3\envs\4dvarnet-starter\lib\site-packages\torch\__init__.py", line 122, in <module>
    raise err
OSError: [WinError 182] 操作系统无法运行 %1。 Error loading "C:\Anaconda3\envs\4dvarnet-starter\lib\site-packages\torch\lib\nvfuser_codegen.dll" or one of its dependencies.
Dickerman-coder commented 7 months ago

Here is the translation to English: "My English is not very good, sorry. I'm using machine translation, so if there is any misunderstanding, I apologize."

quentinf00 commented 7 months ago

Hi @Dickerman-coder ,

Thank you for raising this issue, I see the issue arises when importing pytorch_lightning, I'll try to reproduce this tomorrow with a fresh install and provide a fix. If the issue is platform dependant (I see you're using windows), it may be harder for me to help... I'll give you an update this week

Dickerman-coder commented 7 months ago

Thank you for your reply

Dickerman-coder commented 7 months ago

@quentinf00 ,Hello, I would like to ask if you have an update on this issue?

quentinf00 commented 7 months ago

Hi @Dickerman-coder, sorry I forgot to come back to you, I made a fresh install on my machine and it worked and I'm not quite sure how to debug the install on windows... sorry about that The issue seems to come from the pytorch install, did you get an error during the install ? Maybe try reinstalling pytorch:

mamba remove pytorch
mamba install  pytorch torchvision  pytorch-cuda=11.8 -c pytorch -c nvidia

Otherwise you can checkout the resolution of these issue which seems to adress the same problem:

https://github.com/XingangPan/DragGAN/issues/126

Hope you manage to make it work !