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

Bump compats and update tutorials for Optimization v4 #950

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Vaibhavdixit02
Copy link
Member

Checklist

  • Appropriate tests were added
  • Any code changes were done in a way that does not break public API
  • All documentation related to code changes were updated
  • The new code follows the
    contributor guidelines, in particular the SciML Style Guide and
    COLPRAC.
  • Any new documentation only uses public API

Additional context

Add any other context about the problem here.

docs/src/examples/multiple_shooting.md Outdated Show resolved Hide resolved
docs/src/examples/neural_ode.md Outdated Show resolved Hide resolved
docs/src/examples/neural_ode.md Outdated Show resolved Hide resolved
@@ -34,7 +34,7 @@ Boltz = "1"
ChainRulesCore = "1"
ComponentArrays = "0.15.17"
ConcreteStructs = "0.2"
DataInterpolations = "5, 6"
Copy link
Member

Choose a reason for hiding this comment

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

don't remove 5

Copy link
Member Author

Choose a reason for hiding this comment

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

That causes conflict too, with Symbolics

Copy link
Member Author

Choose a reason for hiding this comment

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

Just saw your comment on the compat PR in Boltz, I'll find a workaround

Copy link
Member

Choose a reason for hiding this comment

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

Why would 5 be needed?

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Fixed

@Vaibhavdixit02
Copy link
Member Author

This is stalled and will likely lead to more people complaining about the Optimization change can we get a decision for it?

@ChrisRackauckas
Copy link
Member

@avik-pal update Boltz?

@avik-pal
Copy link
Member

avik-pal commented Oct 5, 2024

Some tests still fail for DataInterpolations, let me dev and patch those shouldn't be hard.

@avik-pal
Copy link
Member

avik-pal commented Oct 5, 2024

display(l)
global iter
iter += 1
if doplot && iter % 1 == 0
# plot the original data
plt = scatter(tsteps, ode_data[1, :]; label = "Data")

# plot the different predictions for individual shoot
plot_multiple_shoot(plt, preds, group_size)
Copy link
Member

Choose a reason for hiding this comment

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

I don't see how this is going to work if we don't have the predictions?

println(l)
# plot current prediction against data
if doplot
pred = predict_neuralode(state.u)
Copy link
Member

Choose a reason for hiding this comment

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

This is not a viable solution, it doubles the cost. We should show a better standard way to do this.

Copy link
Member Author

Choose a reason for hiding this comment

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

It was the same before the gradient and loss were evaluated separately so I figured it's a fair tradeoff, the current alternative is to use a global variable.

Down the line I plan to improve OptimizationState so it can be hacked for these things, I am not sure how it should be yet but should be possible

Copy link
Member

Choose a reason for hiding this comment

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

We should show a current best practice that does not involve recomputing since that can be quite a regression.

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