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

Add ddm_sdv onnx model to 🤗 #412

Open
jainraj opened this issue May 6, 2024 · 3 comments
Open

Add ddm_sdv onnx model to 🤗 #412

jainraj opened this issue May 6, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@jainraj
Copy link

jainraj commented May 6, 2024

HSSM version
0.2.0

To Reproduce

import numpy
import hssm
hssm.set_floatX("float32")
cav_data = hssm.load_data("cavanagh_theta")

Bug 1: Bounds by default

ddm_model = hssm.HSSM(
    data=cav_data,
    model='ddm_sdv',
    p_outlier=0.05,
)

Output:

ValueError: Please specify the prior or bounds for sv.

I think this should be solved by using the right bounds variable in defaults.py - which I see has happened in main brain, but please confirm.

Bug 2: So I proceeded to explicitly give the bounds, but.

ddm_model = hssm.HSSM(
    data=cav_data,    
    model='ddm_sdv',
    p_outlier=0.05,
    include=[
        {
            "name": "sv", 
            "bounds": (0, numpy.inf),
        },
    ],
)
ddm_model.sample()

Output:

TypeError: Invalid dtype for variable sv_interval__. Can not cast to float32 with casting rule no.

Unsure what is causing this.

Bug 3: So I moved to approx_differentiable, but.

ddm_model = hssm.HSSM(
    data=cav_data,    
    model='ddm_sdv',
    loglik_kind='approx_differentiable',
    p_outlier=0.05,
)

Output:

Entry Not Found for url: https://huggingface.co/franklab/HSSM/resolve/main/ddm_sdv.onnx.

I guess the compiled version from Huggingface was removed?

So I moved to blackbox likelihood, but for my actual use case, I have a hierarchical model for t parameter and I am facing the same issue as #411, i.e., high r-hats for all t parameters :(

@digicosmos86
Copy link
Collaborator

Hi @jainraj,

The bounds with ddm_sdv was indeed a bug that was fixed in this PR. However, this change has not yet made into an official release on PyPI yet. You can download the dev version of HSSM with this command pip install git+https://github.com/lnccbrown/HSSM.git.

We'll look into the other bugs. There should be ddm_sdv.onnx on huggingface, so that one is a weird one :).

Thanks!
Paul

@digicosmos86
Copy link
Collaborator

Confirmed that the onnx model for ddm_sdv was not uploaded to HuggingFace. @AlexanderFengler do you have a model that can be uploaded?

@digicosmos86 digicosmos86 added the bug Something isn't working label May 8, 2024
@digicosmos86 digicosmos86 changed the title Issues in ddm_sdv model config Add ddm_sdv onnx model to 🤗 May 13, 2024
@jainraj
Copy link
Author

jainraj commented Jun 21, 2024

Any ETA on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants