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

Deleting Samples in a Batch

Delete samples from a dataset in a batch based on the sample ID list.

dataset.delete_samples(samples)

Sample Code

Delete samples from a dataset in a batch.
from modelarts.session import Session
from modelarts.dataset import Dataset
session = Session()

dataset = Dataset(session, dataset_id)
samples = []
samples.append("2551e78974aed9b60156d8376232f6bd")
samples.append("0d315fec1efc7568de5cccf522c10a1b")
dataset.delete_samples(samples)

Parameters

Table 1 Request parameters

Parameter

Mandatory

Type

Description

samples

Yes

List of String

IDs of the samples to be deleted