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

Make has_original_jac check original_jac #862

Merged
merged 3 commits into from
Aug 11, 2023

Conversation

oxinabox
Copy link
Contributor

@oxinabox oxinabox commented Aug 9, 2023

It seems to me that this makes more sense as a definition. And that doing it this way, makes my code work.
(though I haven't checked correctness)

Whereas without this, the branch is hit that tries to compute the original jacobian via finite differencing (with autodiff=false, autojacvec=false, autojacmat=false)

It seems to me that this makes more sense as a definition.
And that doing it this way, makes my code work.
(though I haven't checked correctness)

Whereas without this, the branch is hit that tries to compute the original jacobian via finite differencing (with `autodiff=false, autojacvec=false, autojacmat=false`)
Copy link

@ai-maintainer ai-maintainer bot left a comment

Choose a reason for hiding this comment

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

AI-Maintainer Review for PR - Make has_original_jac check original_jac

Title and Description 👍

The title and description provide a general understanding of the changes

The title and description of the pull request give a basic understanding of the changes. They indicate that the has_original_jac function has been updated to check S.original_jac instead of S.jac. However, it would be beneficial to provide more context and detail about why this change is necessary and what problem it solves.

Scope of Changes 👍

The changes are narrowly focused

The changes in this pull request are narrowly focused on a specific issue. The diff shows a modification to the has_original_jac function, updating its definition to check S.original_jac instead of S.jac. There is no evidence of the author trying to resolve multiple issues simultaneously.

Testing 👎

Testing details are missing

The description does not provide any information about how the changes were tested. It would be beneficial for you to include details about the testing approach you used, such as specific test cases or scenarios you considered, to ensure the changes are functioning as intended.

Suggested Changes

  1. Please provide more context in the PR description about why this change is necessary and what problem it solves.
  2. Include details about how you tested the changes. This could be specific test cases or scenarios you considered.

Thank you for your contribution!

Reviewed with AI Maintainer

@ChrisRackauckas
Copy link
Member

Can you add a test for this?

prob = ODEForwardSensitivityProblem(f, [1.0; 1.0], (0.0, 10.0), p, absolutely_no_ad_sensealg)
@test SciMLSensitivity.has_original_jac(prob.f)
@assert jac_call_count == 0
solve(prob, Tsit5(), abstol = 1e-14, reltol = 1e-14)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This actually errors, without this change.
Which I think might be an unrelated bug. Not sure

@oxinabox
Copy link
Contributor Author

oxinabox commented Aug 9, 2023

tests failing seem to be unrelated.
I think they are the same ones as in #857

@oxinabox
Copy link
Contributor Author

bump

@ChrisRackauckas ChrisRackauckas merged commit 4496fb6 into SciML:master Aug 11, 2023
19 of 22 checks passed
Comment on lines +245 to +252
absolutely_no_ad_sensealg = ForwardSensitivity(autodiff = false,
autojacvec = false,
autojacmat = false)
prob = ODEForwardSensitivityProblem(f,
[1.0; 1.0],
(0.0, 10.0),
p,
absolutely_no_ad_sensealg)
Copy link
Member

Choose a reason for hiding this comment

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

Shit I didn't check this. This looks to be the wrong format.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just used julia formatter with the SciMLStyle

@oxinabox oxinabox mentioned this pull request Aug 15, 2023
@oxinabox oxinabox mentioned this pull request Aug 25, 2023
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.

2 participants