Deze pagina is nog niet beschikbaar in uw eigen taal. We werken er hard aan om meer taalversies toe te voegen. Bedankt voor uw steun.

On this page

Show all

Deleting a Model

Updated on 2024-06-12 GMT+08:00

You can use the API to delete a model object.

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.

  • Method 1: Delete the model object created in Importing a Model.
    1
    2
    3
    4
    5
    6
    from modelarts.session import Session
    from modelarts.model import Model
    
    session = Session()
    model_instance = Model(session, model_id="your_model_id")
    model_instance.delete_model()
    
  • Method 2: Delete the model object returned in Obtaining Model Objects.
    1
    2
    3
    4
    5
    6
    7
    from modelarts.session import Session
    from modelarts.model import Model
    
    session = Session()
    model_object_list = Model.get_model_object_list(session)
    model_instance = model_object_list[0]                   
    model_instance.delete_model()
    
Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback