Delete a Config#
To delete an evaluation configuration, send a DELETE
request to the configs endpoint. You must provide both the namespace and name of the configuration (not the ID) as shown in the following code.
Prerequisites#
Set your
EVALUATOR_BASE_URL
environment variable to your evaluator service endpoint:export EVALUATOR_BASE_URL="https://your-evaluator-service-endpoint"
Before deleting a config, make sure it is not in use by any jobs. If a job is using the config, you must delete the job first. To find all jobs that use a config, refer to List Evaluation Jobs.
Options#
API#
Submit a DELETE request to
/v1/evaluation/configs/<my-namespace>/<my-config-name>
.curl -X "DELETE" "${EVALUATOR_SERVICE_URL}/v1/evaluation/configs/<my-namespace>/<my-config-name>" \ -H 'accept: application/json'
endpoint = f"{EVALUATOR_SERVICE_URL}/v1/evaluation/configs/<my-namespace>/<my-config-name>" response = requests.delete(endpoint).json() response
Review the response.
Example Response
{ "message": "Resource deleted successfully.", "id": "eval-config-MNOP1234QRST5678", "deleted_at": null }
SDK#
import os
from nemo_microservices import NeMoMicroservices
# Initialize the client
client = NeMoMicroservices(
base_url=os.environ['EVALUATOR_BASE_URL']
)
# Delete evaluation config
result = client.evaluation.configs.delete(
config_name="my-config-name",
namespace="my-namespace"
)
print(f"Config deleted: {result.message}")
print(f"Deleted ID: {result.id}")
curl -X "DELETE" "${EVALUATOR_BASE_URL}/evaluation/configs/<my-namespace>/<my-config-name>" \
-H 'accept: application/json'