huggingface / transformers

πŸ€— Transformers: State-of-the-art Machine Learning for Pytorch, TensorFlow, and JAX.
https://huggingface.co/transformers
Apache License 2.0
131.91k stars 26.27k forks source link

πŸ”₯[Community Event] Doc Tests Sprint - Configuration filesπŸ”₯ #19487

Closed ydshieh closed 11 months ago

ydshieh commented 1 year ago

This sprint is similar to #16292 - but for model configuration files, i.e. configuration_[model_name].py. For example, src/transformers/models/bert/configuration_bert.py

The expected changes

The changes we expect could be find #19485:

  1. Change the import order of the model and configuration classes
  2. Add (with random weights) in the comment before model initialization line
  3. Add configuration_[model_name].py to utils/documentation_tests.txt (respecting the order)

Please do step 3. only after Running the doctest and make sure all tests pass (see below) πŸ™

How to run doctests

Suppose you are working on src/transformers/models/bert/configuration_bert.py. The steps to run the test are:

  1. Stage your changes

    git add src/transformers/models/bert/configuration_bert.py
  2. Prepare the files to be tested

    python utils/prepare_for_doc_test.py src

    or if you prefer to be more specific

    python utils/prepare_for_doc_test.py src/transformers/models/bert/configuration_bert.py

    This will change some files (doc-testing needs to add additional lines that we don't include in the doc source files).

  3. Launch the test:
    python -m pytest --doctest-modules src/transformers/models/bert/configuration_bert.py -sv --doctest-continue-on-failure
  4. Cleanup git status
    git checkout -- .

    to clean up the changes in step 1.

Ready (or not)?

If all tests pass, you can commit, push and open a PR πŸ”₯ πŸš€ , otherwise iterate the above steps πŸ’― !

daspartho commented 1 year ago

I'd like to work on this; I'll start with YOLOS and open a PR :)

daspartho commented 1 year ago

I'll take on Whisper!

daspartho commented 1 year ago

I'll work on Beit!

imarekkus commented 1 year ago

FYI Bart #19524 and Albert #19541 are already done :)

daspartho commented 1 year ago

I'll take on GPT2 next!

RamitPahwa commented 1 year ago

I can take imageGPT

grgkaran03 commented 1 year ago

i'll work on yoso

daspartho commented 1 year ago

I'll work on

and open up PR soon :)

RamitPahwa commented 1 year ago

Also will raise for Transformer-XL !

imarekkus commented 1 year ago

I'll work on bloom

imarekkus commented 1 year ago

I'll work on ctrl

SD-13 commented 1 year ago

Hi @ydshieh, I am new here and want to contribute to this issue. Can you please help me to find the remaining files? Thanks,

ydshieh commented 1 year ago

Hi @ydshieh, I am new here and want to contribute to this issue. Can you please help me to find the remaining files? Thanks,

Hi @SD-13 You can check the latest file https://github.com/IzicTemi/transformers/blob/main/utils/documentation_tests.txt

Any configuration file that is not on that list (on main branch) and [not claimed here yet, no PR opened yet] are all welcome :-)

IzicTemi commented 1 year ago

Hey @ydshieh, could I fix multiple models in a single PR, or do I have to open a single PR for each fix?

grgkaran03 commented 1 year ago

I will be taking blenderbots as well

ydshieh commented 1 year ago

Hey @ydshieh, could I fix multiple models in a single PR, or do I have to open a single PR for each fix?

2 or 3 might be good. But don't take more in a single PR - the sprint is for everyone to contribute, so leave some to others :-)

SD-13 commented 1 year ago

Hi @ydshieh, I am new here and want to contribute to this issue. Can you please help me to find the remaining files? Thanks,

Hi @SD-13 You can check the latest file https://github.com/IzicTemi/transformers/blob/main/utils/documentation_tests.txt

Any configuration file that is not on that list (on main branch) and [not claimed here yet, no PR opened yet] are all welcome :-)

Thanks @ydshieh , that was helpful. I can take vision_text_dual_encoder.py

SD-13 commented 1 year ago

Hey @ydshieh, I am getting this error Screenshot from 2022-10-13 19-44-43 can you please help me to understand the reason and fix it? Thanks,

ydshieh commented 1 year ago

@SD-13 Could you open a PR (even if it is not complete yet), and post the command you run and the complete error message in that PR? Using image is not very convivence to search and debug πŸ™

SD-13 commented 1 year ago

@SD-13 Could you open a PR (even if it is not complete yet), and post the command you run and the complete error message in that PR? Using image is not very convivence to search and debug pray

Yeah true. I created this PR and let's leave those errors since all checks are passing. Thanks,

SD-13 commented 1 year ago

I will also take time_series_transformer.py, vision_encoder_decoder.py, and trajectory_transformer.py. Thanks,

grgkaran03 commented 1 year ago

took up blenderbot_small too.

daspartho commented 1 year ago

I'll take on

and will open up PR :)

SaurabhBudhwani26 commented 1 year ago

Hi @ydshieh , I want to contribute to this issue. Can you please help me to find the remaining files?

SD-13 commented 1 year ago

Hi @ydshieh , I want to contribute to this issue. Can you please help me to find the remaining files?

Hey @SaurabhBudhwani26 , please check this. I hope it will be helpful. Thanks,

ztjhz commented 1 year ago

I'll work on configuration_visual_bert.py

Xabilahu commented 1 year ago

I will work on:

ztjhz commented 1 year ago

I will work on

AShreyam commented 1 year ago

Can I work on this? @ydshieh

AShreyam commented 1 year ago

I will work on flava

AShreyam commented 1 year ago

Now, I will work on Longformer, Pegasus and VisualBERT.

ydshieh commented 1 year ago

@AShreyam You didn't open a PR, and you merged your branch into your own main branch.

AShreyam commented 1 year ago

I am really sorry for the inconvenience.

AShreyam commented 1 year ago

Here is the actual pull request. Thank You :)

lappemic commented 1 year ago

Work on configuration_big_bird.py

daspartho commented 1 year ago

I'll take on

and open up PR :)

AymenBer99 commented 1 year ago

I'll take on CodeGen

daspartho commented 1 year ago

I'll take on Data2Vec ones :)

AymenBer99 commented 1 year ago

I'll take on conditional_detr

ak04p commented 1 year ago

I'll take on realm

AymenBer99 commented 1 year ago

I'll take on convbert

daspartho commented 1 year ago

I'll take on CLIP =)

AymenBer99 commented 1 year ago

I'll take XLNet

juancopi81 commented 1 year ago

I can take the wav2vec2 ones if that is ok, is someone else working on those?

AymenBer99 commented 1 year ago

I'll take XLM

AymenBer99 commented 1 year ago

I'll take cvt

mukesh663 commented 1 year ago

I'll take pegasus and pegasus_x

ndrohith09 commented 1 year ago

I will take fnet and flava.

soma2000-lang commented 1 year ago

@ydshieh Added config files for convnext

ydshieh commented 1 year ago

Oh it will close this ...?

The previous merged PRs didn't close this issue. Strange!