Skip to content

Commit 4a394cf

Browse files
authored
Fix test_configuration_tie in FlaxEncoderDecoderModelTest (#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>
1 parent a767276 commit 4a394cf

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/test_modeling_flax_encoder_decoder.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -357,8 +357,11 @@ def get_decoder_config(self):
357357
return config
358358

359359
def _check_configuration_tie(self, model):
360-
assert id(model.decoder.config) == id(model.config.decoder)
361-
assert id(model.encoder.config) == id(model.config.encoder)
360+
361+
module = model.module.bind(model.params)
362+
363+
assert id(module.decoder.config) == id(model.config.decoder)
364+
assert id(module.encoder.config) == id(model.config.encoder)
362365

363366
@slow
364367
def test_configuration_tie(self):

0 commit comments

Comments
 (0)