allenai / allennlp

An open-source NLP research library, built on PyTorch.
http://www.allennlp.org
Apache License 2.0
11.76k stars 2.25k forks source link

Upload QA models to HF #5494

Closed dirkgr closed 2 years ago

dirkgr commented 2 years ago
dirkgr commented 2 years ago

TransformerQA and Naqanet don't converge when training with the instructions in the demo :-(

dirkgr commented 2 years ago

@osanseviero, why did you write the push-to-hf command so that it renames the weights file to model.th? We expect best.th or better weights.th. Like this we don't load properly when I try to use hf:// URL.

osanseviero commented 2 years ago

As discussed offline indeed this is an issue in the push-to-hf command. Fixing this is a minor change in the pushing script.

dirkgr commented 2 years ago

@osanseviero, I just uploaded a second version, and it did this: https://huggingface.co/allenai/bidaf/blob/main/README.md

That's probably not intended?

osanseviero commented 2 years ago

Hi @dirkgr. The implementation of the push command respects the existing model card to avoid deleting user-written model card data or metadata, so it just adds the template before. We're working in some wrapper for the metadata that will include validation and allow merging metadata, but this is still not done. If you prefer, we can modify the command such that it does not add anything to the model card when there is already a model card, but moving forward we'll probably want to add things such as metrics to the metadata.

github-actions[bot] commented 2 years ago

@dirkgr this is just a friendly ping to make sure you haven't forgotten about this issue 😜

dirkgr commented 2 years ago

I got these four done:

dirkgr commented 2 years ago

@osanseviero, the tensor board stuff is there, but it doesn't seem to render?

osanseviero commented 2 years ago

Hi @dirkgr, I actually see them in the training metrics tab

dirkgr commented 2 years ago

Ah, works in Chrome, not in Safari.

osanseviero commented 2 years ago

@severo from the team is looking into it! :hugs:

severo commented 2 years ago

It seems to be an error with the last version of tensorboard. I reported it here: https://github.com/tensorflow/tensorboard/issues/5489.

severo commented 2 years ago

Fixed!

Capture d’écran 2022-01-07 à 18 10 43

Thanks for reporting

dirkgr commented 2 years ago

Thanks for fixing!