Skip to content

Model card widget : array format not provided by metadata_from_config #393

@Wissant

Description

@Wissant

Hello! I have been running the notebook behind this tutorial :
https://skops.readthedocs.io/en/latest/auto_examples/plot_tabular_regression.html#sphx-glr-auto-examples-plot-tabular-regression-py

The model card is initialized with this command card.metadata_from_config(Path(local_repo))

After creating the model card, I went on to push the model to the hf hub. I ran into this error:

 Bad request for commit endpoint:
"widget" must be an array

I was able to overcome the issue by executing : model_card.metadata.widget = [model_card.metadata.widget] prior to saving the model card.

This is a minor error, but reporting it just in case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions