Skip to content

Commit

Permalink
Update troubleshooting doc, remove from README, fix #206
Browse files Browse the repository at this point in the history
  • Loading branch information
qin-yu committed Feb 26, 2024
1 parent a6bd730 commit b625246
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 79 deletions.
71 changes: 1 addition & 70 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -301,77 +301,8 @@ the boundary signal, we could leverage the fact that one cell contains only one
segmentation strategy and obtain improved segmentation. This workflow is now available in all PlantSeg interfaces.

## Troubleshooting
* If you stumble in the following error message:
```
AssertionError:
The NVIDIA driver on your system is too old (found version xxxx).
Please update your GPU driver by downloading and installing a new
version from the URL: http://www.nvidia.com/Download/index.aspx
Alternatively, go to: http://pytorch.org to install
a PyTorch version that has been compiled with your version
of the CUDA driver.
```
or:
```
raise AssertionError("Torch not compiled with CUDA enabled")
AssertionError: Torch not compiled with CUDA enabled
```
It means that your cuda installation does not match the default in plantseg.
You can check your current cuda version by typing in the terminal
```
cat /usr/local/cuda/version.txt
```
Then you can re-install the pytorch version compatible with your cuda by activating your `plant-seg` environment:
```
conda activate plant-seg
```
and
```
conda install -c pytorch torchvision cudatoolkit=<YOU_CUDA_VERSION> pytorch
```
e.g. for cuda 9.2
```
conda install -c pytorch torchvision cudatoolkit=9.2 pytorch
```

Alternatively one can create the `plant-seg` environment from scratch and ensuring the correct version of cuda/pytorch, by:
```
conda create -n plant-seg -c lcerrone -c abailoni -c cpape -c conda-forge cudatoolkit=<YOU_CUDA_VERSION> plantseg
```

* If you use plantseg from the GUI and you receive an error similar to:
```
RuntimeError: key : 'crop_volume' is missing, plant-seg requires 'crop_volume' to run
```
(or a similar message for any of the other keys)
It might be that the last session configuration file got corrupted or is outdated.
You should be able to solve it by removing the corrupted file `config_gui_last.yaml`.

If you have a standard installation of plantseg, you can remove it by executing on the terminal:
```
$ rm ~/.plantseg_models/configs/config_gui_last.yaml
```

* If you use plantseg from the command line, and you receive an error similar to:
```
RuntimeError: key : 'crop_volume' is missing, plant-seg requires 'crop_volume' to run
```

Please make sure that your configuration has the correct formatting and contains all required keys.
An updated example can be found inside the directory `examples`, in this repository.

* If when trying to execute the Lifted Multicut pipeline you receive an error like:
```
'cannot import name 'lifted_problem_from_probabilities' from 'elf.segmentation.features''
```
The solution is to re-install [elf](https://github.com/constantinpape/elf) via
```
conda install -c conda-forge python-elf
```

* PlantSeg is under active development, so it may happen that the models/configuration files saved in `~/.plantseg_modes`
are outdated. In case of errors related to loading the configuration file, please close the PlantSeg app,
remove `~/.plantseg_models` directory and try again.
See [troubleshooting](https://hci-unihd.github.io/plant-seg/chapters/getting_started/troubleshooting) for a list of common issues and their solutions.

## Tests
In order to run tests make sure that `pytest` is installed in your conda environment. You can run your tests
Expand Down
54 changes: 45 additions & 9 deletions docs/chapters/getting_started/troubleshooting.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,30 @@
# Troubleshooting
# Troubleshooting <!-- omit in toc -->

* If you stumble in the following error message:
- [`Could not load library libcudnn_ops_infer.so.8.`](#could-not-load-library-libcudnn_ops_inferso8)
- [`NVIDIA driver on your system is too old` or `Torch not compiled with CUDA enabled`](#nvidia-driver-on-your-system-is-too-old-or-torch-not-compiled-with-cuda-enabled)
- [`RuntimeError: key : KEY_NAME is missing, plant-seg requires KEY_NAME to run`](#runtimeerror-key--key_name-is-missing-plant-seg-requires-key_name-to-run)
- [`cannot import name 'lifted_problem_from_probabilities'`](#cannot-import-name-lifted_problem_from_probabilities)
- [Other issues](#other-issues)

----

#### `Could not load library libcudnn_ops_infer.so.8.`

If you stumble in the following error message:
```
Could not load library libcudnn_ops_infer.so.8. Error: libcudnn_ops_infer.so.8: cannot open shared object file: No such file or directory
```

Just install `cudnn` by running:
```
$ mamba install -c conda-forge cudnn
```

----

#### `NVIDIA driver on your system is too old` or `Torch not compiled with CUDA enabled`

If you stumble in the following error message:
```
AssertionError:
The NVIDIA driver on your system is too old (found version xxxx).
Expand Down Expand Up @@ -35,10 +59,14 @@ conda install -c pytorch torchvision cudatoolkit=9.2 pytorch

Alternatively one can create the `plant-seg` environment from scratch and ensuring the correct version of cuda/pytorch, by:
```
conda create -n plant-seg -c lcerrone -c abailoni -c cpape -c awolny -c conda-forge cudatoolkit=<YOU_CUDA_VERSION> plantseg
conda create -n plant-seg -c lcerrone -c abailoni -c cpape -c conda-forge cudatoolkit=<YOU_CUDA_VERSION> plantseg
```

* If you use plantseg from the GUI and you receive an error similar to:
----

#### `RuntimeError: key : KEY_NAME is missing, plant-seg requires KEY_NAME to run`

If you use plantseg from the GUI and you receive an error similar to:
```
RuntimeError: key : 'crop_volume' is missing, plant-seg requires 'crop_volume' to run
```
Expand All @@ -51,15 +79,19 @@ If you have a standard installation of plantseg, you can remove it by executing
$ rm ~/.plantseg_models/configs/config_gui_last.yaml
```

* If you use plantseg from the comand line and you receive an error similar to:
If you use plantseg from the command line, and you receive an error similar to:
```
RuntimeError: key : 'crop_volume' is missing, plant-seg requires 'crop_volume' to run
```

Please make sure that your configuratiuon has the correct formatting and contains all required keys.
Please make sure that your configuration has the correct formatting and contains all required keys.
An updated example can be found inside the directory `examples`, in this repository.

* If when trying to execute the Lifted Multicut pipeline you receive an error like:
----

#### `cannot import name 'lifted_problem_from_probabilities'`

If when trying to execute the Lifted Multicut pipeline you receive an error like:
```
'cannot import name 'lifted_problem_from_probabilities' from 'elf.segmentation.features''
```
Expand All @@ -68,6 +100,10 @@ The solution is to re-install [elf](https://github.com/constantinpape/elf) via
conda install -c conda-forge python-elf
```

* PlantSeg is under active development so it may happen that the models/configuration files saved in `~/.plantseg_modes`
----

#### Other issues

* PlantSeg is under active development, so it may happen that the models/configuration files saved in `~/.plantseg_modes`
are outdated. In case of errors related to loading the configuration file, please close the PlantSeg app,
remove `~/.plantseg_models` directory and try again.
remove `~/.plantseg_models` directory and try again.

0 comments on commit b625246

Please sign in to comment.