Skip to content

Try the Optim.jl branch with potential warning fix#79

Closed
juliohm wants to merge 3 commits into
mainfrom
optim-new
Closed

Try the Optim.jl branch with potential warning fix#79
juliohm wants to merge 3 commits into
mainfrom
optim-new

Conversation

@juliohm

@juliohm juliohm commented Apr 25, 2026

Copy link
Copy Markdown
Member

cc: @pkofod

@juliohm juliohm mentioned this pull request Apr 25, 2026
@codecov-commenter

codecov-commenter commented Apr 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.76%. Comparing base (8e8c6c0) to head (91ab4de).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #79   +/-   ##
=======================================
  Coverage   77.76%   77.76%           
=======================================
  Files          47       47           
  Lines        1390     1390           
=======================================
  Hits         1081     1081           
  Misses        309      309           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@juliohm

juliohm commented Apr 25, 2026

Copy link
Copy Markdown
Member Author

I've updated the PR to the latest version of the code. The warnings are still there, and there are test failures with this Optim.jl branch.

Comment thread Project.toml Outdated
Comment thread src/fitting.jl Outdated
juliohm and others added 2 commits June 8, 2026 12:34
Co-authored-by: Patrick Kofod Mogensen <patrick.mogensen@gmail.com>
Co-authored-by: Patrick Kofod Mogensen <patrick.mogensen@gmail.com>
@juliohm

juliohm commented Jun 8, 2026

Copy link
Copy Markdown
Member Author

Thank you @pkofod. It seems that the new implementation doesn't satisfy the box restriction [0, 1]. Some parameters are estimated outside the box in one test.

@pkofod

pkofod commented Jun 9, 2026

Copy link
Copy Markdown

that should definitely not happen, let me see

@pkofod

pkofod commented Jun 9, 2026

Copy link
Copy Markdown

in an error like this https://github.com/JuliaEarth/GeoStatsFunctions.jl/blob/optim-new/src/theoretical/matrices.jl#L30C1-L31C1 I think it would be useful if the error prints the obtained values

@pkofod

pkofod commented Jun 9, 2026

Copy link
Copy Markdown

try to rerun on my latest commit

@juliohm

juliohm commented Jun 9, 2026

Copy link
Copy Markdown
Member Author

@pkofod I've restarted the jobs, but they still fail with the same issue.

Comment thread Project.toml
NearestNeighbors = "0.4"
OhMyThreads = "0.5 - 0.8"
Optim = "2.0"
Optim = "2.0.1"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Optim = "2.0.1"
Optim = "2.1.0"

I suppose it should get it from sources, but for some reason LBFGSB was not available on one runner?

@pkofod

pkofod commented Jun 9, 2026

Copy link
Copy Markdown

ah, only CI with Julia > 1.11 will have sources I believe, so its is bound to fail.

@pkofod

pkofod commented Jun 9, 2026

Copy link
Copy Markdown

if you can print the values in the error branch we can maybe come a bit wiser here

@juliohm

juliohm commented Jun 9, 2026

Copy link
Copy Markdown
Member Author

Thank you. I will look into it after I am done with some tasks I had planned for the week.

@pkofod

pkofod commented Jun 15, 2026

Copy link
Copy Markdown

I released it as v2.2.0

@juliohm

juliohm commented Jun 15, 2026

Copy link
Copy Markdown
Member Author

I will try to take a look into it again today.

@pkofod

pkofod commented Jun 19, 2026

Copy link
Copy Markdown

I think it's a corner case where all these

are driven to exactly 0. Then you get 0/0 => NaN. LBFGSB can literally step to the bound.

@pkofod

pkofod commented Jun 19, 2026

Copy link
Copy Markdown

you could reparameterize such that the proportions were just unconstrained z and then use a p = softmax(z). I'm not sure how you build the gradients, but if you write them up you need to adjust for the transformation of course. Alternatively, you can add a very small lower bound, but then no proportions can be truly zero. This would rule out maxproportions though, I don't think that can be expressed.

@juliohm

juliohm commented Jun 19, 2026

Copy link
Copy Markdown
Member Author

Closing in favor of #85

@juliohm juliohm closed this Jun 19, 2026
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 this pull request may close these issues.

3 participants