Skip to content

Resources#

Creation#

[source]

Resources#

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

Resource configuration for a predictor or transformer.

Arguments

  • cores Optional[int]: Number of CPUs. The default value is 1 CPUs.
  • memory Optional[int]: Memory resources. The default value is 1024Mb.
  • gpus Optional[int]: Number of GPUs. The default value is 0 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()