-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
Create post-link script to install Julia deps #41
Conversation
Hi! This is the friendly automated conda-forge-linting service. I just wanted to let you know that I linted all conda-recipes in your PR ( |
Could you add this line to conda-forge.yml? azure:
store_build_artifacts: true This would allow us to see what actually gets packaged (by downloading the zipped files from the CI). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you remove this the install step from the build script for now?
Anyway, it is working as intended I believe, the key portion of the CI starts on line 845 Maybe a statement should be printed and a way to cancel...
|
Co-authored-by: ngam <[email protected]>
I wonder what exactly this means... |
Btw, we need to edit your reqs --- something like this is enough I believe or along the lines of what isuruf suggested: https://github.com/conda-forge/staged-recipes/pull/17647/files requirements:
host:
- pip
- python >=3.7
run:
- pyjulia >=0.5.7
- julia <=1.7.1
- numpy
- pandas
- python >=3.7
- scikit-learn >=1.0.0
- sympy |
Hi! This is the friendly automated conda-forge-linting service. I wanted to let you know that I linted all conda-recipes in your PR ( Here's what I've got... For recipe:
|
36b8430
to
748c462
Compare
Hi! This is the friendly automated conda-forge-linting service. I just wanted to let you know that I linted all conda-recipes in your PR ( |
Thanks, all suggestions implemented. Let's see if it works |
Since the deps are changing, do I need to merge a new version of PySR (i.e., creating a v0.10.1), or is updating the build number enough? |
build number is enough |
recipe/meta.yaml
Outdated
- python >=3.6,<4.0 | ||
- pyjulia >=0.5.7 | ||
- julia <=1.7.1 | ||
- numpy >=1.14.0 | ||
- pandas | ||
- sympy | ||
- scikit-learn | ||
- openlibm | ||
- scikit-learn >=1.0.0 | ||
- openlibm <0.8.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it still the case that your package doesn't support 1.7.2? We have 1.8 coming up soon too.
Anyway, if the <=1.7.2 isn't strictly necessary, I think we can get rid of julia and openlibm from here. You get julia from pyjulia anyway, and openlibm comes with julia.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PySR itself works for any Julia version above 1.5.
I saw issues with the conda-forge version of julia 1.7.2 when I tried it a while ago, and since most PySR users don't use Julia for other things I thought it would be fine to fix it at a stable version. I could try relaxing that requirement now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, sounds good. It is a good exercise to relax it to see if things work as expected. I believe we implemented significant changes in 1.7.2 that will carry over to 1.8.0, so it is good to resolve this at some point, though not necessarily in this PR
My one last concern is that we need to get someone from @conda-forge/core to approve this to avoid misunderstanding and trouble. Maybe @isuruf? I would give them like a week to respond. If no response, my opinion is: You're the maintainer here, and this is your package after all, so you should feel empowered to make whatever changes that you think are appropriate and beneficial. |
Sounds good to me. If there's no response this week I will plan to merge this next weekend. Also: I relaxed the Julia version requirement to |
@@ -0,0 +1 @@ | |||
"${PREFIX}/bin/python" -c 'import pysr; pysr.install()' >> "${PREFIX}/.messages.txt" 2>&1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where would this install the julia packages?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$CONDA_PREFIX/share
I believe, especially after we specified the post-links in the julia-feedstock.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ngam I'm assuming the packages get installed in a location according to this env variable, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, messages crossed :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If a downstream package uses pysr when being built by conda-build, will conda-build package the julia packages installed by this post-link script?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, it will certainly do (I think). Is there anyway to limit this? Make it into an activate script?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought post-link.sh
runs on the user side?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but the user can be the package building process. If you get pysr in your host or build reqs, then it will activate and do the whole post-link during the build.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can defend against this by checking whether CONDA_BUILD_STATE
is not test
in the post-link
script.
Hm... @MilesCranmer
What went wrong between 1.7.1 and 1.7.2+? |
@ngam that issue by itself is fine - that's how the normal PyJulia install process works - it installs However, the other issues look to be new: https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=551157&view=logs&j=656edd35-690f-5c53-9ba3-09c10d0bea97&t=e5c8ab1d-8ff9-5cae-b332-e15ae582ed2d&l=683 from |
@conda-forge-admin, please rerender |
…nda-forge-pinning 2022.08.14.15.51.06
I think the issue is with pycall still:
|
I think the issue here is that your package is trying to make another conda env for itself. Currently, what we are doing is stacking envs. You have a conda env, right? Then a julia env gets built within it inside I think this makes sense as the change from julia 1.7.1 to 1.7.3 exposed this issue. In your helper function, it may help to adjust it so that it can make use of this new feature we introduced --- i.e., all you need to do is ask julia to install your deps directly. What does PyCall do exactly in this case btw? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't working well. The issue raised by isuruf is crucial --- if another package uses pysr at some point we will end up packaging all these julia modules automatically, which we do not want.
I think we will have to settle with a user-triggered solution...
Yes, I am not sure what's causing the error. I got it to work fine with a separate step after the fact (not post-link, i.e. like what you had before in the tests):
|
@@ -10,33 +10,21 @@ source: | |||
|
|||
build: | |||
noarch: python |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The package probably cannot be noarch now, right? Will we need post-link.bat?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
julia-feedstock is only available on macOS and linux so I'm assuming we can leave it as noarch until that changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is better the opposite in that case b/c these noarch packages will be available when the Julia package lands on those platforms, creating possible solutions but faulty installations.
@mkitti could you have a look at what went wrong here? I am not entirely sure... |
Attempts to add a post-link script to install PySR's julia dependencies.
Checklist
0
(if the version changed)conda-smithy
(Use the phrase@conda-forge-admin, please rerender
in a comment in this PR for automated rerendering)Addresses #38.
cc @ngam @mkitti