KEMBAR78
Add Doc Test GPT-J by ArEnSc · Pull Request #16507 · huggingface/transformers · GitHub
Skip to content

Conversation

@ArEnSc
Copy link
Contributor

@ArEnSc ArEnSc commented Mar 31, 2022

What does this PR do?

Fixes the broken doc tests for GPT-J
Apart of the documentation sprint work.

Before submitting

Who can review?

@ydshieh
@sgugger
-->

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Mar 31, 2022

The documentation is not available anymore as the PR was closed or merged.

@ydshieh
Copy link
Collaborator

ydshieh commented Mar 31, 2022

@ArEnSc

Thank you for working on GPT-J.
Maybe you can just put any expected value as empty string. Once other parts are done,
please ping me and I will try to get and put the expected values :)

@ArEnSc
Copy link
Contributor Author

ArEnSc commented Apr 1, 2022

@ArEnSc

Thank you for working on GPT-J. Maybe you can just put any expected value as empty string. Once other parts are done, please ping me and I will try to get and put the expected values :)

yep please do and let me know and we can close this =)

@ydshieh
Copy link
Collaborator

ydshieh commented Apr 5, 2022

Hi, @ArEnSc

After discussing with the team, we found that there is no real checkpoints for finetuned GPT-J model on downstream tasks. (There is one for text seq. classification, but it is for Korean language).

If you still want to work on this GPT-J doctest, the best we could do for now is to use a tiny model (that is created for testing purpose)

https://huggingface.co/hf-internal-testing/tiny-random-gptj

With this one, there won't be any OOM issue. Let me know if you want to continue, and if so, don't hesitate if you have any issue using this tiny model checkpoint.

Thanks!

@ArEnSc
Copy link
Contributor Author

ArEnSc commented Apr 5, 2022

Hi, @ArEnSc

After discussing with the team, we found that there is no real checkpoints for finetuned GPT-J model on downstream tasks. (There is one for text seq. classification, but it is for Korean language).

If you still want to work on this GPT-J doctest, the best we could do for now is to use a tiny model (that is created for testing purpose)

https://huggingface.co/hf-internal-testing/tiny-random-gptj

With this one, there won't be any OOM issue. Let me know if you want to continue, and if so, don't hesitate if you have any issue using this tiny model checkpoint.

Thanks!

will do! Ill do this after work today

@ydshieh
Copy link
Collaborator

ydshieh commented Apr 8, 2022

Hi, @ArEnSc

Thank you for the effort.

I need to investigate first why it is non deterministic, and see if there is a way to fix this.
We strongly prefer not to disable doctests for some parts in a model.
(Otherwise, our team need to discuss to justify it and make the decision).

I will take a look in this soon!

@ydshieh
Copy link
Collaborator

ydshieh commented Apr 8, 2022

Hi, @ArEnSc

I uploaded the checkpoints

"ydshieh/tiny-random-gptj-for-sequence-classification"
"ydshieh/tiny-random-gptj-for-question-answering"

I tested with tiny-random-gptj-for-question-answering and the results are now deterministic. Could you use them please, and let me know if they work well :-)

@ArEnSc
Copy link
Contributor Author

ArEnSc commented Apr 11, 2022

@ydshieh I think we should be good to go here let me know =)
edit (# limitations under the License..) <-- ill fix this in a bit. Had to trigger CI some how

Copy link
Collaborator

@ydshieh ydshieh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Run locally - tests pass.
LGTM. Let's wait @patil-suraj final review :-) before merging.

if self.args.inference:
if self.args.memory:
memory, inference_summary = self.inference_memory(model_name, batch_size, sequence_length)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for this new line :-) Let's not change this file 🙏

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be addressed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

strange I will fix that soon

@ydshieh ydshieh requested review from patil-suraj and sgugger and removed request for sgugger April 11, 2022 20:12
@ydshieh
Copy link
Collaborator

ydshieh commented Apr 11, 2022

@ArEnSc Would you mind to remove the comments with (very) long error message - just easier to load this page :-) Thanks!

@ArEnSc
Copy link
Contributor Author

ArEnSc commented Apr 12, 2022

@ydshieh looks like it good to go!

Copy link
Contributor

@patil-suraj patil-suraj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for working on this! Good for merge once the comment for benchmark_utils.py file is addressed :)

if self.args.inference:
if self.args.memory:
memory, inference_summary = self.inference_memory(model_name, batch_size, sequence_length)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be addressed.

@ArEnSc
Copy link
Contributor Author

ArEnSc commented Apr 12, 2022

@ydshieh I think this is done after CI passes =)

@ArEnSc
Copy link
Contributor Author

ArEnSc commented Apr 12, 2022

@ydshieh we are good to merge! =)

@ydshieh
Copy link
Collaborator

ydshieh commented Apr 13, 2022

@ydshieh we are good to merge! =)

Yes! Merged now.
Thanks a lot for working on this doctest for GPT-J, @ArEnSc 🚀 🎉

@ydshieh ydshieh merged commit 06b4aac into huggingface:main Apr 13, 2022
@ydshieh ydshieh changed the title [WIP] Add Doc Test GPT-J Add Doc Test GPT-J Apr 13, 2022
elusenji pushed a commit to elusenji/transformers that referenced this pull request Jun 12, 2022
* Required the values GPTJ unfortunately cannot run the model =)

* Added the file to the doc tests

* Run Fixup and Style

* Fixed with the test versions of gptj. Ran Style and Fixup.

* Trigger ci

* A Minor Change to License

* Fixed spacing added to the benchmark_utils. Then refactored tests to const variables.

* Removed strings that were included as default parameters anyways.

Co-authored-by: ArEnSc <xx.mike.chung.xx@gmail.com>
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.

5 participants