Get Job Results#

View the results produced by a completed data generation job.

Prerequisites#

Before you can get results from a data generation job, make sure that you have:

  • Obtained the base URL of your NeMo Data Designer service

  • Set the NEMO_MICROSERVICES_BASE_URL environment variable to your NeMo Data Designer service endpoint

  • A completed data generation job

export NEMO_MICROSERVICES_BASE_URL="https://your-data-designer-service-url"

To Get Results from a Data Generation Job#

Use the NeMoDataDesignerClient to get results from a data generation job:

import os
from nemo_microservices.data_designer.essentials import NeMoDataDesignerClient


# Initialize client
data_designer_client = NeMoDataDesignerClient(
    base_url=os.environ["NEMO_MICROSERVICES_BASE_URL"]
)

# Connect to a job
job_results = data_designer_client.get_job_results("job_abc123xyz")

# Get the dataset result
df = job_results.load_dataset()

# Get the analysis result
analysis = job_results.load_analysis()

Results can also be downloaded to a local directory. This method will download both the dataset and the analysis:

job_results.download_artifacts("/local/path/")