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

Heavily improve automatic model card generation #452

Merged
merged 31 commits into from
Dec 4, 2023

Conversation

tomaarsen
Copy link
Member

@tomaarsen tomaarsen commented Dec 1, 2023

Hello!

Pull Request overview

  • Heavily improve automatic model card generation
  • Additionally:
    • Always return dicts in id2label/label2id
    • Set default W&B project as "setfit" if not set via ENV var yet
    • Set fsspec<2023.12.0 due to breakages with older datasets versions

Example generated output

These model cards were fully generated - none of this was edited:

Details

Add the following sections to the README body:

  • Model Description (embedding model, classification head, maximum sequence length, number of classes, training dataset, language, license)
  • Model Sources (repo link, paper link, blogpost link)
  • Model labels (a table)
  • Evaluation results (accuracy on test set, usually)
  • Direct uses (inference, a code snippet)
  • Training set metrics (sentence length, training sample count per label)
  • Training hyperparameters
  • Training results/logs (with load_best_model_at_end checkpoint highlighted)
  • Environmental Impact (emissions, training time)
  • Training hardware
  • Framework versions
  • Citation

Beyond that, I added some values to the README metadata:

  • language
  • license
  • library_name
  • tags
  • datasets
  • metrics
  • widget
  • pipeline_tag
  • co2_eq_emissions
  • model-index (accuracy)
  • base_model
  • inference

The values for these are automatically computed via the Trainer and a ModelCardCallback.

TODO

  • Basic tests
  • Additional stress tests if possible
  • Additional documentation

  • Tom Aarsen

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.

@tomaarsen tomaarsen merged commit d61ec69 into huggingface:v1.0.0-pre Dec 4, 2023
18 checks passed
@tomaarsen tomaarsen deleted the feat/model_cards branch December 4, 2023 16:43
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