Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/repl/repl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ func TestComplete(t *testing.T) {

p.InsertText(`RAIN `, false, true)
c = s.completer(*p.Document())
a.Equal(14, len(c))
a.Equal(11, len(c))

p.InsertText(`DNN`, false, true)
c = s.completer(*p.Document())
Expand Down
5 changes: 5 additions & 0 deletions doc/model_parameter.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,11 @@ INTO sqlflow_models.my_dnn_model;
<td>Type</td>
<td>Description</td>
</tr>
<tr>
<td>model.*</td>
<td>attribute.unknown</td>
<td>Any model parameters defined in custom models</td>
</tr>
<tr>
<td>train.batch_size</td>
<td>int</td>
Expand Down
2 changes: 1 addition & 1 deletion pkg/sql/codegen/attribute/attribute_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func TestDictionaryValidate(t *testing.T) {
func TestPremadeModelParamsDocs(t *testing.T) {
a := assert.New(t)

a.Equal(14, len(PremadeModelParamsDocs))
a.Equal(11, len(PremadeModelParamsDocs))
a.Equal(len(PremadeModelParamsDocs["DNNClassifier"]), 12)
a.NotContains(PremadeModelParamsDocs["DNNClassifier"], "feature_columns")
a.Contains(PremadeModelParamsDocs["DNNClassifier"], "optimizer")
Expand Down
29 changes: 0 additions & 29 deletions pkg/sql/codegen/attribute/model_parameters.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pkg/sql/codegen/tensorflow/codegen.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ example: "Accuracy,AUC"`, nil},
"validation.select": {attribute.String, `[default=""]
Specify the dataset for validation.
example: "SELECT * FROM iris.train LIMIT 100"`, nil},
"model.*": {attribute.Unknown, "Any model parameters defined in custom models", nil},
}

func intArrayToJSONString(ia []int) string {
Expand Down
5 changes: 0 additions & 5 deletions python/extract_docstring.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,6 @@ def parse_ctor_args(f, prefix=''):
for cls in tf_estimators:
param_doc[cls] = parse_ctor_args(eval(cls))

# SQLFlow premade models
sf_models = filter(lambda m: inspect.isclass(m[1]), inspect.getmembers(sqlflow_models))
for name, cls in sf_models:
param_doc['sqlflow_models.' + name] = parse_ctor_args(cls, ':param')

# xgboost models: gbtree, gblinear or dart
param_doc['xgboost.gbtree'] = parse_ctor_args(xgboost.XGBModel)
del param_doc['xgboost.gbtree']['booster'] # booster specified as an estimator
Expand Down