-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enh: Implements
InferenceModule
as a pipelined module with separate…
… preprocessor, predictor, and postprocessor modules (#2105) * Adding inference pipeline with seperate pre-processing, predict and post-processing modules * Update to flatten outputs from predict consistent to support triton * inference module refactor * add back InferenceLudwigModel * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * unify modules into inference.py * cleaned up inaccurate documentation * clean up * clean up type hints and update InferenceLudwigModel * clean up type hint; passes test_torchscript.py * added typing to inference module for clarity * remove inference_module_file_name constant * unified predict module with postproc * removed InferencePredictor entirely * add back the old inference module * add back training set metadata * revert change to predict module, move feature filtering to postproc * cleanup inference_module_v0 * cleanup * adds device placement to InferenceLudwigModel * adds ability to save/load torchscript on particular devices * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * allows saving torchscript with dict of devices from api.py * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * correct device inputs * refactor to expose inference stages (prep for triton refactor) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * remove magic 'cpu' string * remove extraneous constants * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * add from_directory classmethod for e2e users * merge * merge InferenceModule and InferenceLudwigModel * add comment * revert small change * cleanup * add to_torchscript functionality * cleanup * pushes device logic down into inference stages * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * move device placement upstream to inference module to ensure stage modules are performant * adds logs for device placement experiments * removes logs * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * remove stage_to_dict * clean up how we get input device in predictor_forward * first commit * wip * updated interfaces * postproc GPU * add intelligent device placement * clean up device api * revert flatten op in inference_module_v0 * remove dtype workaround * benchmarking code * add DEVICE constant as good default for loading/saving * added helpful logging and style * cleanup * cleanup, adding docstrings * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * docstring Co-authored-by: Geoffrey Angus <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
a587181
commit c26e81a
Showing
19 changed files
with
588 additions
and
165 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.