Coder Social home page Coder Social logo

`sct_deepseg -task seg_spinal_rootlets_t2w` raises `unexpected keyword argument 'perform_everything_on_device'` error about spinalcordtoolbox HOT 3 CLOSED

valosekj avatar valosekj commented on June 26, 2024
`sct_deepseg -task seg_spinal_rootlets_t2w` raises `unexpected keyword argument 'perform_everything_on_device'` error

from spinalcordtoolbox.

Comments (3)

joshuacwnewton avatar joshuacwnewton commented on June 26, 2024 1

On first glance, this looks like an upstream API change with nnunetv2.

  • In requirements.txt, we specify:
    # 2.4.0/2.4.1 fail during inference due to https://github.com/spinalcordtoolbox/spinalcordtoolbox/issues/4444
    nnunetv2!=2.4.0,!=2.4.1
  • The latest version is 2.4.2, released on April 25th, 2024. Given the above specification, we should have been using 2.4.2 for about a month now. Given that there are no recent test failures, I assume that this issue isn't caused by any recent upstream changes.
  • Checking nnUNetPredictor on nnunetv2's master branch shows that perform_everything_on_device is present.
  • However, 6 months ago this argument used to be called perform_everything_on_gpu. This was changed in v2.3.1.

So, my best guess is that you have an older version of nnunetv2 in your local SCT copy (nnunetv2==2.3.0 or below), but SCT's code is meant to work with the newest versions of nnunetv2.

We can definitely amend the requirements.txt file to make this incompatibility clearer, but I would recommend updating your local venv too. :)

from spinalcordtoolbox.

joshuacwnewton avatar joshuacwnewton commented on June 26, 2024 1

Aha! Searching our issues for perform_everything_on_gpu returns:

from spinalcordtoolbox.

valosekj avatar valosekj commented on June 26, 2024 1

Great, thank you! Indeed, I had an older version of nnunetv2 in my local SCT copy.

I pulled the updated requirements.txt, activated the sct_venv and ran pip install -r requirements.txt. And the model is now working!

from spinalcordtoolbox.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.