Function: bundle_get_model_id

Applicability

Product

Supported (√/x)

Atlas A3 training products / Atlas A3 inference products

Atlas A2 training products / Atlas A2 inference products

Atlas training products

Atlas inference products

Atlas 200I/500 A2 inference products

Function Usage

Obtains the ID of an executable model.

This API needs to be used with other APIs to dynamically update variables. For details, see acl.mdl.bundle_load_from_file.

Prototype

  • C Prototype
    1
    aclError aclmdlBundleGetModelId(uint32_t bundleId, size_t index, uint32_t *modelId)
    
  • Python Function
    1
    model_id, ret = acl.mdl.bundle_get_model_id(bundle_id, index)
    

Parameter Description

Parameter

Description

bundle_id

Int, bundle_id returned after the model is successfully loaded through the acl.mdl.bundle_load_from_file API or acl.mdl.bundle_load_from_mem API.

index

Int, index. Must be in the range of [0, Model count – 1]. Call acl.mdl.bundle_get_model_num to obtain the model count.

Return Value Description

Return Value

Description

model_id

Int, ID of an executable model.

ret

Int, error code: 0 on success; else, failure.

Reference

For details about the API call sequence and sample code, see Weight Update.