-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
코드부분과 쿼리문을 분리했습니다.
- Loading branch information
Showing
3 changed files
with
79 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
UPDATE_TEMP_MODEL_DATA = """ | ||
DELETE FROM temp_model_data | ||
WHERE id NOT IN ( | ||
SELECT id | ||
FROM temp_model_data | ||
WHERE experiment_name = '{}' | ||
ORDER BY {} | ||
LIMIT {} | ||
) | ||
""" | ||
|
||
|
||
SELECT_TEMP_MODEL_BY_EXPR_NAME = """ | ||
SELECT * | ||
FROM temp_model_data | ||
WHERE experiment_name = '{}' | ||
ORDER BY {}; | ||
""" | ||
|
||
|
||
SELECT_MODEL_METADATA_BY_EXPR_NAME = """ | ||
SELECT * | ||
FROM model_metadata | ||
WHERE experiment_name = '{}' | ||
""" | ||
|
||
INSERT_MODEL_CORE = """ | ||
INSERT INTO model_core ( | ||
model_name, | ||
model_file | ||
) VALUES( | ||
'{}', | ||
'{}' | ||
) | ||
""" | ||
|
||
UPDATE_MODEL_CORE = """ | ||
UPDATE model_core | ||
SET | ||
model_file = '{}' | ||
WHERE | ||
model_name = '{}' | ||
""" | ||
|
||
UPDATE_MODEL_METADATA = """ | ||
UPDATE model_metadata | ||
SET | ||
train_mae = {}, | ||
val_mae = {}, | ||
train_mse = {}, | ||
val_mse = {} | ||
WHERE experiment_name = '{}' | ||
""" | ||
|
||
DELETE_ALL_EXPERIMENTS_BY_EXPR_NAME = """ | ||
DELETE FROM temp_model_data | ||
WHERE experiment_name = '{}' | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters