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

Rename HF codec to hf #1268

Merged
merged 3 commits into from
Jul 4, 2023
Merged

Conversation

adriangonz
Copy link
Contributor

@adriangonz adriangonz commented Jun 30, 2023

Changelog

  • Rename multi-input HF codec's content type to hf (the previous str caused conflicts with MLServer's base one)
  • Always use HuggingfaceRequestCodec in HF runtime (i.e. ignore top-level request content_type annotation)

@ukclivecox
Copy link
Contributor

I don't think this fixes thins as for all cases:

The issue is this seldon core v2 huggingface demo explainer is calling a pipeline so we can't get the metadata, so the blackbox explainer adds content-type='str' by default which no longer works as we need content_type="hf".

if content_type is provided in payload it always has precedene over any in model-settings.json.

@ukclivecox
Copy link
Contributor

The metadata content_type also needs updating: https://github.com/SeldonIO/MLServer/blob/master/runtimes/huggingface/mlserver_huggingface/metadata.py from str to hf everywhere

@adriangonz
Copy link
Contributor Author

As far as I can see, that metadata only applies to the input-level metadata but leaves the request-level metadata unset - so we can leave it as it is.

@adriangonz adriangonz merged commit 048f93f into SeldonIO:master Jul 4, 2023
26 checks passed
@adriangonz adriangonz deleted the rename-hf-content-type branch July 4, 2023 09:38
adriangonz pushed a commit that referenced this pull request Jul 4, 2023
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