LabelStudio Client

dagshub.ls_client.get_label_studio_client(repo, legacy_client=None, host=None, token=None)

Creates a label_studio_sdk.client.LabelStudio / label_studio_sdk.Client (legacy) object to interact with the LabelStudio instance associated with the repository.

Parameters:
  • repo (str) – Name of the repo in the format of username/reponame

  • legacy_client (bool | None) – if True, returns the older legacy LabelStudio Client.

  • host (str | None) – URL of the hosted DagsHub instance. default is https://dagshub.com.

  • token (str | None) – (optional, default: None) use this token for LS requests. By default, will use current user’s token.

Returns:

label_studio_sdk.Client / label_studio_sdk.client.LabelStudio object