qiskit_serverless.core.ComputeProfile¶
- class ComputeProfile(compute_profile_id, cpu, memory, gpu=None)[source]¶
One entry of a deployment’s compute-profile catalog.
Obtain these from
ServerlessClient.compute_profiles()(the catalog) orServerlessClient.compute_profile()(a single validated one); both are documented on the client. A profile can be used directly as asizes_mapvalue when uploading a function — it serializes to itscompute_profile_id, so it is interchangeable with that plain string.- compute_profile_id¶
the deployment’s identifier (e.g.
"24x120x1l40s"); the value that travels on the wire in asizes_map.
- cpu¶
number of vCPUs (e.g.
"24").
- memory¶
memory in GB (e.g.
"120").
- gpu¶
GPU allocation as count + model (e.g.
"1l40s");Nonefor a CPU-only profile.
- __init__(compute_profile_id, cpu, memory, gpu=None)¶
Methods
__init__(compute_profile_id, cpu, memory[, gpu])from_json(data)Build a
ComputeProfilefrom one entry of the compute-profiles endpoint payload.specs()Human-readable specs, e.g.
24 vCPU / 120 GB / 1l40s(GPU part omitted if none).Attributes