@@ -217,30 +217,30 @@ func NewDictionaryFromModelDefinition(estimator, prefix string) Dictionary {
217217
218218// PremadeModelParamsDocs stores parameters and documents of all known models
219219var PremadeModelParamsDocs map [string ]map [string ]string
220- var extractDocStringsOnce sync.Once
220+ var extractSymbolOnce sync.Once
221221
222222// OptimizerParamsDocs stores parameters and documents of optimizers
223223var OptimizerParamsDocs map [string ]map [string ]string
224224
225225// XGBoostObjectiveDocs stores options for xgboost objective
226226var XGBoostObjectiveDocs map [string ]string
227227
228- // ExtractDocString extracts parameter documents of Python modules from doc strings
229- func ExtractDocString (module ... string ) {
228+ // ExtractSymbol extracts parameter documents of Python modules from doc strings
229+ func ExtractSymbol (module ... string ) {
230230 cmd := exec .Command ("python" , "-uc" , fmt .Sprintf ("__import__('symbol_extractor').print_param_doc('%s')" , strings .Join (module , "', '" )))
231231 output , e := cmd .CombinedOutput ()
232232 if e != nil {
233- log .Println ("ExtractDocString failed: " , e , string (output ))
233+ log .Println ("ExtractSymbol failed: " , e , string (output ))
234234 }
235235 // json.Unmarshal extends the map rather than reallocate a new one, see golang.org/pkg/encoding/json/#Unmarshal
236236 if e := json .Unmarshal (output , & PremadeModelParamsDocs ); e != nil {
237- log .Println ("ExtractDocString failed:" , e , string (output ))
237+ log .Println ("ExtractSymbol failed:" , e , string (output ))
238238 }
239239}
240240
241- // ExtractDocStringsOnce extracts parameter documents from python doc strings using sync.Once
242- func ExtractDocStringsOnce () {
243- extractDocStringsOnce .Do (func () { ExtractDocString ("sqlflow_models" ) })
241+ // ExtractSymbolOnce extracts parameter documents from python doc strings using sync.Once
242+ func ExtractSymbolOnce () {
243+ extractSymbolOnce .Do (func () { ExtractSymbol ("sqlflow_models" ) })
244244}
245245
246246func removeUnnecessaryParams () {
0 commit comments