doc-exports/docs/modelarts/sdk-ref/modelarts_04_0186.html
Lai, Weijian 1ad28cc33e modelarts sdk-ref first version
Reviewed-by: Jiang, Beibei <beibei.jiang@t-systems.com>
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: Lai, Weijian <laiweijian4@huawei.com>
Co-committed-by: Lai, Weijian <laiweijian4@huawei.com>
2023-03-01 15:24:28 +00:00

11 KiB

Stopping a Visualization Job

Sample Code

In the ModelArts notebook instance, you do not need to enter authentication parameters for session authentication. For details about session authentication of other development environments, see Session Authentication.

  • Method 1: Stop a visualization job based on the specified visualization_id.
    1
    2
    3
    4
    5
    from modelarts.session import Session
    from modelarts.estimator import VisualizationJob
    session = Session()
    job = VisualizationJob(modelarts_session=session, visualization_id='8992')
    status = job.stop_visualization_job()
    

Parameter Description

Table 1 VisualizationJob request parameters

Parameter

Mandatory

Type

Description

modelarts_session

Yes

Object

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

visualization_id

Yes

String

ID of a visualization job

Table 2 stop_visualization_job response parameters

Parameter

Type

Description

error_code

String

Error code when the API fails to be called. For details, see .

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.

is_success

Boolean

Whether the API call succeeds