JanEGerken / HEAL-SWIN

Reference implementation of the spherical vision transformer HEAL-SWIN
MIT License
30 stars 3 forks source link

About Train Error #3

Closed spa-yhson closed 1 month ago

spa-yhson commented 1 month ago

Dear author,

Hello, I am writing to express my gratitude for your excellent research showcased in your paper. Along with my appreciation, I would like to ask about the error encountered when run your code.

I used python run.py --env local train command to train your model, but I encountered following error:

Could not import current_environment.py
Using default environment with defaults from local_environment.py
--------- Compute environment --------
Using environment specified in /media/HEAL-SWIN/compute_environment/local_environment.py
Project paths:
  datasets: /media/HEAL-SWIN/datasets /media/yhson/2c4a7dd4-f03e-462b-a004-60607e96489a/bdkim/HEAL-SWIN/datasets
  mlruns: /media/HEAL-SWIN/mlruns /media/yhson/2c4a7dd4-f03e-462b-a004-60607e96489a/bdkim/HEAL-SWIN/mlruns
  containers: /media/HEAL-SWIN/containers /media/yhson/2c4a7dd4-f03e-462b-a004-60607e96489a/bdkim/HEAL-SWIN/containers
  slurm: /media/HEAL-SWIN/slurm /media/yhson/2c4a7dd4-f03e-462b-a004-60607e96489a/bdkim/HEAL-SWIN/slurm
  matplotlib_cache: /media/HEAL-SWIN/mpl_cache /media/yhson/2c4a7dd4-f03e-462b-a004-60607e96489a/bdkim/HEAL-SWIN/mpl_cache
Container specifications:
  singularity_container_name: heal_swin_container.sif
Logging specifications:
  mlflow_backend: filesystem
**** These values can be specified by creating (or copying) a new file current_environnment.py ****

running: python3 -u /media/HEAL-SWIN/heal_swin/train.py
Traceback (most recent call last):
  File "/media/HEAL-SWIN/heal_swin/train.py", line 24, in <module>
    from heal_swin.utils import get_paths, serialize, utils
ModuleNotFoundError: No module named 'heal_swin'

Could you please tell me how to resolve this?

Thank you so much for your time.

JanEGerken commented 1 month ago

Thanks a lot for your interest in our work!

Did you run the commands in the "Install dependencies using pip" section of the readme file and were there any errors?

spa-yhson commented 1 month ago

I have resolved the previous issue. Now I have a question regarding evaluation process. I have used python run.py --env local evaluate --config_path ./heal_swin/run_configs/segmentation/evaluate_all_config.py command.

Below is the error I received:

  File "/home/Documents/HEAL-SWIN/heal_swin/utils/utils.py", line 136, in get_artifacts_path
    raise RuntimeError(f"The specified run_id {run_id} wasn't found")
RuntimeError: The specified run_id  wasn't found

How to resolve this?

JanEGerken commented 1 month ago

Great to read that you could run the training. I’ve also pushed a fix with an updated flake8 version in setup.py.

The run id refers to the id in MLFlow under which the run was logged. It is read from the environment variable RUN_ID. So, if you run

export RUN_ID=<<MLFLow run id>>; python run.py --env local evaluate --config_path ./heal_swin/run_configs/segmentation/evaluate_all_config.py

it should work.

spa-yhson commented 1 month ago

Thank you so much for your assistance. I have one final question regarding the sharing of model weights. Would it be possible to obtain the saved weights referenced in the paper?

JanEGerken commented 1 month ago

At the moment, we don’t plan to release the weights, sorry. But we provide the exact training configurations which produced the published results, see the documentation here: https://github.com/JanEGerken/HEAL-SWIN/tree/master/heal_swin#training-config-files . If you have trouble reproducing our results, please let me know!