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 gradient fixes #446

Merged
merged 7 commits into from
Jul 29, 2021
Merged

Make gradient fixes #446

merged 7 commits into from
Jul 29, 2021

Conversation

SomTambe
Copy link
Contributor

This fixes the issue I mentioned in this comment.
I'll add the tests in a bit.

@SomTambe
Copy link
Contributor Author

It is type unstable.
cc. @johnnychen94 @DhairyaLGandhi

@mkitti
Copy link
Collaborator

mkitti commented Jul 16, 2021

My sense is that a simple fix might not be possible. We might need a more sophisticated mechanism to decide when the arguments might affect the return type. It did not start with your changes

@codecov
Copy link

codecov bot commented Jul 19, 2021

Codecov Report

Merging #446 (4039837) into master (0c85126) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #446      +/-   ##
==========================================
+ Coverage   84.81%   84.83%   +0.01%     
==========================================
  Files          25       25              
  Lines        1646     1648       +2     
==========================================
+ Hits         1396     1398       +2     
  Misses        250      250              
Impacted Files Coverage Δ
src/extrapolation/filled.jl 85.00% <100.00%> (+0.38%) ⬆️
src/b-splines/b-splines.jl 89.52% <0.00%> (+0.10%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0c85126...4039837. Read the comment docs.

@mkitti
Copy link
Collaborator

mkitti commented Jul 19, 2021

Huh. I'll merge it if this works for you. I'll have to study this more closely.

@johnnychen94
Copy link
Contributor

every non-trivial PR should have associated tests

@mkitti
Copy link
Collaborator

mkitti commented Jul 19, 2021

That's a good point. You should add a test for the original issue you cited.

test/runtests.jl Outdated Show resolved Hide resolved
src/extrapolation/filled.jl Show resolved Hide resolved
src/extrapolation/filled.jl Show resolved Hide resolved
@SomTambe
Copy link
Contributor Author

I have no idea what ERROR: Unsatisfiable requirements detected for package FFTW [7a1cc6ca]: means. I added a dependency on ImageCore as Johnny suggested Images would be a heavy/circular dependency. Is it creating the problem? I don't think so.

Copy link
Contributor

@johnnychen94 johnnychen94 left a comment

Choose a reason for hiding this comment

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

I have no idea what ERROR: Unsatisfiable requirements detected for package FFTW [7a1cc6ca]: means.

This is an issue with the old Pkg version; it fails to resolve the possible version when there is one. You can assist the Pkg resolver by coping this part to the github/workflows/CI.yml configuration file; that basically says: okay I need this version of FFTW, you Pkg do the rest and then it finds out one.

Project.toml Outdated Show resolved Hide resolved
@mkitti
Copy link
Collaborator

mkitti commented Jul 25, 2021

Are we picking up a dependency on FFTW?

@johnnychen94
Copy link
Contributor

Are we picking up a dependency on FFTW?

No, but ImageCore and some other packages (e.g., Zygote) depend on it. We just need to manually assist the pkg resolving by explicitly adding them during CI initialization for old Julia versions.

@johnnychen94
Copy link
Contributor

It seems quite complicated here because we want the latest version of Zygote for test purposes but it's really julia >=1.3. I see two possible options:

# in julia-1.0
pkg> add FFTW Zygote ImageCore
Updating `~/tmp/environments/v1.0/Project.toml`
  [7a1cc6ca] + FFTW v1.1.1
  [a09fc81d] + ImageCore v0.9.1
  [e88e6eb3] + Zygote v0.4.22
  [7a1cc6ca] + FFTW v1.1.1
  [a09fc81d] + ImageCore v0.9.1
  [e88e6eb3] + Zygote v0.4.22

@DhairyaLGandhi
Copy link

That's a bit fiddly CI wise - would Interpolations.jl accept a lower bound to Julia 1.3 or 1.6?

What if 1.6 is LTS?

@SomTambe
Copy link
Contributor Author

Wow, changing it to ColorVectorSpace did the job! I think the PR is good to go!

@johnnychen94
Copy link
Contributor

CVS should be in [extras] and not in [deps]

Project.toml is designed in a way that we can manually edit it. You can read more on http://pkgdocs.julialang.org/v1/toml-files/

Copy link
Contributor

@johnnychen94 johnnychen94 left a comment

Choose a reason for hiding this comment

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

I'm not convinced that adding CVS is the right fix. It's better to test these change locally first on Julia-1.0.

.github/workflows/CI.yml Outdated Show resolved Hide resolved
Project.toml Outdated Show resolved Hide resolved
@SomTambe
Copy link
Contributor Author

I will first squash all these previous commits, and then we shall merge.

test/gradient.jl Outdated Show resolved Hide resolved
@SomTambe
Copy link
Contributor Author

I have messed up the rebase badly. I'll fix it asap 😢

…80da2c334b556

parent 5465957
author SomTambe <[email protected]> 1627561237 +0530
committer SomTambe <[email protected]> 1627561307 +0530

# This is a combination of 6 commits.
parent 5465957
author SomTambe <[email protected]> 1627561237 +0530
committer SomTambe <[email protected]> 1627561244 +0530

# This is a combination of 4 commits.
# This is the 1st commit message:

Resolve commits 1

# This is the commit message #2:

Remove ImageCore, add ColorVectorSpace

# This is the commit message #3:

Add ColorVectorSpace for tests, resolve dependency issues

# This is the commit message #4:

Shift CVC to [extras]

# This is the commit message #5:

Rectify silly error

# This is the commit message #6:

Rectify silly error again

# This is the commit message #8:

Rectify the final silly error
author SomTambe <[email protected]> 1627561237 +0530
committer SomTambe <[email protected]> 1627561307 +0530

parent 5465957
author SomTambe <[email protected]> 1627561237 +0530
committer SomTambe <[email protected]> 1627561244 +0530

Resolve commits 1

Remove ImageCore, add ColorVectorSpace

Add ColorVectorSpace for tests, resolve dependency issues

Shift CVC to [extras]

Rectify silly error

Rectify silly error again

Rectify the final silly error

Resolve conflicts

Rectify the final silly error

Resolve conflicts
@SomTambe
Copy link
Contributor Author

I think the PR is finally good to go!
Sorry for taking the time 😅

Copy link
Contributor

@johnnychen94 johnnychen94 left a comment

Choose a reason for hiding this comment

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

Need squash and merge to keep git history clean.

@mkitti mkitti merged commit 31f6d54 into JuliaMath:master Jul 29, 2021
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.

5 participants