diff --git a/feature_extraction/extract_features.py b/feature_extraction/extract_features.py index 3de810c..b8c8d96 100644 --- a/feature_extraction/extract_features.py +++ b/feature_extraction/extract_features.py @@ -43,6 +43,8 @@ def main(): df_dedup = df.drop_duplicates(subset=['user_id', 'movie_id', 'score'] ,keep='last') file_name = 'user_movie_score_' + str(int(time.time())) + '.csv' df_dedup.to_csv(os.path.join(config['model_output_dir'], file_name), index=False) + copy_file_name = 'usermovie' + '.csv' + df_dedup.to_csv(os.path.join(config['model_output_dir'], copy_file_name), index=False) if __name__ == '__main__': main() diff --git a/inference/configuration/model_setting_base.json b/inference/configuration/model_setting_base.json new file mode 100644 index 0000000..b447ca1 --- /dev/null +++ b/inference/configuration/model_setting_base.json @@ -0,0 +1,29 @@ +{ + "OFFLINE": { + "offl-exp-1": { + "MODEL_NAME": "SVD", + "FEATURE_PATH": "/inference/feature/usermovie.csv", + "TEST_FEATURE_PATH": "/inference/feature/usermovie.csv", + "MODEL_PATH": "/inference/trained_model/", + "TOP_RECOMMEND_RESULT_NUM": 10, + "HYPER_PARAMETER": {}, + "DESCRIPTION": "The first Experiment" + }, + "offl-exp-2": { + "MODEL_NAME": "SVD", + "FEATURE_PATH": "/inference/feature/usermovie.csv", + "TEST_FEATURE_PATH": "/inference/feature/usermovie.csv", + "MODEL_PATH": "/inference/trained_model/", + "TOP_RECOMMEND_RESULT_NUM": 5, + "HYPER_PARAMETER": {}, + "DESCRIPTION": "The second Experiment" + } + }, + "ONLINE":{ + + }, + "CONTENT_CONFIG":{ + "REC_NUM":20, + "CONTENT_FEATURE_PATH":"/inference/feature/moviefeature.csv" + } +} \ No newline at end of file diff --git a/inference/feature/usermovie.csv b/inference/feature/usermovie_primary.csv similarity index 100% rename from inference/feature/usermovie.csv rename to inference/feature/usermovie_primary.csv diff --git a/script/train_evaluate.sh b/script/train_evaluate.sh index 4d507f5..99499c9 100644 --- a/script/train_evaluate.sh +++ b/script/train_evaluate.sh @@ -1,2 +1,2 @@ #!/usr/bin/env bash -python3 ../inference/RecommendModule/operate.py /home/teama/17645TeamA/ offl-exp-1 Train Evaluate +python3 inference/RecommendModule/operate.py . offl-exp-1 Train Evaluate diff --git a/workflow/active_model_setting_config.json b/workflow/active_model_setting_config.json new file mode 100644 index 0000000..65d54f7 --- /dev/null +++ b/workflow/active_model_setting_config.json @@ -0,0 +1,5 @@ +{ + "DailyActiveModelSetting": "offl-exp-1", + "ManualActiveModelSetting": "offl-exp-2", + "ManualSettingDryRun": "False" +} \ No newline at end of file diff --git a/workflow/daily_relase_workflow.sh b/workflow/daily_relase_workflow.sh new file mode 100644 index 0000000..4355ec1 --- /dev/null +++ b/workflow/daily_relase_workflow.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +python3 feature_extraction/extract_features.py +mv feature_extraction/data/usermovie.csv inference/feature/ +sh train_evaluate.sh \ No newline at end of file diff --git a/workflow/release_info.json b/workflow/release_info.json new file mode 100644 index 0000000..e69de29