Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

version 0.2.2 issue #12

Open
nadisha93 opened this issue Aug 9, 2024 · 14 comments
Open

version 0.2.2 issue #12

nadisha93 opened this issue Aug 9, 2024 · 14 comments

Comments

@nadisha93
Copy link

Hello,

I'm testing the new version at the moment, however I'm running into an issue. I have attached a screenshot of this. Please could you help me with this? I have given targets, masks and templates all at the same sampling rate. Thank you :)
sampling_rate

@maurerv
Copy link
Collaborator

maurerv commented Aug 9, 2024

Hi @nadisha93,

I have not seen that before :) Right off the bat the sampling rate looks odd. Which format is your input data in and what operating system are you working on?

@nadisha93
Copy link
Author

Hi @maurerv

My input data are .mrc files which have all worked before with the previous versions up until yesterday. and I'm working on Ubuntu 20.04. I tried to uninstall and re-install everything to see if it would help but the pytest has 94 fails.
pytest_1
pytest_2

@maurerv
Copy link
Collaborator

maurerv commented Aug 9, 2024

Thanks for the logs :)

The errors listed here are mostly related to CUDA and some deprecated test cases. Neither seems directly related to your issue, though. What did you change in your setup that caused this new behavior? I have run a fair number of experiments myself on the current version and have not yet encountered this issue.

Since I cannot directly reproduce your error we would need to try some things. Could you try to run this example from the docs https://kosinskilab.github.io/pyTME/quickstart/matching/alignment.html. Also feel free to use the --use_gpu flag like you did with your tomograms. If this works its most likely related to the input data.

Could you load your tomogram and send me the output of the following

from tme import Density
data = Density.from_file("/path/to/your/tomo", use_memmap = True)
data.shape
data.sampling_rate
data.origin

Many thanks :)

@nadisha93
Copy link
Author

Thank you so much for your suggestions. Nothing was different except for I was using version 0.2.1. actually sorry, I just realised version is updated to 0.2.3. I installed and ran another pytest, and i have attached the screenshot of the log that looks similar to the previous error I saw with template match.
pytest_3

@maurerv
Copy link
Collaborator

maurerv commented Aug 9, 2024

What cupy version are you on?

@nadisha93
Copy link
Author

I'm using CUDA version 12.2 and installed cupy-cuda12x following the guide. I presume that's the right version to use?

@maurerv
Copy link
Collaborator

maurerv commented Aug 12, 2024

Hi @nadisha93

Yes, that is the correct way to install it. After some digging I found out that numpy version > 2.0 breaks some cupy functions such as the one you raise in your issue. I addressed this in a recent commit (2c868c8) by restricting the numpy version (Achieving compatibility is an ongoing effort in cupy/cupy#8306).

Reinstalling pytme via pip install git+https://github.com/KosinskiLab/pyTME.git should automatically downgrade numpy and fix your issue :)

@maurerv maurerv reopened this Aug 12, 2024
@nadisha93
Copy link
Author

Hi @maurerv,

That's great! I will try this again and see :)

Thank you very much.

@maurerv
Copy link
Collaborator

maurerv commented Aug 12, 2024

Sure, let me know if that solved your issue then I will create the 0.2.3 release :)

If for some reason numpy is not downgraded correctly, you can also do it manually python3 -mpip install --force-reinstall numpy==1.26.4

@nadisha93
Copy link
Author

Hi @maurerv

I reinstalled everything just now. However, the test failed with following errors.
image

@nadisha93
Copy link
Author

Also, started running a test template match anyway and got following error
image

I tried force-reinstall numpy==1.26.4 as you suggested, but still got the sae error

@maurerv
Copy link
Collaborator

maurerv commented Aug 12, 2024

Thank you for providing the screenshots.

So, the first issue with the test cases arises because you are using old tests. For instance, tme.helpers was removed before version 0.2.2 was released. To be on the safe side, delete the directory from which you are running the test cases and clone the repository again (https://kosinskilab.github.io/pyTME/quickstart/installation.html#testing-the-installation) :)

The cupy issue is more complex and not related to pytme. Cupy cant find missing libnvrtc.so.12. That could be because it's actually missing and was not installed with the remaining CUDA tools, or it's just not linked properly. If you are working with linux modules it could also be that you forgot to load a module related that was loaded during installation.

Unfortunately, the cupy issue is too specific to your personal setup for me to be able to provide much help. If possible, consult with your IT department or have a look at the cupy installation instructions, which go over similar issues (https://docs.cupy.dev/en/stable/install.html)

@nadisha93
Copy link
Author

Hi @maurerv,

Thank you so much for your help and suggestions . the installation and test passed okay. However my colleague and I are experiencing a different issue at the moment when trying to creat mask for tomograms. I have added the screenshot below.
IMG_3077
To find out if it was specific to the Cuda versions we tried using different cuda 12 versions but the error seems consistent with all the versions. Could you please look into this? Please let me know if you need any more info.

Thank you!

@maurerv
Copy link
Collaborator

maurerv commented Aug 15, 2024

Hi,

Could you let me know if you clicked on the tomogram you want to mask before pressing the Create mask button? If yes, could you send me a screenshot of the layer list in your Napari viewer? Is there anything special you did before creating the mask?

To find out if it was specific to the Cuda versions we tried using different cuda 12 versions but the error seems consistent with all the versions. Could you please look into this? Please let me know if you need any more info.

I think, in your case, NVRTC is just not linked to a standard location. If you are working from a personal machine, you can adapt your LD_LIBRARY_PATH to include the correct location. There is an open issue showcasing a similar issue on the cupy github cupy/cupy#8317. If you are working in a managed HPC environment, your system admin will be able to inform you of the proper mechanism to include NVRTC :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants