Skip to content

Resources#

Creation#

[source]

Resources#

hsml.resources.Resources(cores, memory, gpus)

Resource configuration for a predictor or transformer.

Arguments

  • cores int: Number of CPUs.
  • memory int: Memory (MB) resources.
  • gpus int: Number of GPUs.

Returns

Resources. Resource configuration for a predictor or transformer.


Retrieval#

predictor.resources#

Resources allocated for a preditor can be accessed from the predictor metadata object.

predictor.resources

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

transformer.resources#

Resources allocated for a transformer can be accessed from the transformer metadata object.

transformer.resources

Transformer can be found in the predictor metadata objects (see Predictor Reference).

Properties#

[source]

cores#

Number of CPUs to be allocated per instance


[source]

gpus#

Number of GPUs to be allocated per instance


[source]

memory#

Memory resources to be allocated per instance


Methods#

[source]

describe#

Resources.describe()

Print a description of the resource configuration


[source]

to_dict#

Resources.to_dict()