Skip to content

Commit 8ce4735

Browse files
authored
Merge pull request #576 from DagsHub/docs/fix-broken-imports
Docs: Mock out imports that aren't installed in docs build env
2 parents 4eb56c9 + 5de476c commit 8ce4735

File tree

3 files changed

+17
-7
lines changed

3 files changed

+17
-7
lines changed

dagshub/data_engine/model/datasource.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -872,7 +872,7 @@ def log_to_mlflow(
872872
artifact_name: Optional[str] = None,
873873
run: Optional["mlflow.entities.Run"] = None,
874874
as_of: Optional[datetime.datetime] = None,
875-
) -> "mlflow.Entities.Run":
875+
) -> "mlflow.entities.Run":
876876
"""
877877
Logs the current datasource state to MLflow as an artifact.
878878

dagshub/ls_client.py

+5-6
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,16 @@ def get_label_studio_client(
2626
repo: str, legacy_client: Optional[bool] = None, host: Optional[str] = None, token: Optional[str] = None
2727
):
2828
"""
29-
Creates a `label_studio_sdk.Client / label_studio_sdk.client.LabelStudio \
30-
<https://labelstud.io/guide/sdk> / \
31-
https://api.labelstud.io/api-reference/introduction/getting-started`.\
32-
object to interact with the label studio instance associated with the repository.
29+
Creates a
30+
`label_studio_sdk.client.LabelStudio <https://api.labelstud.io/api-reference/introduction/getting-started>`_ /
31+
`label_studio_sdk.Client (legacy) <https://labelstud.io/guide/sdk>`_
32+
object to interact with the LabelStudio instance associated with the repository.
3333
3434
Args:
3535
repo: Name of the repo in the format of ``username/reponame``
3636
legacy_client: if True, returns the older legacy LabelStudio Client.
3737
host: URL of the hosted DagsHub instance. default is ``https://dagshub.com``.
38-
token: (optional, default: None) uses programmatically specified token, \
39-
if not provided either uses cached token or requests oauth interactively.
38+
token: (optional, default: None) use this token for LS requests. By default, will use current user's token.
4039
4140
Returns:
4241
`label_studio_sdk.Client` / `label_studio_sdk.client.LabelStudio` object

docs/source/conf.py

+11
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,17 @@
6666
napoleon_include_init_with_doc = True
6767
autodoc_member_order = "bysource"
6868
autodoc_default_flags = ["inherited-members"]
69+
autodoc_mock_imports = [
70+
"fiftyone",
71+
"mlflow",
72+
"datasets",
73+
"ultralytics",
74+
"cloudpickle",
75+
"hypercorn",
76+
"ngrok",
77+
"tensorflow",
78+
"IPython",
79+
]
6980
typehints_use_signature_return = True
7081

7182
sitemap_url_scheme = "{link}"

0 commit comments

Comments
 (0)