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

Try to allow other build numbers of nifty and protobuf to be installed #25

Conversation

conda-forge-admin
Copy link
Contributor

@conda-forge-admin conda-forge-admin commented Dec 19, 2024

This creates 2 "noarch packages" to hack around the limitations that conda-forge does not have a pytorch package.

  • The one built by the linux runner -- limited to unix platforms. loosens the nifty pin
  • The one built by the OSX runner -- not limited to unix. -- limits the nifty pin to something very strict.
  • I’ve also loosened the protobuf requirement. This is only a problem for users that mix conda-forge and default channel (which is not supported) and the PyTorch channel is compatible with the default channel, not conda-forge.
  • I've validated that both packages have different hash numbers.

This is pretty "not ok" at conda-forge and I would recommend you don't give these kinds of hack instructions to your end users.

You can see my "comments" on the status of pytorch at conda-forge:
conda-forge/conda-forge.github.io#2381

-- hmaarrfk cc @hmaarrfk

@conda-forge-admin
Copy link
Contributor Author

conda-forge-admin commented Dec 19, 2024

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 (recipe/meta.yaml) and found it was in an excellent condition.

I do have some suggestions for making it better though...

For recipe/meta.yaml:

  • ℹ️ noarch: python recipes should usually follow the syntax in our documentation for specifying the Python version.
    • For the test.requires section of the recipe, you should usually use python {{ python_min }} for the python entry.
    • If the package requires a newer Python version than the currently supported minimum version on conda-forge, you can override the python_min variable by adding a Jinja2 set statement at the top of your recipe (or using an equivalent context variable for v1 recipes).

This message was generated by GitHub Actions workflow run https://github.com/conda-forge/conda-forge-webservices/actions/runs/12423580550. Examine the logs at this URL for more detail.

@conda-forge-admin conda-forge-admin marked this pull request as ready for review December 19, 2024 20:23
@hmaarrfk hmaarrfk changed the title MNT: rerender Try to allow other build numbers of nifty to be installed Dec 19, 2024
@hmaarrfk
Copy link
Contributor

@conda-forge-admin please rerender

@conda-forge-admin
Copy link
Contributor Author

Hi! This is the friendly automated conda-forge-webservice.

I tried to rerender for you but ran into some issues. Please check the output logs of the GitHub Actions workflow below for more details. You can also ping conda-forge/core (using the @ notation) for further assistance or you can try rerendering locally.

The following suggestions might help debug any issues:

  • Is the recipe/{meta.yaml,recipe.yaml} file valid?
  • If there is a recipe/conda-build-config.yaml file in the feedstock make sure that it is compatible with the current global pinnnings.
  • Is the fork used for this PR on an organization or user GitHub account? Automated rerendering via the webservices admin bot only works for user GitHub accounts.

This message was generated by GitHub Actions workflow run https://github.com/conda-forge/conda-forge-webservices/actions/runs/12420255842. Examine the logs at this URL for more detail.

@hmaarrfk hmaarrfk force-pushed the conda_forge_admin_24 branch from d47bba4 to 2e4cc5f Compare December 19, 2024 21:32
@hmaarrfk
Copy link
Contributor

hmm we got much stricter in even ensuring that things can be solved...

@hmaarrfk hmaarrfk force-pushed the conda_forge_admin_24 branch from 0ac7426 to 68030e7 Compare December 19, 2024 22:11
@hmaarrfk hmaarrfk changed the title Try to allow other build numbers of nifty to be installed Try to allow other build numbers of nifty and protobuf to be installed Dec 19, 2024
Copy link
Contributor

@constantinpape constantinpape left a comment

Choose a reason for hiding this comment

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

How would a user specify which of the two packages to install? Would they need to specify the exact hashes? Would there be a way to have a human readable way?
Something like micro_sam (the default for unix-like without strict nifty pin) and micro_sam-win (the stricter windows pin). Or would we need completely separate packages for this?

# against nifty
# The unix package, specific to unix, has a less strict pin on nifty
- nifty =1.2.1=*_4 # [osx]
- protobuf <5 # [osx]
Copy link
Contributor

Choose a reason for hiding this comment

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

Just for me to understand: you are using osx here to build with a stricter pin because it would not build on win due to missing pytorch. Is that correct?

Copy link
Contributor

Choose a reason for hiding this comment

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

@hmaarrfk
Copy link
Contributor

How would a user specify which of the two packages to install?

They don't. This really isn't the conda(-forge) way.

Would they need to specify the exact hashes?

yes.

Would there be a way to have a human readable way?

Similar to https://github.com/computational-cell-analytics/micro-sam/blob/eb0def46d54a8e26758df05b5236f58fde8b56b9/workshops/i2k_2024/README.md?plain=1#L41C10-L41C85
just add

conda install -c pytorch -c conda-forge "micro_sam>=1.1" "pytorch>=2.4" "protobuf<5" cpuonly "nifty=1.2.1=*_4"

(I can't say this enough, this is very fragile for many reasons).

But specifying this is not necessary:

  1. Linux + OSX users can get a working compatible pytorch from conda-forge
  2. Windows users will get limited to the nifty=1.2.1=*_4 and protobuf<5

Something like micro_sam (the default for unix-like without strict nifty pin) and micro_sam-win (the stricter windows pin). Or would we need completely separate packages for this?

Conda-forge is not the right place to make hacks for this kind of thing. You fork this feedstock, use the CIs to upload whatever package you want to your own channel, but please don't do this kind of stuff at conda-forge.

The hacks here are at the border of acceptable and may be deemed too much by other core members already...

@constantinpape
Copy link
Contributor

Hi @hmaarrfk ,
thanks for the feedback here. Given this, I would opt for a cleaner solution, I summarized here:
computational-cell-analytics/micro-sam#813

Let me know what you think (in that issue) and then I would start with implementing it later.

@constantinpape
Copy link
Contributor

I am closing this in favor of #26 . Thanks for the feedback on this!

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