-
Notifications
You must be signed in to change notification settings - Fork 26.3k
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
Fix test_configuration_tie in FlaxEncoderDecoderModelTest #14076
Fix test_configuration_tie in FlaxEncoderDecoderModelTest #14076
Conversation
Thanks a lot for fixing the test! The implemented approach is clean and makes total sense. However, I'm not really in favor of exposing the encoder module this way. The reason is the following. In PyTorch callling @patil-suraj - could you take a look here as well? |
I agree with @patrickvonplaten , especially the exposure here is only for the testing purpose. By P.S. Currently, |
Agree with @patrickvonplaten . @ydshieh I think we could still keep the test. For this use case, we could use the module = model.module.bind(model.params)
enc_config = module.encoder.config
dec_config = module.decoder.config WDYT @patrickvonplaten? |
It works, thank you @patil-suraj . |
I let you merge if you're happy with the PR @patil-suraj :-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM now! Thanks a lot for fixing this @ydshieh !
…e#14076) * check test_configuration_tie * Fix test_configuration_tie * make test slow again * Remove property and use model.module.bind * revert to slow test Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
What does this PR do?
Fix the
test_configuration_tie
inFlaxEncoderDecoderModelTest
.The
test_configuration_tie
inFlaxEncoderDecoderModelTest
would fail, as shown in run_tests_flax. See below.FlaxEncoderDecoderModel
didn't haveencoder
anddecoder
- they are insideFlaxEncoderDecoderModule
, and need an indirect way to access them.However, it might be too much to add these just for a test without other interesting use case.
If we don't want to add this to
FlaxEncoderDecoderModel
, we could probably move the changes to be insidetest_configuration_tie
.BTW, this test is
@slow
, so won't be run by CircleCI. I saw it is mentionedCircleCI does not run the slow tests, but github actions does every night!
in How to contribute to transformers?.So
test_configuration_tie
failed on github actions, and I am wondering when a slow test fails, what are the actions? Is it only for Hugging Face internal?(I finally found the report under GitHub actions tab)
CircleCI test results