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

fix(deps): update machine-learning #7634

Merged
merged 1 commit into from Mar 6, 2024
Merged

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Mar 5, 2024

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence Type Update
fastapi 0.109.2 -> 0.110.0 age adoption passing confidence dependencies minor
huggingface-hub 0.20.3 -> 0.21.3 age adoption passing confidence dependencies minor
locust 2.23.1 -> 2.24.0 age adoption passing confidence dev minor
mambaorg/micromamba 6038b89 -> 96586e2 final digest
nvidia/cuda 8b51b1f -> 2d913b0 final digest
onnxruntime 1.17.0 -> 1.17.1 age adoption passing confidence armnn patch
onnxruntime 1.17.0 -> 1.17.1 age adoption passing confidence cpu patch
rich 13.7.0 -> 13.7.1 age adoption passing confidence dependencies patch
ruff (source, changelog) 0.2.2 -> 0.3.0 age adoption passing confidence dev minor

Warning

Some dependencies could not be looked up. Check the Dependency Dashboard for more information.


Release Notes

tiangolo/fastapi (fastapi)

v0.110.0

Compare Source

Breaking Changes
  • 🐛 Fix unhandled growing memory for internal server errors, refactor dependencies with yield and except to require raising again as in regular Python. PR #​11191 by @​tiangolo.
    • This is a breaking change (and only slightly) if you used dependencies with yield, used except in those dependencies, and didn't raise again.
    • This was reported internally by @​rushilsrivastava as a memory leak when the server had unhandled exceptions that would produce internal server errors, the memory allocated before that point would not be released.
    • Read the new docs: Dependencies with yield and except.

In short, if you had dependencies that looked like:

def my_dep():
    try:
        yield
    except SomeException:
        pass

Now you need to make sure you raise again after except, just as you would in regular Python:

def my_dep():
    try:
        yield
    except SomeException:
        raise
Docs
Translations
huggingface/huggingface_hub (huggingface-hub)

v0.21.3: [v0.21.3] Hot-fix: ModelHubMixin pass config when __init__ accepts **kwargs

Compare Source

More details in https://github.com/huggingface/huggingface_hub/pull/2058.

Full Changelog: huggingface/huggingface_hub@v0.21.2...v0.21.3

v0.21.2: : hot-fix: [HfFileSystem] Fix glob with pattern without wildcards

Compare Source

See https://github.com/huggingface/huggingface_hub/pull/2056. (+https://github.com/huggingface/huggingface_hub/pull/2050 shipped as v0.21.1).

Full Changelog: huggingface/huggingface_hub@v0.21.0...v0.21.2

v0.21.1

Compare Source

v0.21.0: : dataclasses everywhere, file-system, PyTorchModelHubMixin, serialization and more.

Compare Source

Discuss about the release in our Community Tab. Feedback welcome!! 🤗

🖇️ Dataclasses everywhere!

All objects returned by the HfApi client are now dataclasses!

In the past, objects were either dataclasses, typed dictionaries, non-typed dictionaries and even basic classes. This is now all harmonized with the goal of improving developer experience.

Kudos goes to the community for the implementation and testing of all the harmonization process. Thanks again for the contributions!

💾 FileSystem

The HfFileSystem class implements the fsspec interface to allow loading and writing files with a filesystem-like interface. The interface is highly used by the datasets library and this release will improve further the efficiency and robustness of the integration.

🧩 Pytorch Hub Mixin

The PyTorchModelHubMixin class let's you upload ANY pytorch model to the Hub in a few lines of code. More precisely, it is a class that can be inherited in any nn.Module class to add the from_pretrained, save_pretrained and push_to_hub helpers to your class. It handles serialization and deserialization of weights and configs for you and enables download counts on the Hub.

With this release, we've fixed 2 pain points holding back users from using this lib:

  1. Configs are now better handled. The mixin automatically detects if the base class defines a config, saves it on the Hub and then injects it at load time, either as a dictionary or a dataclass depending on the base class's expectations.
  2. Weights are now saved as .safetensors files instead of pytorch pickles for safety reasons. Loading from previous pytorch pickles is still supported but we are moving toward completely deprecating them (in a mid to long term plan).

✨ InferenceClient improvements

Audio-to-audio task is now supported by both by the InferenceClient!

>>> from huggingface_hub import InferenceClient
>>> client = InferenceClient()
>>> audio_output = client.audio_to_audio("audio.flac")
>>> for i, item in enumerate(audio_output):
>>>     with open(f"output_{i}.flac", "wb") as f:
            f.write(item["blob"])

Also fixed a few things:

📤 Model serialization

With the aim of harmonizing repo structures and file serialization on the Hub, we added a new module serialization with a first helper split_state_dict_into_shards that takes a state dict and split it into shards. Code implementation is mostly taken from transformers and aims to be reused by other libraries in the ecosystem. It seamlessly supports torch, tensorflow and numpy weights, and can be easily extended to other frameworks.

This is a first step in the harmonization process and more loading/saving helpers will be added soon.

📚 Documentation

🌐 Translations

Community is actively getting the job done to translate the huggingface_hub to other languages. We now have docs available in Simplified Chinese (here) and in French (here) to help democratize good machine learning!

Docs misc
Docs fixes

🛠️ Misc improvements

Creating a commit with an invalid README will fail early instead of uploading all LFS files before failing to commit.

Added a revision_exists helper, working similarly to repo_exists and file_exists:

>>> from huggingface_hub import revision_exists
>>> revision_exists("google/gemma-7b", "float16")
True
>>> revision_exists("google/gemma-7b", "not-a-revision")
False

InferenceClient.wait(...) now raises an error if the endpoint is in a failed state.

Improved progress bar when downloading a file

Other stuff:

💔 Breaking changes

  • Classes ModelFilter and DatasetFilter are deprecated when listing models and datasets in favor of a simpler API that lets you pass the parameters directly to list_models and list_datasets.
>>> from huggingface_hub import list_models, ModelFilter

### use
>>> list_models(language="zh")

### instead of 
>>> list_models(filter=ModelFilter(language="zh"))

Cleaner, right? ModelFilter and DatasetFilter will still be supported until v0.24 release.

  • In the inference client, ModelStatus.compute_type is not a string anymore but a dictionary with more detailed information (instance type + number of replicas). This breaking change reflects a server-side update.

Small fixes and maintenance

⚙️ fixes
⚙️ internal

Significant community contributions

The following contributors have made significant changes to the library over the last release:

locustio/locust (locust)

v2.24.0

Compare Source

Full Changelog

Fixed bugs:

  • Blank page when accessing Locust Web UI via reverse proxy with subpath #​2614
  • [Report][Modern-UI] HTML report is blank #​2603

Closed issues:

  • SocketIOUser send method supports specific subscribe request #​2616
  • "Sticky" user types on workers #​2522

Merged pull requests:

Textualize/rich (rich)

v13.7.1

Compare Source

Fixed
astral-sh/ruff (ruff)

v0.3.0

Compare Source

This release introduces the new Ruff formatter 2024.2 style and adds a new lint rule to
detect invalid formatter suppression comments.

Preview features
  • [flake8-bandit] Remove suspicious-lxml-import (S410) (#​10154)
  • [pycodestyle] Allow os.environ modifications between imports (E402) (#​10066)
  • [pycodestyle] Don't warn about a single whitespace character before a comma in a tuple (E203) (#​10094)
Rule changes
  • [eradicate] Detect commented out case statements (ERA001) (#​10055)
  • [eradicate] Detect single-line code for try:, except:, etc. (ERA001) (#​10057)
  • [flake8-boolean-trap] Allow boolean positionals in __post_init__ (#​10027)
  • [flake8-copyright] Allow © in copyright notices (#​10065)
  • [isort]: Use one blank line after imports in typing stub files (#​9971)
  • [pylint] New Rule dict-iter-missing-items (PLE1141) (#​9845)
  • [pylint] Ignore sys.version and sys.platform (PLR1714) (#​10054)
  • [pyupgrade] Detect literals with unary operators (UP018) (#​10060)
  • [ruff] Expand rule for list(iterable).pop(0) idiom (RUF015) (#​10148)
Formatter

This release introduces the Ruff 2024.2 style, stabilizing the following changes:

  • Prefer splitting the assignment's value over the target or type annotation (#​8943)
  • Remove blank lines before class docstrings (#​9154)
  • Wrap multiple context managers in with parentheses when targeting Python 3.9 or newer (#​9222)
  • Add a blank line after nested classes with a dummy body (...) in typing stub files (#​9155)
  • Reduce vertical spacing for classes and functions with a dummy (...) body (#​7440, #​9240)
  • Add a blank line after the module docstring (#​8283)
  • Parenthesize long type hints in assignments (#​9210)
  • Preserve indent for single multiline-string call-expressions (#​9673)
  • Normalize hex escape and unicode escape sequences (#​9280)
  • Format module docstrings (#​9725)
CLI
  • Explicitly disallow extend as part of a --config flag (#​10135)
  • Remove build from the default exclusion list (#​10093)
  • Deprecate ruff <path>, ruff --explain, ruff --clean, and ruff --generate-shell-completion in favor of ruff check <path>, ruff rule, ruff clean, and ruff generate-shell-completion (#​10169)
  • Remove the deprecated CLI option --format from ruff rule and ruff linter (#​10170)
Bug fixes
  • [flake8-bugbear] Avoid adding default initializers to stubs (B006) (#​10152)
  • [flake8-type-checking] Respect runtime-required decorators for function signatures (#​10091)
  • [pycodestyle] Mark fixes overlapping with a multiline string as unsafe (W293) (#​10049)
  • [pydocstyle] Trim whitespace when removing blank lines after section (D413) (#​10162)
  • [pylint] Delete entire statement, including semicolons (PLR0203) (#​10074)
  • [ruff] Avoid f-string false positives in gettext calls (RUF027) (#​10118)
  • Fix ruff crashing on PowerPC systems because of too small page size (#​10080)
Performance
  • Add cold attribute to less likely printer queue branches in the formatter (#​10121)
  • Skip unnecessary string normalization in the formatter (#​10116)
Documentation
  • Remove "Beta" Label from formatter documentation (#​10144)
  • line-length option: fix link to pycodestyle.max-line-length (#​10136)

Configuration

📅 Schedule: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot added dependencies Pull requests that update a dependency file renovate labels Mar 5, 2024
Copy link

cloudflare-pages bot commented Mar 5, 2024

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1ea1a8b
Status: ✅  Deploy successful!
Preview URL: https://810301ff.immich.pages.dev
Branch Preview URL: https://renovate-machine-learning.immich.pages.dev

View logs

@renovate renovate bot force-pushed the renovate/machine-learning branch 4 times, most recently from 7413fbe to 1959e94 Compare March 5, 2024 17:19
@renovate renovate bot force-pushed the renovate/machine-learning branch from 1959e94 to 1ea1a8b Compare March 6, 2024 03:39
@mertalev mertalev merged commit 4c0bb23 into main Mar 6, 2024
28 checks passed
@mertalev mertalev deleted the renovate/machine-learning branch March 6, 2024 05:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file renovate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant