Changement nom et path
This commit is contained in:
parent
8e61e9d2a4
commit
ad1e9034f7
|
@ -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
|
|
@ -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())
|
Loading…
Reference in New Issue
Block a user