question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Trainer's create_model_card creates an invalid yaml metadata `datasets: - null`

See original GitHub issue

Environment info

  • any env

Who can help

Information

To reproduce

Steps to reproduce the behavior:

  1. Train a model
  2. Do not association any datasets
  3. The trained model and the model card are rejected by the server

Expected behavior

trainer.py git push should be successfull, even with the coming patch https://github.com/huggingface/transformers/pull/13514

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:12 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
sguggercommented, Sep 13, 2021

In the meantime I’ve suggested a fix for the problems for which this issue was created and for the incomplete results I mentioned. Both have their origin in the code of the TrainingSummary, so fixing them is not duplicate code 😃

We can think more about what validation we want to do where, personally I would see this more in the hf_hub side, in the function that adds metadata (which we will use in the Trainer once it’s merged and in a release of hf_hub).

1reaction
julien-ccommented, Sep 13, 2021

Hmm, the datasets: - null issue is not about missing datasets, it’s about invalid data.

in YAML, this is parsed as datasets = [None] (python-syntax) whereas it should be an array of string.

In my opinion, we will not enforce rejections for missing data any time soon (especially for automatically generated model cards).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Invalid YAML Metadata - Resolved help - Obsidian Forum
I have the following YAML header in my notes but it generates an “Invalid YAML” error in preview. --- Type: [[Notes]] Tags: [[Stanford ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found