diff --git a/0_5_Machine_Learning.py b/5_Modelling.py similarity index 100% rename from 0_5_Machine_Learning.py rename to 5_Modelling.py diff --git a/0_7_CA_segment.py b/7_Sales_Forecast.py similarity index 98% rename from 0_7_CA_segment.py rename to 7_Sales_Forecast.py index 9cb0593..fbb0bf4 100644 --- a/0_7_CA_segment.py +++ b/7_Sales_Forecast.py @@ -19,7 +19,7 @@ S3_ENDPOINT_URL = "https://" + os.environ["AWS_S3_ENDPOINT"] fs = s3fs.S3FileSystem(client_kwargs={'endpoint_url': S3_ENDPOINT_URL}) # importation of functions defined -exec(open('utils_CA_segment.py').read()) +exec(open('utils_sales_forecast.py').read()) # from utils_CA_segment import * # define type of activity diff --git a/utils_CA_segment.py b/utils_sales_forecast.py similarity index 97% rename from utils_CA_segment.py rename to utils_sales_forecast.py index bab0607..f0c28db 100644 --- a/utils_CA_segment.py +++ b/utils_sales_forecast.py @@ -14,7 +14,7 @@ import io def load_train_test(type_of_activity): # BUCKET = f"projet-bdc2324-team1/Generalization/{type_of_activity}" - BUCKET = f"projet-bdc2324-team1/Generalization_v2/{type_of_activity}" + BUCKET = f"projet-bdc2324-team1/1_Temp/1_0_Modelling_Datasets/{type_of_activity}" File_path_train = BUCKET + "/Train_set.csv" File_path_test = BUCKET + "/Test_set.csv" @@ -53,7 +53,7 @@ def features_target_split(dataset_train, dataset_test): def load_model(type_of_activity, model): # BUCKET = f"projet-bdc2324-team1/Output_model/{type_of_activity}/{model}/" - BUCKET = f"projet-bdc2324-team1/basique/{type_of_activity}/{model}/" + BUCKET = f"projet-bdc2324-team1/2_Output/2_1_Modeling_results/{type_of_activity}/{model}/" filename = model + '.pkl' file_path = BUCKET + filename with fs.open(file_path, mode="rb") as f: @@ -241,7 +241,7 @@ def save_file_s3_ca(File_name, type_of_activity): image_buffer = io.BytesIO() plt.savefig(image_buffer, format='png') image_buffer.seek(0) - PATH = f"projet-bdc2324-team1/Output_expected_CA/{type_of_activity}/" + PATH = f"projet-bdc2324-team1/2_Output/2_2_Sales_Forecast/{type_of_activity}/" FILE_PATH_OUT_S3 = PATH + File_name + type_of_activity + '.png' with fs.open(FILE_PATH_OUT_S3, 'wb') as s3_file: s3_file.write(image_buffer.read())