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 recipe keras-nlp #21616

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions recipes/keras-nlp/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{% set name = "keras-nlp" %}
{% set version = "0.3.1" %}

package:
name: {{ name|lower }}
version: {{ version }}

source:
url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/keras-nlp-{{ version }}.tar.gz
sha256: 44723deed5c271078cae48ca91cf8e8f6c9ffe85e01a52aee17d02366de959a5

build:
noarch: python
script: {{ PYTHON }} -m pip install . -vv
number: 0

requirements:
host:
- python >=3.7
- pip
run:
- python >=3.7
- absl-py
- numpy
- packaging
- tensorflow >=2.0
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

@BastianZim, thx for the feedback. I am aware of this dependency, but it looks like that recent PRs went through.

Will it be possible to install it via pip? Otherwise, a feedstock of tensorflow-text would make sense for NLP.

Copy link
Member

Choose a reason for hiding this comment

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

Unfortunately, we require all dependencies to be available on conda-forge and listed here so we would have to wait for that.

Copy link
Member Author

Choose a reason for hiding this comment

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

I understand that ... in case of avoiding tensorflow-text via bazel would that ok like for catboost-feedstock?

IF "%PY_VER%"=="2.7" (
	%PYTHON% -m pip install --no-deps https://pypi.org/packages/cp27/c/catboost/catboost-%PKG_VERSION%-cp27-none-win_amd64.whl
)

IF "%PY_VER%"=="3.5" (
	%PYTHON% -m pip install --no-deps https://pypi.org/packages/cp35/c/catboost/catboost-%PKG_VERSION%-cp35-none-win_amd64.whl
)

IF "%PY_VER%"=="3.6" (
	%PYTHON% -m pip install --no-deps https://pypi.org/packages/cp36/c/catboost/catboost-%PKG_VERSION%-cp36-none-win_amd64.whl

Copy link
Member

Choose a reason for hiding this comment

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

No, it needs to be properly installed as a dependency.
You can also add it to conda-forge yourself, if you need the package?

Copy link
Member Author

@Anselmoo Anselmoo Feb 2, 2023

Choose a reason for hiding this comment

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

So first setup open a new feedstock for tensorflow-text and with package from scratch not like catboost?

For the new version of AutoKeras they add keras-nlp as dependency, while it depends on tensorflow-text

conda-forge/autokeras-feedstock#1 (comment)

Copy link
Member Author

Choose a reason for hiding this comment

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

See also: #19578 (comment)

Copy link
Member

Choose a reason for hiding this comment

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

Yes, basically submit another PR for tensorflow-text or have it as an output in tensorflow. Not sure what the build process is there.

I'm not familiar with catboost but we always build from source. These exceptions are only made in very rare cases, where it is impossible to build it differently.


test:
imports:
- examples
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- examples
- examples
commands:
- pip check
requires:
- pip

To check the deps


about:
home: https://keras.io/examples/nlp/
summary: Industry-strength Natural Language Processing extensions for Keras.
license: Apache-2.0
license_file: LICENSE
dev_url: https://github.com/keras-team/keras-nlp
doc_url: https://keras.io/examples/nlp/

extra:
recipe-maintainers:
- Anselmoo