Resources#
Creation#
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#
cores#
Number of CPUs to be allocated per instance
gpus#
Number of GPUs to be allocated per instance
memory#
Memory resources to be allocated per instance
Methods#
describe#
Resources.describe()
Print a description of the resource configuration
to_dict#
Resources.to_dict()