GithubHelp home page GithubHelp logo

Comments (7)

MaximilianPi avatar MaximilianPi commented on September 25, 2024

No, cuda is not required, this error should only appear if you try to use the gpu device without having one.
Did you set device='gpu' in sjSDM? Could you please post code to reproduce this error?

Anyway, I set another cuda checker into the python core to overrule the device field.

from s-jsdm.

frmunoz avatar frmunoz commented on September 25, 2024

I am quite confused, because I first installed the package with "gpu" option, and I could perform the model earlier today (meaning my computer could handle that).
Only with the latest version I have had the error message.

from s-jsdm.

florianhartig avatar florianhartig commented on September 25, 2024

Hi Francois, while Max is helping you with your problem, I just wanted to say that we really appreciate these error messages, to optimize the install procedure (which is indeed tricky, because of all the python dependencies)

from s-jsdm.

MaximilianPi avatar MaximilianPi commented on September 25, 2024

Hi Francois,
I agree with Florian. Many thanks for your patience .

I first installed the package with "gpu" option

Yes, you can install the pytorch GPU version even if you have no NVIDIA GPU (the only difference between the cpu and gpu PyTorch version is that the cpu version comes without the cuda stuff (~500mb))

At this point, do you use a saved model or a model from a old/previous session? I changed in last commits a few global variables which might conflict with saved/old models from previous R sessions.
Are you able to run in a fresh session the sjSDM example?:

# Basic workflow:
## simulate community:
com = simulate_SDM(env = 3L, species = 5L, sites = 100L)

## fit model:
model = sjSDM(Y = com$response,env = com$env_weights, iter = 10L)
predict(model)
predict(model, newdata=com$env_weights)

from s-jsdm.

frmunoz avatar frmunoz commented on September 25, 2024

I have run this example, and it works, unless I have the following warning,

..\torch\csrc\utils\tensor_numpy.cpp:141: UserWarning: The given NumPy array is not writeable, and PyTorch does not support non-writeable tensors. This means you can write to the underlying (supposedly non-writeable) NumPy array using the tensor. You may want to copy the array to protect its data or make it writeable before converting it to a tensor. This type of warning will be suppressed for the rest of this program.

from s-jsdm.

frmunoz avatar frmunoz commented on September 25, 2024

Hi Francois, while Max is helping you with your problem, I just wanted to say that we really appreciate these error messages, to optimize the install procedure (which is indeed tricky, because of all the python dependencies)

Hello Florian,
I am happy if my feedback can be helpful. :-)
Many thanks to Max and you for the wonderful work you have done for building this package!
I am very excited and motivated to use this.
All the best,
François

from s-jsdm.

MaximilianPi avatar MaximilianPi commented on September 25, 2024

Hi Francois,
weird, the warning shouldn't appear with the latest pkg version. But for now you can safely ignore this warning (which is caused by transferring the R objects to the python functions but does not influence the model fitting).

I suggest that you rerun your analysis with the latest pkg version (re-install the sjSDM package - but there's no need to run install_sjSDM again) and let's how it goes

from s-jsdm.

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.