aip_sdk.aregister_sdg_adapter
async aip_sdk.aregister_sdg_adapter(name: str, pipeline: Any | None = None, job_config: Any | None = None, version: str = '1.0', owner: str | None = None, *, workspace_id: str | None = None, client: AsyncAPIClient | None = None) -> SdgAdapterInstance
Async variant of register_sdg_adapter().
Parameters
namestr: Adapter name.pipelineAny | None: Pipeline class — must implement the SDGPipeline interface (runandvalidate_chainmethods). UsesissubclassagainstSDGPipelinewhenaip_sdg_coreis installed, otherwise falls back to duck-typing.job_configAny | None:aip_sdg_core.JobConfiginstance.versionstr: Version string.ownerstr | None: Owner/team identifier.workspace_idstr | None: Workspace to register the adapter in. Falls back toclient.config.workspace_idwhen not provided — seeregister_sdg_adapter()for why to pass this explicitly on multi-workspace accounts.clientAsyncAPIClient | None: Optional pre-configured async API client.
Returns
SdgAdapterInstance: SdgAdapterInstance.
Raises
NoWorkspaceSelectedError: If no workspace is passed and none is configured for the session.InterfaceValidationError: Ifpipelinedoes not satisfy the SDGPipeline interface.DuplicateAdapterError: If an adapter with this name already exists in the target workspace.AuthError: If no credentials are configured.
Example:
adapter = await aip.aregister_sdg_adapter(
name="adversarial-gen",
pipeline=MyPipeline,
)