Skip to main content

aip_sdk.pull_config

aip_sdk.pull_config(name_or_id: str, *, workspace_id: str | None = None, client: APIClient | None = None, all_workspaces: bool = False) -> EvalConfig

Fetch an EvalConfig from the AIP platform by name or ID.

Tries GET /eval-configs/{name_or_id} first (fast path for IDs); if that returns 404 it falls back to a name search across the workspace.

Scoped to your session's workspace. With none set, it raises rather than searching every workspace you can access — pass all_workspaces=True to do that instead.

That covers the ID fast path too, which is not a way around the scope: the fetched record is checked against the resolved workspace, so a by-ID pull needs one just as a name search does. This is where it differs from load_dataset(id=...), which returns before resolving anything. Pass all_workspaces=True to fetch an ID wherever it lives.

Parameters

  • name_or_id str: Server-assigned config ID or the human-readable name.
  • workspace_id str | None: Scope name search to this workspace. Falls back to the default client's workspace or AIP_WORKSPACE_ID. An empty string is an explicit (invalid) workspace rather than an omission — pass None, or omit the argument, for the session default.
  • client APIClient | None: Explicit API client. Uses the default client when omitted.
  • all_workspaces bool: Search every workspace you can access instead of the session's one.

Returns

Raises

  • AuthError: Server returned 401 — invalid or expired credentials. Call aip.init() again or set AIP_API_KEY.
  • NotFoundError: No config with the given name or ID exists (or is accessible to the caller).
  • APIError: Name matched configs in multiple workspaces — pass workspace_id to disambiguate. Or any other HTTP error from the platform.
  • ForbiddenError: If workspace_id names a workspace you cannot access.
  • InvalidArgumentError: If both workspace_id and all_workspaces are given.
  • NoWorkspaceSelectedError: No workspace was passed, none is configured for the session, and all_workspaces was not set.