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

ClapeyronHANNA fails to load #346

Closed
longemen3000 opened this issue Mar 8, 2025 · 1 comment · Fixed by #347
Closed

ClapeyronHANNA fails to load #346

longemen3000 opened this issue Mar 8, 2025 · 1 comment · Fixed by #347

Comments

@longemen3000
Copy link
Member

discovered in ClapeyronHANNA tests.

┌ Warning: some parameters could not be resolved for type Transformers.Layers.Dense{NNlib.#gelu,Matrix{Float32},Vector{Float32}}; reconstructing
└ @ JLD2 ~/.julia/packages/JLD2/nPYlZ/src/data/reconstructing_datatypes.jl:570
┌ Warning: type NNlib.#gelu does not exist in workspace; reconstructing
└ @ JLD2 ~/.julia/packages/JLD2/nPYlZ/src/data/reconstructing_datatypes.jl:458
HANNA: Error During Test at /home/runner/work/Clapeyron.jl/Clapeyron.jl/lib/ClapeyronHANNA/test/runtests.jl:4
  Got exception outside of a @test
  MethodError: objects of type JLD2.ReconstructedMutable{Symbol("Transformers.Layers.Dense{#gelu,Matrix{Float32},Vector{Float32}}"), (:σ, :W, :b), Tuple{JLD2.ReconstructedSingleton{Symbol("#gelu")}, Any, Any}} are not callable
  The object of type `JLD2.ReconstructedMutable{Symbol("Transformers.Layers.Dense{#gelu,Matrix{Float32},Vector{Float32}}"), (:σ, :W, :b), Tuple{JLD2.ReconstructedSingleton{Symbol("#gelu")}, Any, Any}}` exists, but no method is defined for this combination of argument types when trying to treat it as a callable object.

probable cause: FluxML/NNlib.jl#631
probable fix: FluxML/NNlib.jl#632

@se-schmitt
Copy link
Contributor

I've already implemented the "fix" for this. Actually, this is a fix of the underlying ChemBERT model by using gelu_erf. ClapeyronHANNA now agrees with the Python version within numerical accuracy.

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

Successfully merging a pull request may close this issue.

2 participants