Skip to content

Transformer#

Handle#

[source]

get_model_serving#

Connection.get_model_serving()

Get a reference to model serving to perform operations on. Model serving operates on top of a model registry, defaulting to the project's default model registry.

Returns

ModelServing. A model serving handle object to perform operations on.


Creation#

[source]

create_transformer#

ModelServing.create_transformer(script_file=None, resources={})

Create a Transformer metadata object.

Lazy

This method is lazy and does not persist any metadata or deploy any transformer. To create a deployment using this transformer, set it in the predictor.transformer property.

Arguments

  • script_file Optional[str]: Path to a custom predictor script implementing the Transformer class.
  • resources Optional[Union[hsml.resources.PredictorResources, dict]]: Resources to be allocated for the transformer.

Returns

Transformer. The model metadata object.


Retrieval#

predictor.transformer#

Transformers can be accessed from the predictor metadata objects.

predictor.transformer

Predictors can be found in the deployment metadata objects (see Predictor Reference). To retrieve a deployment, see the Deployment Reference.

Properties#

[source]

inference_batcher#

Configuration of the inference batcher attached to the deployment component (i.e., predictor or transformer).


[source]

resources#

Resource configuration for the deployment component (i.e., predictor or transformer).


[source]

script_file#

Script file ran by the deployment component (i.e., predictor or transformer).


Methods#

[source]

describe#

Transformer.describe()

Print a description of the transformer


[source]

to_dict#

Transformer.to_dict()

To be implemented by the component type