Skip to content

Commit

Permalink
Fix test_configuration_tie in FlaxEncoderDecoderModelTest (#14076)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
ydshieh and ydshieh authored Nov 2, 2021
1 parent a767276 commit 4a394cf
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/test_modeling_flax_encoder_decoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,8 +357,11 @@ def get_decoder_config(self):
return config

def _check_configuration_tie(self, model):
assert id(model.decoder.config) == id(model.config.decoder)
assert id(model.encoder.config) == id(model.config.encoder)

module = model.module.bind(model.params)

assert id(module.decoder.config) == id(model.config.decoder)
assert id(module.encoder.config) == id(model.config.encoder)

@slow
def test_configuration_tie(self):
Expand Down

0 comments on commit 4a394cf

Please sign in to comment.