Skip to content

Rename HF codec to hf#1268

Merged
adriangonz merged 3 commits into
SeldonIO:masterfrom
adriangonz:rename-hf-content-type
Jul 4, 2023
Merged

Rename HF codec to hf#1268
adriangonz merged 3 commits into
SeldonIO:masterfrom
adriangonz:rename-hf-content-type

Conversation

@adriangonz

@adriangonz adriangonz commented Jun 30, 2023

Copy link
Copy Markdown
Contributor

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)

@adriangonz
adriangonz requested a review from ukclivecox June 30, 2023 17:44
@ukclivecox

Copy link
Copy Markdown
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
Copy Markdown
Contributor

@adriangonz

Copy link
Copy Markdown
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
@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