Skip to content

Commit

Permalink
[Flax] Update no init test for Flax v0.7.1 (#28735)
Browse files Browse the repository at this point in the history
  • Loading branch information
sanchit-gandhi authored Jan 26, 2024
1 parent abe0289 commit de13a95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_modeling_flax_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -984,7 +984,7 @@ def test_no_automatic_init(self):

# Check if we params can be properly initialized when calling init_weights
params = model.init_weights(model.key, model.input_shape)
self.assertIsInstance(params, FrozenDict)
assert isinstance(params, (dict, FrozenDict)), f"params are not an instance of {FrozenDict}"
# Check if all required parmas are initialized
keys = set(flatten_dict(unfreeze(params)).keys())
self.assertTrue(all(k in keys for k in model.required_params))
Expand Down

0 comments on commit de13a95

Please sign in to comment.