Correction path
This commit is contained in:
parent
ad1e9034f7
commit
1577cc3291
|
@ -53,7 +53,7 @@ def features_target_split(dataset_train, dataset_test):
|
||||||
|
|
||||||
def load_model(type_of_activity, model):
|
def load_model(type_of_activity, model):
|
||||||
# BUCKET = f"projet-bdc2324-team1/Output_model/{type_of_activity}/{model}/"
|
# BUCKET = f"projet-bdc2324-team1/Output_model/{type_of_activity}/{model}/"
|
||||||
BUCKET = f"projet-bdc2324-team1/2_Output/2_1_Modeling_results/{type_of_activity}/{model}/"
|
BUCKET = f"projet-bdc2324-team1/2_Output/2_1_Modeling_results/standard/{type_of_activity}/{model}/"
|
||||||
filename = model + '.pkl'
|
filename = model + '.pkl'
|
||||||
file_path = BUCKET + filename
|
file_path = BUCKET + filename
|
||||||
with fs.open(file_path, mode="rb") as f:
|
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()
|
image_buffer = io.BytesIO()
|
||||||
plt.savefig(image_buffer, format='png')
|
plt.savefig(image_buffer, format='png')
|
||||||
image_buffer.seek(0)
|
image_buffer.seek(0)
|
||||||
PATH = f"projet-bdc2324-team1/2_Output/2_2_Sales_Forecast/{type_of_activity}/"
|
PATH = f"projet-bdc2324-team1/2_Output/2_3_Sales_Forecast/{type_of_activity}/"
|
||||||
FILE_PATH_OUT_S3 = PATH + File_name + type_of_activity + '.png'
|
FILE_PATH_OUT_S3 = PATH + File_name + type_of_activity + '.png'
|
||||||
with fs.open(FILE_PATH_OUT_S3, 'wb') as s3_file:
|
with fs.open(FILE_PATH_OUT_S3, 'wb') as s3_file:
|
||||||
s3_file.write(image_buffer.read())
|
s3_file.write(image_buffer.read())
|
||||||
|
|
Loading…
Reference in New Issue
Block a user