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 + Patch XLM-R #28

Merged
merged 95 commits into from
Sep 29, 2023

Conversation

tomaarsen
Copy link
Owner

@tomaarsen tomaarsen commented Sep 5, 2023

Hello!

Pull Request overview

  • Heavily improve automatic model card generation

Example generated output

These model cards were fully generated - none of this was edited except for one sentence: See [train.py](train.py) for the training script.:

Details

Add the following sections to the README body:

  • Model Description (encoder model, maximum sequence length, maximum entity length, training dataset, language, license)
  • Model Sources (repo link, thesis link)
  • Model labels (a table)
  • Direct uses (inference, a code snippet)
  • Downstream use (finetuning, a code snippet)
  • Training set metrics (sentence length, entities per sentence)
  • Training hyperparameters
  • Training results
  • Environmental Impact (emissions, training time)
  • Training hardware
  • Framework versions

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 (f1, recall, precision)
  • base_model

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

TODO

  • Tests
  • Additional documentation

cc: @davanstrien I think this might really interest you. Perhaps you have some useful feedback!

  • Tom Aarsen

Also use fields instead of __dict__
Also prevent crash if dataset_id is not provided
@tomaarsen tomaarsen linked an issue Sep 28, 2023 that may be closed by this pull request
@tomaarsen tomaarsen changed the title Heavily improve automatic model card generation Heavily improve automatic model card generation + Patch XLM-R Sep 28, 2023
@tomaarsen tomaarsen merged commit 509d5f4 into main Sep 29, 2023
8 checks passed
@tomaarsen tomaarsen deleted the feat/improved_model_cards branch September 29, 2023 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Note: (XLM-)RoBERTa-based SpanMarker models require text preprocessing
3 participants