Help Center/ ModelArts/ SDK Reference/ Data Management/ Managing Samples/ Querying Details About a Sample
Updated on 2022-11-24 GMT+08:00

Querying Details About a Sample

Obtain details about a specified sample in a dataset based on the sample ID.

dataset.get_sample_info(sample_id)

Sample Code

Obtain details about a specified sample in a dataset based on the sample ID.
from modelarts.session import Session
from modelarts.dataset import Dataset
session = Session()

dataset = Dataset(session, dataset_id)
sample_info = dataset.get_sample_info(sample_id="2551e78974aed9b60156d8376232f6bd")
print(sample_info) # Print the detailed information about the sample.

Parameters

Table 1 Request parameters

Parameter

Mandatory

Type

Description

sample_id

Yes

String

Sample ID