Skip to content

Commit

Permalink
Fix: train model with options
Browse files Browse the repository at this point in the history
  • Loading branch information
taewhi committed May 24, 2024
1 parent 9b49a78 commit 553ff8d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bi-tool/redash/models/train_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ def train_model(cls, **kwargs):
sql = "TRAIN MODEL "+ kwargs["model_name"] + \
" MODELTYPE "+ kwargs["model_type"] + \
" ON "+ target + \
" OPTIONS ('epochs' = 1)"
# " OPTIONS ( "+ ", ".join(kwargs["options"]) +" )"
" OPTIONS ( "+ kwargs["options"].replace('"', '').replace('{', '').replace('}', '').replace(':', ' = ').replace(',', ', ') +" )"

# sql = "TRAIN MODEL New_Model MODELTYPE remote_tablegan ON instacart_small.order_products( reordered ) OPTIONS ('epochs' = 1)"

logger.debug(f'kwargs["options"] : {kwargs["options"]}')
logger.debug(f'wgkim sql : {sql}')
return cls._execute(sql)

Expand Down

0 comments on commit 553ff8d

Please sign in to comment.