Evaluation Jobs Resource#

class nemo_microservices.resources.evaluation.JobsResource(client: NeMoMicroservices)#

Bases: SyncAPIResource

property with_raw_response: JobsResourceWithRawResponse#

This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content.

For more information, see https://docs.nvidia.com/nemo/microservices/latest/pysdk/index.html#accessing-raw-response-data-e-g-headers

property with_streaming_response: JobsResourceWithStreamingResponse#

An alternative to .with_raw_response that doesn’t eagerly read the response body.

For more information, see https://docs.nvidia.com/nemo/microservices/latest/pysdk/index.html#with_streaming_response

create(
*,
config: job_create_params.Config,
target: job_create_params.Target,
custom_fields: Dict[str, str] | NotGiven = NOT_GIVEN,
description: str | NotGiven = NOT_GIVEN,
namespace: str | NotGiven = NOT_GIVEN,
output_files_url: str | NotGiven = NOT_GIVEN,
ownership: Ownership | NotGiven = NOT_GIVEN,
project: str | NotGiven = NOT_GIVEN,
result: str | NotGiven = NOT_GIVEN,
status: JobStatus | NotGiven = NOT_GIVEN,
status_details: EvaluationStatusDetailsParam | NotGiven = NOT_GIVEN,
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) EvaluationJob#

Start a new evaluation job by providing the necessary model and evaluation specifications.

A unique id will be created and provided in the response along with additional details.

Parameters:
  • config – The evaluation configuration.

  • target – The evaluation target.

  • custom_fields – A set of custom fields that the user can define and use for various purposes.

  • description – The description of the entity.

  • namespace – The namespace of the entity. This can be missing for namespace entities or in deployments that don’t use namespaces.

  • output_files_url – The place where the output files, if any, should be written.

  • ownership

    Information about ownership of an entity.

    If the entity is a namespace, the access_policies will typically apply to all entities inside the namespace.

  • project – The URN of the project associated with this entity.

  • result – The evaluation result URN.

  • status

    Normalized statuses for all jobs.

    • CREATED: The job is created, but not yet scheduled.

    • PENDING: The job is waiting for resource allocation.

    • RUNNING: The job is currently running.

    • CANCELLING: The job is being cancelled at the user’s request.

    • CANCELLED: The job has been cancelled by the user.

    • CANCELLING: The job is being cancelled at the user’s request.

    • FAILED: The job failed to execute and terminated.

    • COMPLETED: The job has completed successfully.

    • READY: The job is ready to be used.

    • UNKNOWN: The job status is unknown.

  • status_details – Details about the status of the evaluation.

  • extra_headers – Send extra headers

  • extra_query – Add additional query parameters to the request

  • extra_body – Add additional JSON properties to the request

  • timeout – Override the client-level default timeout for this request, in seconds

retrieve(
job_id: str,
*,
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) EvaluationJob#

Access detailed information about a specific evaluation.

Once an evaluation is finished, retrieve comprehensive results.

Parameters:
  • extra_headers – Send extra headers

  • extra_query – Add additional query parameters to the request

  • extra_body – Add additional JSON properties to the request

  • timeout – Override the client-level default timeout for this request, in seconds

list(
*,
filter: EvaluationJobFilterParam | NotGiven = NOT_GIVEN,
page: int | NotGiven = NOT_GIVEN,
page_size: int | NotGiven = NOT_GIVEN,
sort: GenericSortField | NotGiven = NOT_GIVEN,
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) SyncDefaultPagination[EvaluationJob]#

List available evaluation jobs.

Parameters:
  • filter – Filter jobs on various criteria.

  • page – Page number.

  • page_size – Page size.

  • sort – The field to sort by. To sort in decreasing order, use - in front of the field name.

  • extra_headers – Send extra headers

  • extra_query – Add additional query parameters to the request

  • extra_body – Add additional JSON properties to the request

  • timeout – Override the client-level default timeout for this request, in seconds

delete(
job_id: str,
*,
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) None#

Delete Evaluation by Evaluation ID.

Parameters:
  • extra_headers – Send extra headers

  • extra_query – Add additional query parameters to the request

  • extra_body – Add additional JSON properties to the request

  • timeout – Override the client-level default timeout for this request, in seconds

cancel(
job_id: str,
*,
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) object#

Cancel an evaluation job.

Parameters:
  • extra_headers – Send extra headers

  • extra_query – Add additional query parameters to the request

  • extra_body – Add additional JSON properties to the request

  • timeout – Override the client-level default timeout for this request, in seconds

download_logs(
job_id: str,
*,
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) object#

Return the logs generated by the evaluation job.

The logs are returned as a ZIP file.

Parameters:
  • extra_headers – Send extra headers

  • extra_query – Add additional query parameters to the request

  • extra_body – Add additional JSON properties to the request

  • timeout – Override the client-level default timeout for this request, in seconds

download_results(
job_id: str,
*,
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) BinaryAPIResponse#

Download the result directory containing configuration files, logs, and evaluation results for a specific evaluation run. The result directory is packaged and provided as a downloadable archive.

Parameters:
  • extra_headers – Send extra headers

  • extra_query – Add additional query parameters to the request

  • extra_body – Add additional JSON properties to the request

  • timeout – Override the client-level default timeout for this request, in seconds

results(
job_id: str,
*,
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) EvaluationResult#

Return the results of the evaluation.

Parameters:
  • extra_headers – Send extra headers

  • extra_query – Add additional query parameters to the request

  • extra_body – Add additional JSON properties to the request

  • timeout – Override the client-level default timeout for this request, in seconds

status(
job_id: str,
*,
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) EvaluationStatusDetails#

Access detailed information about a specific evaluation.

Once an evaluation is finished, retrieve comprehensive results.

Parameters:
  • extra_headers – Send extra headers

  • extra_query – Add additional query parameters to the request

  • extra_body – Add additional JSON properties to the request

  • timeout – Override the client-level default timeout for this request, in seconds

create_from_dict(data: dict[str, object]) object#
class nemo_microservices.resources.evaluation.AsyncJobsResource(client: AsyncNeMoMicroservices)#

Bases: AsyncAPIResource

property with_raw_response: AsyncJobsResourceWithRawResponse#

This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content.

For more information, see https://docs.nvidia.com/nemo/microservices/latest/pysdk/index.html#accessing-raw-response-data-e-g-headers

property with_streaming_response: AsyncJobsResourceWithStreamingResponse#

An alternative to .with_raw_response that doesn’t eagerly read the response body.

For more information, see https://docs.nvidia.com/nemo/microservices/latest/pysdk/index.html#with_streaming_response

async create(
*,
config: job_create_params.Config,
target: job_create_params.Target,
custom_fields: Dict[str, str] | NotGiven = NOT_GIVEN,
description: str | NotGiven = NOT_GIVEN,
namespace: str | NotGiven = NOT_GIVEN,
output_files_url: str | NotGiven = NOT_GIVEN,
ownership: Ownership | NotGiven = NOT_GIVEN,
project: str | NotGiven = NOT_GIVEN,
result: str | NotGiven = NOT_GIVEN,
status: JobStatus | NotGiven = NOT_GIVEN,
status_details: EvaluationStatusDetailsParam | NotGiven = NOT_GIVEN,
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) EvaluationJob#

Start a new evaluation job by providing the necessary model and evaluation specifications.

A unique id will be created and provided in the response along with additional details.

Parameters:
  • config – The evaluation configuration.

  • target – The evaluation target.

  • custom_fields – A set of custom fields that the user can define and use for various purposes.

  • description – The description of the entity.

  • namespace – The namespace of the entity. This can be missing for namespace entities or in deployments that don’t use namespaces.

  • output_files_url – The place where the output files, if any, should be written.

  • ownership

    Information about ownership of an entity.

    If the entity is a namespace, the access_policies will typically apply to all entities inside the namespace.

  • project – The URN of the project associated with this entity.

  • result – The evaluation result URN.

  • status

    Normalized statuses for all jobs.

    • CREATED: The job is created, but not yet scheduled.

    • PENDING: The job is waiting for resource allocation.

    • RUNNING: The job is currently running.

    • CANCELLING: The job is being cancelled at the user’s request.

    • CANCELLED: The job has been cancelled by the user.

    • CANCELLING: The job is being cancelled at the user’s request.

    • FAILED: The job failed to execute and terminated.

    • COMPLETED: The job has completed successfully.

    • READY: The job is ready to be used.

    • UNKNOWN: The job status is unknown.

  • status_details – Details about the status of the evaluation.

  • extra_headers – Send extra headers

  • extra_query – Add additional query parameters to the request

  • extra_body – Add additional JSON properties to the request

  • timeout – Override the client-level default timeout for this request, in seconds

async retrieve(
job_id: str,
*,
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) EvaluationJob#

Access detailed information about a specific evaluation.

Once an evaluation is finished, retrieve comprehensive results.

Parameters:
  • extra_headers – Send extra headers

  • extra_query – Add additional query parameters to the request

  • extra_body – Add additional JSON properties to the request

  • timeout – Override the client-level default timeout for this request, in seconds

list(
*,
filter: EvaluationJobFilterParam | NotGiven = NOT_GIVEN,
page: int | NotGiven = NOT_GIVEN,
page_size: int | NotGiven = NOT_GIVEN,
sort: GenericSortField | NotGiven = NOT_GIVEN,
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) AsyncPaginator[EvaluationJob, AsyncDefaultPagination[EvaluationJob]]#

List available evaluation jobs.

Parameters:
  • filter – Filter jobs on various criteria.

  • page – Page number.

  • page_size – Page size.

  • sort – The field to sort by. To sort in decreasing order, use - in front of the field name.

  • extra_headers – Send extra headers

  • extra_query – Add additional query parameters to the request

  • extra_body – Add additional JSON properties to the request

  • timeout – Override the client-level default timeout for this request, in seconds

async delete(
job_id: str,
*,
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) None#

Delete Evaluation by Evaluation ID.

Parameters:
  • extra_headers – Send extra headers

  • extra_query – Add additional query parameters to the request

  • extra_body – Add additional JSON properties to the request

  • timeout – Override the client-level default timeout for this request, in seconds

async cancel(
job_id: str,
*,
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) object#

Cancel an evaluation job.

Parameters:
  • extra_headers – Send extra headers

  • extra_query – Add additional query parameters to the request

  • extra_body – Add additional JSON properties to the request

  • timeout – Override the client-level default timeout for this request, in seconds

async download_logs(
job_id: str,
*,
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) object#

Return the logs generated by the evaluation job.

The logs are returned as a ZIP file.

Parameters:
  • extra_headers – Send extra headers

  • extra_query – Add additional query parameters to the request

  • extra_body – Add additional JSON properties to the request

  • timeout – Override the client-level default timeout for this request, in seconds

async download_results(
job_id: str,
*,
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) AsyncBinaryAPIResponse#

Download the result directory containing configuration files, logs, and evaluation results for a specific evaluation run. The result directory is packaged and provided as a downloadable archive.

Parameters:
  • extra_headers – Send extra headers

  • extra_query – Add additional query parameters to the request

  • extra_body – Add additional JSON properties to the request

  • timeout – Override the client-level default timeout for this request, in seconds

async results(
job_id: str,
*,
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) EvaluationResult#

Return the results of the evaluation.

Parameters:
  • extra_headers – Send extra headers

  • extra_query – Add additional query parameters to the request

  • extra_body – Add additional JSON properties to the request

  • timeout – Override the client-level default timeout for this request, in seconds

async status(
job_id: str,
*,
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) EvaluationStatusDetails#

Access detailed information about a specific evaluation.

Once an evaluation is finished, retrieve comprehensive results.

Parameters:
  • extra_headers – Send extra headers

  • extra_query – Add additional query parameters to the request

  • extra_body – Add additional JSON properties to the request

  • timeout – Override the client-level default timeout for this request, in seconds

create_from_dict(data: dict[str, object]) object#