Skip to main content

aip_sdk.publish_config

aip_sdk.publish_config(config: EvalConfig, name: str, *, description: str | None = None, workspace_id: str | None = None, client: APIClient | None = None) -> str

Publish a local EvalConfig to the AIP platform.

POSTs to /eval-configs and returns the server-assigned config ID. The caller can later retrieve the config with pull_config() using either the returned ID or the name.

Parameters

  • config EvalConfig: The EvalConfig to publish.
  • name str: Name for the config on the platform (unique per workspace).
  • description str | None: Optional human-readable description.
  • workspace_id str | None: Target workspace. Falls back to the default client's workspace or AIP_WORKSPACE_ID env var.
  • client APIClient | None: Explicit API client. Uses the default client when omitted.

Returns

  • str: The server-assigned config ID string.

Raises

  • AuthError: Server returned 401 — invalid or expired credentials. Call aip.init() again or set AIP_API_KEY.
  • DuplicateEvalConfigError: A config with name already exists in the workspace.
  • NoWorkspaceSelectedError: No workspace was passed and none is configured for the session.
  • APIError: Any other HTTP error from the platform.