Obtaining 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.
from modelarts.session import Session from modelarts.estimatorV2 import Estimator session = Session() info = Estimator.get_train_instance_types(session=session) print(info)
Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
session |
Yes |
Object |
Session object. For details about the initialization method, see Session Authentication. |
|
Type |
Description |
|---|---|
|
List |
List of resource flavors |
|
Parameter |
Type |
Description |
|---|---|---|
|
error_msg |
String |
Error message when calling an API failed. This parameter is unavailable if an API is successfully called. |
|
error_code |
String |
Error code when calling an API failed. For details, see Error Code. This parameter is unavailable if an API is successfully called. |
|
error_solution |
String |
Solution to an API calling failure. This parameter is unavailable if an API is successfully called. |
Last Article: APIs for Resources and Engine Specifications
Next Article: Obtaining Engine Types
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.