Help Center/ ModelArts/ SDK Reference/ Training Management (Old Version)/ Training Job Parameter Configuration/ Querying the List of Training Job Parameter Configuration Objects
Updated on 2024-03-21 GMT+08:00

Querying the List of Training Job Parameter Configuration Objects

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()
job_config_instance_list = Estimator.get_job_configs_object_list(modelarts_session=session, is_show=True, per_page=10, page=1, sort_by="create_time", order="asc", search_content="configname")
print(job_config_instance_list)

Parameters

Table 1 get_job_configs_object_list request parameters

Parameter

Mandatory

Type

Description

modelarts_session

Yes

Object

Session object. For details about the initialization method, see Session Authentication.

per_page

No

Integer

Number of job parameters displayed on each page. The value range is [1, 1000]. Default value: 10

page

No

Integer

Index of the page to be queried. Default value: 1

sortBy/sort_by

No

String

When AK/SK-based authentication is used, the parameter name is sortBy. When the username and password are used for authentication, the parameter name is sort_by. The parameter specifies the sorting mode of the query. The value can be job_name, job_desc, status, duration, engine_type, or create_time. Default value: job_name

order

No

String

Sorting order. The options are as follows:

  • asc: ascending order. It is the default value.
  • desc: descending order

search_content

No

String

Search content, for example, a parameter name. By default, this parameter is left blank.

is_show

No

Boolean

Whether to print the training job parameter configuration list. Default value: True

A training object list is returned in the successful response to get_job_configs_object_list. For details, see Table 2.

Table 2 TrainingJob object description

Parameter

Type

Description

TrainingJob

Object

Training object. This object contains attributes such as config_name, and operations on a training job parameter configuration, such as querying or deleting the training job parameter configuration. For example, you can use job_config_instance.config_name to obtain the name of a training job parameter configuration.