You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update command-line tool design to support list models/repos in Model Zoo (#2746)
* refine pai code structure
* remove unused function
* move tensorflow files to a sub-package
* add docstring
* Add KMeans and RF PAI submitter
* use model type defined in runtim.model
* fix string compare
* Evaluate for PAI
* modify code
* update cli design to support model zoo list
* update doc
Copy file name to clipboardExpand all lines: doc/design/cli_model_zoo_cmd.md
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,8 @@ Usage:
15
15
sqlflow [options] release model [--force] <model><version>
16
16
sqlflow [options] delete repo <name_version>
17
17
sqlflow [options] delete model <model><version>
18
+
sqlflow [options] list repo
19
+
sqlflow [options] list model
18
20
19
21
Options:
20
22
-v, --version print the version and exit
@@ -23,6 +25,8 @@ Options:
23
25
--env-file=<file> config file in KEY=VAL format
24
26
-s, --sqlflow-server=<addr> SQLFlow server address and port
25
27
-m, --model-zoo-server=<addr> Model Zoo server address and port
28
+
-u, --user=<user> Model Zoo user account
29
+
-p, --password=<password> Model Zoo user password
26
30
27
31
Run Options:
28
32
-d, --data-source=<data_source> data source to operate
@@ -41,6 +45,9 @@ As the command-line is written in `docopt`, it can be parsed by existing parsers
41
45
### Model Uploading
42
46
For model definitions, we can simply tar the whole directory and upload them through the [gRPC interface](https://github.com/sql-machine-learning/sqlflow/blob/14d6a28be13418bec8a17091a0db22b5c76a1fc2/pkg/proto/modelzooserver.proto#L91). For models, there already exists [some code](https://github.com/sql-machine-learning/sqlflow/blob/14d6a28be13418bec8a17091a0db22b5c76a1fc2/pkg/model/model.go#L77) to export the model from database to file system. We can upload them after the exporting.
43
47
48
+
## Model and Repo Listing
49
+
SQLFlow command-line tool support listing released repos/models. By default, users can only list the repos/models released by himself. So, we need to add authentication info in the listing requests. We added `--user` and the `--password` options to handle this. As there may be a lot of models and repos, the implementation will pull the list for multiple times, each time for just a small number of results.
50
+
44
51
## Action Plan
45
52
We will implement the core logic of the command-line, which is the uploading and deleting of objects in the `Model Zoo`.
46
53
SQLFlow command-line tool may need some authentication process for further operation. This may be implemented by username/password or by certification file. Also, some of the params in the command-line can be written into env file, we postpone the implementation of these features.
0 commit comments