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

Querying the List of Visualization Job 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 VisualizationJob
session = Session()
job_visualization_instance_list = VisualizationJob.get_visualization_job_object_list(modelarts_session=session, is_show=True, status=8, per_page=10, page=1, sort_by="create_time", order="asc", search_content="job")
print(job_visualization_instance_list)

Parameters

Table 1 get_visualization_job_object_list request parameters

Parameter

Mandatory

Type

Description

modelarts_session

Yes

Object

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

status

No

String

Status of a visualization job. For details about the job statuses, see Job Statuses.

per_page

No

Integer

Number of jobs displayed on each page. The value range is [1, 100]. 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, create_time, or log_dir. 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 visualization job name. The value consists of 0 to 100 characters. By default, this parameter is left blank.

is_show

No

Boolean

Whether to print the visualization job list. Default value: True

Table 2 get_visualization_job_object_list response parameters

Parameter

Type

Description

VisualizationJob

Object

Visualization job object. This object contains attributes such as visualization_id, create_time, job_name, and status, and operations on a visualization job, such as querying, modifying, stopping, restarting, or deleting the visualization job.

Table 3 VisualizationJob parameters

Parameter

Type

Description

create_time

Long

Time when a visualization job is created

job_name

String

Name of a visualization job

status

Byte

Status of a visualization job. For details about the job statuses, see Job Statuses.

job_id

String

ID of a visualization job

is_success

Boolean

Whether the API call succeeds