Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Notebook test for Gensen Local. #179

Merged
merged 4 commits into from Jul 26, 2019
Merged

Notebook test for Gensen Local. #179

merged 4 commits into from Jul 26, 2019

Conversation

AbhiramE
Copy link
Contributor

@AbhiramE AbhiramE commented Jul 19, 2019

Description

  • Added notebook tests to gensen_local.ipynb. This test ensures the notebook runs quickly (timed at 6 minutes) end to end by limiting the number of epochs to 1.
  • As part of this I have added a flag to limit the number of epoch in the gensen_train file.

The change addresses missing tests for gensen_local notebook.

Related Issues

#25

Checklist:

  • My code follows the code style of this project, as detailed in our contribution guidelines.
  • I have added tests.
  • I have updated the documentation accordingly.

@review-notebook-app
Copy link

Check out this pull request on ReviewNB: https://app.reviewnb.com/microsoft/nlp/pull/179

You'll be able to see visual diffs and write comments on notebook cells. Powered by ReviewNB.

@AbhiramE AbhiramE changed the title Abhiram gensen Notebook test for Gensen Local. Jul 19, 2019
@miguelgfierro
Copy link
Member

hey @AbhiramE how long does it take to compute this notebook with 1 epoch?

@AbhiramE
Copy link
Contributor Author

hey @AbhiramE how long does it take to compute this notebook with 1 epoch?

It takes around 6 minutes. (But this is not factoring in the time to download the word vectors)

@miguelgfierro
Copy link
Member

It takes around 6 minutes. (But this is not factoring in the time to download the word vectors)

How much is the word vectors?

@AbhiramE
Copy link
Contributor Author

It takes around 6 minutes. (But this is not factoring in the time to download the word vectors)

How much is the word vectors?

With word vectors included the test runs for 9m 45s. Around 10 minutes.

parameters=dict(
max_epoch=1,
config_filepath="../../scenarios/sentence_similarity/gensen_config.json",
Copy link
Member

Choose a reason for hiding this comment

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

of the configuration that you have here https://github.com/microsoft/nlp/blob/staging/scenarios/sentence_similarity/gensen_config.json, would it be possible to add some of this parameters as default values in the code and remove the config json?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Getting rid of config requires some major changes to the code. @catherine667 had mentioned this in her PR comments here,#78 (comment)

It would be difficult to restructure the code in next week we have left in the project.

Copy link
Member

Choose a reason for hiding this comment

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

makes sense

1. Added compute_correlation_coeff method to utils and separated it from
the predict method to ensure single responsbility.
2. Added tests accordingly.
3. In the notebook added a scrap to track preditions and assert it in
tests.
4. Also added extra documentation to explain what the predict method is
doing.
5. Minor fix to stop train at max_epoch.
@AbhiramE
Copy link
Contributor Author

Pushed an update with the following,

  1. Added compute_correlation_coeff method to utils and separated it from the predict method to ensure single responsibility.
  2. Added tests accordingly.
  3. In the notebook added a scrap to record model predictions and assert it in tests.
  4. Also added extra documentation to explain what the predict method is doing.
  5. Minor fix to stop train at max_epoch.

Copy link
Member

@miguelgfierro miguelgfierro left a comment

Choose a reason for hiding this comment

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

ME GUSTA!!!

@miguelgfierro miguelgfierro merged commit 79e99dc into staging Jul 26, 2019
@miguelgfierro miguelgfierro deleted the abhiram-gensen branch July 26, 2019 10:41
@miguelgfierro miguelgfierro mentioned this pull request Jul 26, 2019
3 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants