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

CI Add GitHub workflow for creating releases #38

Merged
merged 5 commits into from
Jul 21, 2022

Conversation

BenjaminBossan
Copy link
Collaborator

Solves #34

Minor additions:

  • Added some documentation around releases and developing skops.
  • Fix a typo (sklearn -> skops)
  • Make test dependencies installable

Note: For obvious reasons, I haven't tested yet whether the GH action really works.

Add some documentation around releases and developing skops.
@BenjaminBossan
Copy link
Collaborator Author

I'm getting this error:

requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://huggingface.co/api/models/skops/test-4a551f91-bec7-4996-9e9f-ed75ecb0395c/commit/main (Request ID: xg-VOMqxP3BFWz4qxgtbk)

(link)

Any idea what this could be about? It seems to be unrelated to my changes.

Copy link
Member

@adrinjalali adrinjalali left a comment

Choose a reason for hiding this comment

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

Nice!

README.rst Outdated Show resolved Hide resolved
@adrinjalali
Copy link
Member

Thos 400 errors are because the backend is unstable and sometimes gives 400. We just re-run the tests for them to pass, and they almost always do with max 3 retries. We can also use a retry decorator for our tests.

... in README instruction.

Co-authored-by: Adrin Jalali <adrin.jalali@gmail.com>
@adrinjalali
Copy link
Member

The error on the CI doesn't seem like the usual we get. Would you what's causing it @SBrandeis?

                except Exception as exc:
                    # Raise the first exception encountered
>                   raise RuntimeError(
                        f"Error while uploading {operation.path_in_repo} to the Hub"
                    ) from exc
E                   RuntimeError: Error while uploading model.pkl to the Hub
/opt/hostedtoolcache/Python/3.8.13/x64/lib/python3.8/site-packages/huggingface_hub/_commit_api.py:263: RuntimeError

@adrinjalali adrinjalali added this to the 0.1 milestone Jul 20, 2022
python -m pip install -U setuptools wheel twine

- name: Publish package to TestPyPI
uses: pypa/gh-action-pypi-publish@v1.5.0
Copy link
Member

Choose a reason for hiding this comment

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

I just noticed this action only publishes the built packages. We need to build them before uploading them.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I should have checked, my bad. I added a build step above.

Copy link
Member

@adrinjalali adrinjalali left a comment

Choose a reason for hiding this comment

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

Let's see how it goes.


- name: Generate distribution archives
run: |
python -m build
Copy link
Member

Choose a reason for hiding this comment

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

oh, didn't know this does the thing.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Same, it was new to me. But I figured if the docs recommend this way, it is best practice.

@adrinjalali adrinjalali changed the title Add GitHub workflow for creating releases CI Add GitHub workflow for creating releases Jul 21, 2022
@adrinjalali adrinjalali merged commit 64366d0 into main Jul 21, 2022
@adrinjalali adrinjalali deleted the pypi-release-workflow branch July 21, 2022 15:33
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.

2 participants