-
Notifications
You must be signed in to change notification settings - Fork 30
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
Remove ensemble
specific code
#305
Remove ensemble
specific code
#305
Conversation
- Removing `abstractmethod` from `transform` to reflect optional implementation
@@ -107,6 +67,7 @@ def transform( | |||
""" | |||
return transformable | |||
|
|||
@abstractmethod |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This export
method of the TritonOperator
is now an abstractmethod. Meaning that an operator that inherits from TritonOperator is required to implement the export method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing the default implemntation here because it wasn't used. Each Triton Operator is expected to export it's own model config that is specific to the backend/model that is being used.
exportable_node_idx = 0 | ||
node_id_lookup = {} | ||
for node in nodes: | ||
if node.exportable(backend): | ||
if isinstance(node.op, TritonOperator): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need to check the exportable
method anymore because every TrtionOperator
is expected to implement export
to save the operator as a Triton model.
if node_config is not None: | ||
node_configs.append(node_config) | ||
|
||
executor_config = self._executor_model_export(path, name, ensemble) | ||
if hasattr(node.op, "save_artifacts"): | ||
node.op.save_artifacts(str(artifact_path)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This new method save_artifacts
enables any inference operator to save state that can't be pickled, without needing to implement a TritonOperator with a model export. Complements the existing load_artifacts
method that is called within the executor_model.py
Documentation preview |
Following the removal of the ensemble runtime export in #255. Further cleanup of methods that are no longer required.
Motivation
Details
One new feature is added by this PR. A
save_artifacts
method that complements theload_artifacts
method. And facilitates the removal of theexport
methods on all non-Triton operators.OperatorRunner
(and corresponding Triton Python Modeloprunner_model.py
)TritonExecutorRuntime
(and corresponding Triton Python Modelexecutor_model.py
)from_config
methods from non-Triton specific operators (this method was called byoprunner_model.py
to reload an operator from the Triton model config). This was used when we were exporting each operator as a triton model)export
methods from non-Triton specific operators.exportable_backends
from operatorsTritonOperator
.export
to save non-pickleable objects for reloading. Added a new method calledsave_artifacts
that serves this purpose and is intended to be implemented on any operator that implementsload_artifacts
.PredictImplicitTriton
. The regularPredictImplicit
is sufficient now that we havesave_artifacts
implemented.