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

refactor: Simplify model export #73

Merged
merged 8 commits into from
Jul 6, 2022
Merged

refactor: Simplify model export #73

merged 8 commits into from
Jul 6, 2022

Conversation

streino
Copy link
Contributor

@streino streino commented Jun 1, 2022

Replaces OutputMapperLayer with a custom serving function.

This means we don't need to save two models (training/serving)
anymore, as the (ex training) model will do the "output mapping"
through the custom serving function.

With this approach, we could even have multiple serving functions with
different output mapping strategies.

Replaces OutputMapperLayer with a custom serving function.

This means we don't need to save two models (training/serving)
anymore, as the (ex training) model will do the "output mapping"
through the custom serving function.

With this approach, we could even have multiple serving functions with
different output mapping strategies.
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@streino
Copy link
Contributor Author

streino commented Jun 1, 2022

I'd love to get feedback on the proposed refactoring.

It's not a fluid as I'd like, but my feeling is it's going in the right direction (?). I put a few FIXME in the comments where things are still a bit rough. Comments welcome!

@streino streino changed the title WIP: Tentative refactoring around custom serving function refactor: Simplify model export Jun 1, 2022
@streino streino marked this pull request as ready for review June 13, 2022 09:12
@streino streino requested review from 8huit and alexgarel June 13, 2022 09:12
@streino
Copy link
Contributor Author

streino commented Jun 13, 2022

Ready for rewiew. Hopefully it's at least as readable as pre-refactoring 😅

There are inconsistencies in the run timestamps because I had to fix a memory crash in the "Test" section and didn't want to re-run the full 2h of model training. It's only cosmetic.

lib/model.py Outdated Show resolved Hide resolved
@streino streino requested a review from AnisZakari June 21, 2022 13:40
Copy link
Contributor

@AnisZakari AnisZakari left a comment

Choose a reason for hiding this comment

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

Looks good to me, I just suggested some minor changes.

lib/model.py Outdated Show resolved Hide resolved
lib/model.py Outdated Show resolved Hide resolved
lib/model.py Outdated Show resolved Hide resolved
lib/model.py Outdated Show resolved Hide resolved
lib/model.py Outdated Show resolved Hide resolved
experiments/Train.ipynb Show resolved Hide resolved
@streino streino merged commit 23aa578 into master Jul 6, 2022
@streino streino deleted the refactor-saved-model branch July 6, 2022 18:10
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.

2 participants