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

MNT remove deprecated hub_utils #462

Merged
merged 4 commits into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:

- uses: prefix-dev/setup-pixi@v0.8.1
with:
pixi-version: v0.39.0
pixi-version: v0.39.5
environments: ${{ matrix.environment }}
# we can freeze the environment and manually bump the dependencies to the
# latest version time to time.
Expand Down
24 changes: 0 additions & 24 deletions .github/workflows/clean-skops-user.yml

This file was deleted.

15 changes: 0 additions & 15 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -98,21 +98,6 @@ scikit-learn and all other required dependencies with:

pytest

Certain tests require internet access to run, and they typically take slightly
longer to run than other tests. If you'd like to skip those tests, you can add
``-m not network`` to your ``pytest`` command, or ``-m network`` to only run
those tests. For example, you can run all tests except the ones requiring
internet with:

.. code:: bash

pytest -m "not network" skops

Similarly, there is a flag, ``-m inference`` for tests that hit the Hugging Face
Inference API, which can be quite slow or even hang. Skip these tests as long as
you don't make any changes to this functionality. If you already skip network
tests, the inference tests will also be skipped.


Releases
========
Expand Down
23 changes: 8 additions & 15 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,26 +31,19 @@ SKOPS

``skops`` is a Python library helping you share your `scikit-learn
<https://scikit-learn.org/stable/>`__ based models and put them in production.
At the moment, it includes tools to easily integrate models on the Hugging Face
Hub, which allows you to share your models, make them discoverable, and use the
Hub's API inference and widgets to get outputs of the model without having to
download or load the model.

- ``skops.hub_utils``: tools to create a model repository to be stored on
`Hugging Face Hub <https://hf.co/models>`__, mainly through
``skops.hub_utils.init`` and ``skops.hub_utils.push``. You can see all the
models uploaded to the hub using this library `here
<https://huggingface.co/models?other=skops>`__. Find out more `here
<https://skops.readthedocs.io/en/stable/hf_hub.html>`__.
At the moment, it includes `skops.io` to securely persist sklearn estimators and
more, without using ``pickle``. It also includes `skops.card` to create a model
card explaining what the model does and how it should be used.

- ``skops.io``: Secure persistence of sklearn estimators and more, without using
``pickle``. Visit `the docs
<https://skops.readthedocs.io/en/latest/persistence.html>`__ for more
information.
- ``skops.card``: tools to create a model card explaining what the model does
and how it should be used. The model card can then be stored as the
``README.md`` file on the Hugging Face Hub, with pre-populated metadata to
help Hub understand the model. More information can be found `here
<https://skops.readthedocs.io/en/stable/model_card.html>`__.
- ``skops.io``: Secure persistence of sklearn estimators and more, without using
``pickle``. Visit `the docs
<https://skops.readthedocs.io/en/latest/persistence.html>`__ for more
information.

Please refer to our `documentation <https://skops.readthedocs.io/en/latest/>`_
on using the library as user, which includes user guides on the above topics as
Expand Down
6 changes: 3 additions & 3 deletions docs/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ v0.9
estimators. :pr:`384` by :user:`Reid Johnson <reidjohnson>`.
- Fix an issue with visualizing Skops files for `scikit-learn` tree estimators.
:pr:`386` by :user:`Reid Johnson <reidjohnson>`.
- :func:`skops.hub_utils.get_model_output` and :func:`skops.hub_utils.push` are
- ``skops.hub_utils.get_model_output`` and ``skops.hub_utils.push`` are
deprecated and will be removed in version 0.10. :pr:`396` by `Adrin Jalali`_.

v0.8
Expand Down Expand Up @@ -156,7 +156,7 @@ v0.2
filesystem if it fails for some reason. :pr:`60` by `Adrin Jalali`_
- When adding figures or tables, it's now possible to set ``folded=True`` to
render the content inside a details tag. :pr:`108` by `Benjamin Bossan`_.
- Add :meth:`skops.hub_utils.get_model_output` to get the model's output using
- Add ``skops.hub_utils.get_model_output`` to get the model's output using
The Hugging Face Hub's inference API, and return an array with the outputs.
:pr:`105` by `Adrin Jalali`_.

Expand All @@ -167,7 +167,7 @@ This is the first release of the library. It include two main modules:

- :mod:`skops.hub_utils`: tools to create a model repository to be stored on
`Hugging Face Hub <https://hf.co/models>`__, mainly through
:func:`skops.hub_utils.init` and :func:`skops.hub_utils.push`.
:func:`skops.hub_utils.init` and ``skops.hub_utils.push``.
- :mod:`skops.card`: tools to create a model card explaining what the model does
and how it should be used. The model card can then be stored as the
``README.md`` file on the Hugging Face Hub, with pre-populated metadata to
Expand Down
10 changes: 0 additions & 10 deletions docs/community.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,6 @@ If you'd like to contribute to the project, please make sure you read our
<https://github.com/skops-dev/skops/blob/main/CONTRIBUTING.rst>`__.


Discord
~~~~~~~
We also have a place on Hugging Face's discord server. We're happy to see you
there and answer any questions you might have. You can join using this `invite
link <http://hf.co/join/discord>`__. Once you join, first you need to accept
the rules on the server regarding respectful and harassment free communication,
and then you can head to the ``#role-assignment`` channel where you'll find and
``Open Source ML`` button. Clicking on that will give you access to a few
channels and categories, including the ``skops`` category.

Maintainers
-----------
Current maintainers of the project are (in alphabetical order):
Expand Down
1 change: 0 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,5 @@ def linkcode_resolve(domain, info):
"sklearn": ("https://scikit-learn.org/stable/", None),
"pandas": ("https://pandas.pydata.org/docs/", None),
"joblib": ("https://joblib.readthedocs.io/en/latest/", None),
"huggingface_hub": ("https://huggingface.co/docs/huggingface_hub/main/en", None),
"fairlearn": ("https://fairlearn.org/v0.8/", None),
}
3 changes: 0 additions & 3 deletions docs/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ Examples of interactions with the Hugging Face Hub
- Creating the Model Card:
:ref:`sphx_glr_auto_examples_plot_model_card.py` is an example of using
skops to create a model card that can be used on the Hugging Face Hub.
- Putting the Model Card on the Hub:
:ref:`sphx_glr_auto_examples_plot_hf_hub.py` is an example of using skops
to put a model card on the Hugging Face Hub.
- Tabular Regression:
:ref:`sphx_glr_auto_examples_plot_tabular_regression.py` is an example of using skops to serialize a tabular
regression model and create a model card and a Hugging Face Hub repository.
Expand Down
162 changes: 0 additions & 162 deletions docs/hf_hub.rst

This file was deleted.

11 changes: 2 additions & 9 deletions docs/model_card.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,15 @@ which are a short documentation explaining what the model does, how it's
trained, and its limitations. `Hugging Face Hub <https://huggingface.co/>`__
expects a ``README.md`` file containing a certain set of metadata at the
beginning of it, following with the content of the model card in markdown
format. The metadata section is used to make models searchable on the Hub, and
get the inference API and the widgets on the website working.
format.

Metadata
--------

The metadata part of the file needs to follow the specifications `here
<https://huggingface.co/docs/hub/models-cards#model-card-metadata>`__. It
includes simple attributes of your models such as the task you're solving,
dataset you trained the model with, evaluation results and more. When the model
is hosted on the Hub, information in metadata like task name or dataset help
your model be discovered on the `Hugging Face Hub
<https://huggingface.co/models>`__. The task identifiers should follow the task
taxonomy defined in Hugging Face Hub, as it enables the inference widget on the
model page. An example to task identifier can be ``"tabular-classification"``
or ``"text-regression"``.
dataset you trained the model with, evaluation results and more.

Here's an example of the metadata section of the ``README.md`` file:

Expand Down
Loading
Loading