Skip to content

Commit

Permalink
add python sdk doc
Browse files Browse the repository at this point in the history
  • Loading branch information
tianweidut committed Oct 9, 2022
1 parent dc6e6fd commit 6010384
Show file tree
Hide file tree
Showing 15 changed files with 1,070 additions and 13 deletions.
7 changes: 3 additions & 4 deletions client/starwhale/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from starwhale.api.job import step, Context
from starwhale.version import STARWHALE_VERSION as __version__
from starwhale.base.uri import URI, URIType
from starwhale.api.model import PipelineHandler, PPLResultIterator
from starwhale.api.metric import multi_classification
from starwhale.api.dataset import (
Expand All @@ -18,8 +19,6 @@
get_data_loader,
LocalFSLinkAuth,
DefaultS3LinkAuth,
SWDSBinDataLoader,
UserRawDataLoader,
COCOObjectAnnotation,
SWDSBinBuildExecutor,
UserRawBuildExecutor,
Expand All @@ -29,6 +28,8 @@
"__version__",
"PipelineHandler",
"multi_classification",
"URI",
"URIType",
"step",
"Context",
"get_data_loader",
Expand All @@ -41,8 +42,6 @@
"BuildExecutor", # SWDSBinBuildExecutor alias
"UserRawBuildExecutor",
"SWDSBinBuildExecutor",
"SWDSBinDataLoader",
"UserRawDataLoader",
"Binary",
"Text",
"Audio",
Expand Down
9 changes: 2 additions & 7 deletions client/tests/sdk/test_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,7 @@

from pyfakefs.fake_filesystem_unittest import TestCase

from starwhale import (
MIMEType,
S3LinkAuth,
get_data_loader,
SWDSBinDataLoader,
UserRawDataLoader,
)
from starwhale import MIMEType, S3LinkAuth, get_data_loader
from starwhale.consts import AUTH_ENV_FNAME, SWDSBackendType
from starwhale.base.uri import URI
from starwhale.utils.fs import ensure_dir, ensure_file
Expand All @@ -22,6 +16,7 @@
LocalFSStorageBackend,
)
from starwhale.core.dataset.tabular import TabularDatasetRow
from starwhale.api._impl.dataset.loader import SWDSBinDataLoader, UserRawDataLoader

from .. import ROOT_DIR

Expand Down
3 changes: 2 additions & 1 deletion client/tests/sdk/test_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from pyfakefs.fake_filesystem_unittest import TestCase

from starwhale import Context, get_data_loader, PipelineHandler, UserRawDataLoader
from starwhale import Context, get_data_loader, PipelineHandler
from starwhale.consts import DEFAULT_PROJECT
from starwhale.base.uri import URI
from starwhale.utils.fs import ensure_dir
Expand All @@ -22,6 +22,7 @@
from starwhale.core.dataset.type import MIMEType, ArtifactType, DatasetSummary
from starwhale.core.dataset.store import DatasetStorage
from starwhale.core.dataset.tabular import TabularDatasetRow
from starwhale.api._impl.dataset.loader import UserRawDataLoader

from .. import ROOT_DIR

Expand Down
3 changes: 3 additions & 0 deletions docs/docs/reference/sdk/data_type.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
title: Data Type
---
3 changes: 3 additions & 0 deletions docs/docs/reference/sdk/dataset.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
title: Dataset Builder and Loader
---
3 changes: 3 additions & 0 deletions docs/docs/reference/sdk/evaluation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
title: Model Evaluation
---
3 changes: 3 additions & 0 deletions docs/docs/reference/sdk/other.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
title: Other
---
3 changes: 3 additions & 0 deletions docs/docs/reference/sdk/overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
title: Python SDK
---
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ model命令提供适用于Standalone Instance和Cloud Instance的Starwhale Model

model包含如下子命令:

|Command|Standalone|Cloud|
|命令|Standalone|Cloud|
|-------|----------|-----|
|`build`|||
|`copy`|||
Expand Down
Loading

0 comments on commit 6010384

Please sign in to comment.