Skip to content

Add support for loading torchscript models#25321

Merged
damccorm merged 15 commits intoapache:masterfrom
AnandInguva:torchjit
Feb 11, 2023
Merged

Add support for loading torchscript models#25321
damccorm merged 15 commits intoapache:masterfrom
AnandInguva:torchjit

Conversation

@AnandInguva
Copy link
Copy Markdown
Contributor

@AnandInguva AnandInguva commented Feb 6, 2023

Adding support for loading models that are saved in torchscript format

More details at https://pytorch.org/tutorials/beginner/saving_loading_models.html#export-load-model-in-torchscript-format

This will enable the users to load the whole model without requiring model class.


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels
Python tests
Java tests
Go tests

See CI.md for more information about GitHub Actions CI.

@github-actions github-actions bot added the python label Feb 6, 2023
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 6, 2023

Codecov Report

Merging #25321 (e5c9062) into master (bf3710c) will decrease coverage by 0.09%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master   #25321      +/-   ##
==========================================
- Coverage   72.93%   72.85%   -0.09%     
==========================================
  Files         748      750       +2     
  Lines       99366    99484     +118     
==========================================
+ Hits        72473    72476       +3     
- Misses      25525    25640     +115     
  Partials     1368     1368              
Flag Coverage Δ
python 82.25% <0.00%> (-0.14%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...thon/apache_beam/ml/inference/pytorch_inference.py 0.00% <0.00%> (ø)
...ache/beam/model/fn_execution/v1/beam_fn_api_pb2.py 100.00% <0.00%> (ø)
...xamples/inference/onnx_sentiment_classification.py 0.00% <0.00%> (ø)
.../python/apache_beam/ml/inference/onnx_inference.py 0.00% <0.00%> (ø)
...on/apache_beam/runners/dataflow/dataflow_runner.py 81.88% <0.00%> (+0.14%) ⬆️
...python/apache_beam/runners/worker/worker_status.py 76.66% <0.00%> (+1.33%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@AnandInguva AnandInguva marked this pull request as ready for review February 6, 2023 15:51
@AnandInguva
Copy link
Copy Markdown
Contributor Author

Run PythonLint PreCommit

@AnandInguva
Copy link
Copy Markdown
Contributor Author

R: @damccorm

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 6, 2023

Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control

Copy link
Copy Markdown
Contributor

@damccorm damccorm left a comment

Choose a reason for hiding this comment

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

Thanks for adding this!

Copy link
Copy Markdown
Contributor

@damccorm damccorm left a comment

Choose a reason for hiding this comment

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

LGTM, I'll merge once checks pass

@AnandInguva
Copy link
Copy Markdown
Contributor Author

LGTM, I'll merge once checks pass

I think there are some lint issues(not clear why they appear). I will tackle them tomorrow and will ping you.

@AnandInguva
Copy link
Copy Markdown
Contributor Author

@damccorm The tests pass but for some reason they are not updated in UI. PTAL

@damccorm
Copy link
Copy Markdown
Contributor

Run Whitespace PreCommit

@damccorm
Copy link
Copy Markdown
Contributor

LGTM pending checks passing

@damccorm damccorm merged commit 9b77bf9 into apache:master Feb 11, 2023
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.

2 participants