-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Make converter hashtable test not overly specific #7249
Make converter hashtable test not overly specific #7249
Conversation
tfjs-converter's saved model conversion test for hashtable depends on the exact names of the hashtable weights it saves, but these names are generated and may change between versions of TF. This was observed when syncing into google3, which is using tf 2.12. This PR prevents the test from checking the name of the hashtable weights.
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.
Reviewable status: 0 of 1 approvals obtained (waiting on @mattsoulanille and @pyu10055)
tfjs-converter/python/tensorflowjs/converters/tf_saved_model_conversion_v2_test.py
line 563 at r1 (raw file):
self.assertEqual(weights_manifest['weights'][2]['dtype'], 'int32') self.assertEqual(weights_manifest, expected_weights_manifest)
self.assertEqual(weights_manifest, expected_weights_manifest)
Is this duplicated with your additions?
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.
Reviewable status: 0 of 1 approvals obtained (waiting on @Linchenn and @pyu10055)
tfjs-converter/python/tensorflowjs/converters/tf_saved_model_conversion_v2_test.py
line 563 at r1 (raw file):
Previously, Linchenn wrote…
self.assertEqual(weights_manifest, expected_weights_manifest)
Is this duplicated with your additions?
Nice catch. Thanks!
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!
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.
Reviewable status: complete! 1 of 1 approvals obtained (waiting on @Linchenn and @mattsoulanille)
tfjs-converter/python/tensorflowjs/converters/tf_saved_model_conversion_v2_test.py
line 556 at r1 (raw file):
self.assertEqual(weights_manifest['paths'], ['group1-shard1of1.bin']) self.assertEqual(weights_manifest['weights'][0], {'name': 'unknown_0', 'shape': [], 'dtype': 'int32'})
should skip name for weights[0] too?
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.
Reviewable status: complete! 1 of 1 approvals obtained (waiting on @Linchenn and @pyu10055)
tfjs-converter/python/tensorflowjs/converters/tf_saved_model_conversion_v2_test.py
line 556 at r1 (raw file):
Previously, pyu10055 (Ping Yu) wrote…
should skip name for weights[0] too?
Only the two weights with numbers for names were affected by tf 2.12, so I think it's okay to still check weights[0]. I can change this if you want, though.
tfjs-converter's saved model conversion test for hashtable depends on the exact names of the hashtable weights it saves, but these names are generated and may change between versions of TF. This was observed when syncing into google3, which is using tf 2.12. This PR prevents the test from checking the name of the hashtable weights. Co-authored-by: Ping Yu <[email protected]>
tfjs-converter's saved model conversion test for hashtable depends on the exact names of the hashtable weights it saves, but these names are generated and may change between versions of TF. This was observed when syncing into google3, which is using tf 2.12. This PR prevents the test from checking the name of the hashtable weights.
To see the logs from the Cloud Build CI, please join either our discussion or announcement mailing list.
This change is