Skip to content
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

TF 2.0 Transformer: Remove metrics hack #6961

Merged
merged 5 commits into from
Jun 5, 2019
Merged

Conversation

guptapriya
Copy link
Contributor

@guptapriya guptapriya commented Jun 5, 2019

The underlying issue has been fixed so we can now create and update metrics in cross replica context.

Also fixed existing unit tests and added more tests which test distribution strategy codepaths as well.

@guptapriya guptapriya requested a review from isaprykin June 5, 2019 07:12
Copy link
Member

@tfboyd tfboyd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM see comment.

self.vocab_file = os.path.join(temp_dir, "vocab")
self.vocab_size = misc.get_model_params(FLAGS.param_set, 0)["vocab_size"]
self.bleu_source = os.path.join(temp_dir, "bleu_source")
self.bleu_ref = os.path.join(temp_dir, "bleu_ref")

def _assert_exists(self, filepath):
self.assertTrue(os.path.exists(filepath))

def test_train(self):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#1 thank you for working on these tests.

Question, do we need this test if we are not checking anything? My assumption is we will catch exceptions via the other tests. Not remotely against the test just asking.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, these tests are basically verifying that we get to the end of train without running into any errors.
I don't know of any other tests that verify this for transformer, are there any?

@guptapriya guptapriya merged commit e4bf28f into master Jun 5, 2019
@saberkun saberkun deleted the guptapriya-patch-8 branch March 4, 2020 23:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants