Skip to content

Commit

Permalink
Merge pull request #576 from DagsHub/docs/fix-broken-imports
Browse files Browse the repository at this point in the history
Docs: Mock out imports that aren't installed in docs build env
  • Loading branch information
kbolashev authored Jan 7, 2025
2 parents 4eb56c9 + 5de476c commit 8ce4735
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
2 changes: 1 addition & 1 deletion dagshub/data_engine/model/datasource.py
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,7 @@ def log_to_mlflow(
artifact_name: Optional[str] = None,
run: Optional["mlflow.entities.Run"] = None,
as_of: Optional[datetime.datetime] = None,
) -> "mlflow.Entities.Run":
) -> "mlflow.entities.Run":
"""
Logs the current datasource state to MLflow as an artifact.
Expand Down
11 changes: 5 additions & 6 deletions dagshub/ls_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,16 @@ def get_label_studio_client(
repo: str, legacy_client: Optional[bool] = None, host: Optional[str] = None, token: Optional[str] = None
):
"""
Creates a `label_studio_sdk.Client / label_studio_sdk.client.LabelStudio \
<https://labelstud.io/guide/sdk> / \
https://api.labelstud.io/api-reference/introduction/getting-started`.\
object to interact with the label studio instance associated with the repository.
Creates a
`label_studio_sdk.client.LabelStudio <https://api.labelstud.io/api-reference/introduction/getting-started>`_ /
`label_studio_sdk.Client (legacy) <https://labelstud.io/guide/sdk>`_
object to interact with the LabelStudio instance associated with the repository.
Args:
repo: Name of the repo in the format of ``username/reponame``
legacy_client: if True, returns the older legacy LabelStudio Client.
host: URL of the hosted DagsHub instance. default is ``https://dagshub.com``.
token: (optional, default: None) uses programmatically specified token, \
if not provided either uses cached token or requests oauth interactively.
token: (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
Expand Down
11 changes: 11 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,17 @@
napoleon_include_init_with_doc = True
autodoc_member_order = "bysource"
autodoc_default_flags = ["inherited-members"]
autodoc_mock_imports = [
"fiftyone",
"mlflow",
"datasets",
"ultralytics",
"cloudpickle",
"hypercorn",
"ngrok",
"tensorflow",
"IPython",
]
typehints_use_signature_return = True

sitemap_url_scheme = "{link}"

0 comments on commit 8ce4735

Please sign in to comment.