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

Add torchserve #28650

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open

Add torchserve #28650

wants to merge 13 commits into from

Conversation

tdsmith
Copy link
Contributor

@tdsmith tdsmith commented Dec 19, 2024

This is part of the pytorch ecosystem that will be useful to package in light of the deprecation of the pytorch channel.

Torchserve has a Java component and a Python component that are shipped in a single wheel by upstream. The upstream build process builds a jar and rolls it into a wheel; the pytorch channel package build just unpacks and repackages the wheel: https://github.com/pytorch/serve/tree/0985386d5a9bc9dd4fe0feaa7af186e2e5b3a84b/binaries

The upstream wheel is a universal wheel: https://pypi.org/project/torchserve/#files

I think the dependencies rolled into the jar are described in https://github.com/pytorch/serve/blob/master/frontend/server/build.gradle.

I'm not sure whether it's appropriate to add run-constraints or dependencies on pytorch. There are platform support matrices on the Releases page, though torchserve versions are paired with different versions of pytorch in each table: https://github.com/pytorch/serve/releases
Upstream's package did not have any dependencies on pytorch: https://github.com/pytorch/serve/blob/master/binaries/conda/torchserve/meta.yaml

Checklist

  • Title of this PR is meaningful: e.g. "Adding my_nifty_package", not "updated meta.yaml".
  • License file is packaged (see here for an example).
  • Source is from official source.
  • Package does not vendor other packages. (If a package uses the source of another package, they should be separate packages or the licenses of all packages need to be packaged).
  • If static libraries are linked in, the license of the static library is packaged.
  • Package does not ship static libraries. If static libraries are needed, follow CFEP-18.
  • Build number is 0.
  • A tarball (url) rather than a repo (e.g. git_url) is used in your recipe (see here for more details).
  • GitHub users listed in the maintainer section have posted a comment confirming they are willing to be listed there.
  • When in trouble, please check our knowledge base documentation before pinging a team.

Copy link
Contributor

Hi! This is the staged-recipes linter and your PR looks excellent! 🚀

@conda-forge-admin
Copy link
Contributor

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 (recipes/torchserve/meta.yaml) and found some lint.

Here's what I've got...

For recipes/torchserve/meta.yaml:

  • ❌ noarch: python recipes are required to have a lower bound on the python version. Typically this means putting python >=3.6 in both host and run but you should check upstream for the package's Python compatibility.

For recipes/torchserve/meta.yaml:

  • ℹ️ noarch: python recipes should usually follow the syntax in our documentation for specifying the Python version.
    • For the host section of the recipe, you should usually use python {{ python_min }} for the python entry.
    • For the run section of the recipe, you should usually use python >={{ python_min }} for the python entry.
    • 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/12419085590. Examine the logs at this URL for more detail.

@conda-forge-admin
Copy link
Contributor

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

@tdsmith
Copy link
Contributor Author

tdsmith commented Dec 19, 2024

Current failure seems to be this message from gradle:

  * What went wrong:
  Could not open settings generic class cache for settings file '/home/conda/staged-recipes/build_artifacts/torchserve_1734636011762/work/frontend/settings.gradle' (/home/conda/.gradle/caches/7.6/scripts/9hv7ydusbul6bfoozqlmkymv6).
  > BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 66

gradle 7.6 is being selected by https://github.com/pytorch/serve/blob/0985386d5a9bc9dd4fe0feaa7af186e2e5b3a84b/frontend/gradle/wrapper/gradle-wrapper.properties#L3, which I think requires openjdk of at most 19 according to https://docs.gradle.org/current/userguide/compatibility.html

@conda-forge-admin
Copy link
Contributor

conda-forge-admin commented Dec 19, 2024

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 (recipes/torch-model-archiver/meta.yaml, recipes/torchserve/meta.yaml) and found some lint.

Here's what I've got...

For recipes/torch-model-archiver/meta.yaml:

  • ❌ Package version is missing.

For recipes/torch-model-archiver/meta.yaml:

  • ℹ️ The recipe is not parsable by parser conda-recipe-manager. The recipe can only be automatically migrated to the new v1 format if it is parseable by conda-recipe-manager.

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

@conda-forge-admin
Copy link
Contributor

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 (recipes/torchserve/meta.yaml, recipes/torch-workflow-archiver/meta.yaml, recipes/torch-model-archiver/meta.yaml) and found it was in an excellent condition.

@tdsmith
Copy link
Contributor Author

tdsmith commented Dec 20, 2024

@conda-forge/help-python, ready for review!

I think the macOS failure is irrelevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants