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

7330 Add functionality to check if a model is fine-tunable #7427

Merged
merged 6 commits into from
Dec 8, 2020

Conversation

joejuzl
Copy link
Contributor

@joejuzl joejuzl commented Dec 1, 2020

Proposed changes:
Adds a new method rasa.model.can_fine_tune which uses fingerprinting to determine if a model can be fine-tuned.

Status (please check what you already did):

  • added some tests for the functionality
  • updated the documentation
  • updated the changelog (please check changelog for instructions)
  • reformat files using black (please check Readme for instructions)

@joejuzl joejuzl force-pushed the 7330/check_if_model_is_fine-tunable branch from b365fb3 to 60e0ac1 Compare December 1, 2020 15:37
@joejuzl joejuzl changed the base branch from master to continuous_training December 1, 2020 15:37
rasa/model.py Show resolved Hide resolved
Copy link
Contributor

@dakshvar22 dakshvar22 left a comment

Choose a reason for hiding this comment

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

Looking good 👍 Please add types for pytests.

rasa/model.py Outdated Show resolved Hide resolved
tests/core/test_model.py Outdated Show resolved Hide resolved
rasa/model.py Show resolved Hide resolved
Copy link
Contributor

@wochinge wochinge left a comment

Choose a reason for hiding this comment

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

production code looks great! Need to have another look at the tests later 👍

rasa/model.py Show resolved Hide resolved
(_fingerprint(stories=["other"]), False),
],
)
def test_fine_tune_fingerprint_changed(fingerprint2, changed):
Copy link
Contributor

Choose a reason for hiding this comment

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

types please

[("2.1.0", "2.1.0", True), ("2.0.0", "2.1.0", True), ("2.1.0", "2.0.0", False),],
)
async def test_can_fine_tune_min_version(
project: Text, monkeypatch, old_model_version, min_compatible_version, can_tune
Copy link
Contributor

Choose a reason for hiding this comment

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

types please

if "epochs" in p:
p["epochs"] += 10

importer.get_config = asyncio.coroutine(lambda: config)
Copy link
Contributor

Choose a reason for hiding this comment

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

asyncio.coroutine is deprecated 😬

@joejuzl joejuzl requested a review from wochinge December 3, 2020 15:03
Copy link
Contributor

@wochinge wochinge left a comment

Choose a reason for hiding this comment

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

Nice 👍

tests/core/test_model.py Outdated Show resolved Hide resolved
@wochinge
Copy link
Contributor

wochinge commented Dec 7, 2020

@dakshvar22 is the changes request still valid?

@dakshvar22 dakshvar22 self-requested a review December 7, 2020 19:21
Copy link
Contributor

@dakshvar22 dakshvar22 left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@joejuzl joejuzl merged commit b4e677c into continuous_training Dec 8, 2020
@joejuzl joejuzl deleted the 7330/check_if_model_is_fine-tunable branch December 8, 2020 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants