Querying the List of Resource Flavors
Sample Code
In ModelArts notebook, you do not need to enter authentication parameters for session authentication. For details about session authentication of other development environments, see Session Authentication.
1 2 3 4 5 |
from modelarts.session import Session
from modelarts.estimator import Estimator
session = Session()
algo_info = Estimator.get_train_instance_types(modelarts_session=session)
print(algo_info)
|
Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
modelarts_session |
Yes |
Object |
Session object. For details about the initialization method, see Session Authentication. |
|
Type |
Description |
|---|---|
|
List |
List of resource flavor attributes |
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code when the API call fails. This parameter is not included when the API call succeeds. |
|
error_msg |
String |
Error message when the API call fails. This parameter is not included when the API call succeeds. |
Last Article: Querying a Built-in Algorithm
Next Article: Querying the List of Engine Types
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.