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 go/codegen/experimental/codegen_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ func TestExperimentalXGBCodegen(t *testing.T) {
if err != nil {
t.Errorf("error %s", err)
}
expected := `feature_column_map = {"featuren_columns": [fc.NumericColumn(fd.FieldDesc(name="petal_length", dtype=fd.DataType.FLOAT32, delimiter="", format="", shape=[1], is_sparse=False, vocabulary=[]))]}`
expected := `feature_column_map = {"feature_columns": [fc.NumericColumn(fd.FieldDesc(name="petal_length", dtype=fd.DataType.FLOAT32, delimiter="", format="", shape=[1], is_sparse=False, vocabulary=[]))]}`
a.True(strings.Contains(coulerCode, expected))
}
4 changes: 2 additions & 2 deletions go/codegen/experimental/xgboost.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func XGBoostGenerateTrain(trainStmt *ir.TrainStmt, stepIndex int, session *pb.Se
return program.String(), nil
}

var xgbTrainTemplate = `
const xgbTrainTemplate = `
def step_entry_{{.StepIndex}}():
import json
import tempfile
Expand All @@ -141,7 +141,7 @@ def step_entry_{{.StepIndex}}():
conn = runtime.db.connect_with_data_source(ds)

{{ if .FeatureColumnCode }}
feature_column_map = {"featuren_columns": [{{.FeatureColumnCode}}]}
feature_column_map = {"feature_columns": [{{.FeatureColumnCode}}]}
{{ else }}
feature_column_map = None
{{ end }}
Expand Down