@@ -87,14 +87,14 @@ def log_next_producer_step(self, name):
87
87
88
88
if next_step >= len (self .ordered_steps ):
89
89
cur_step_name = self .or_join (self .ordered_steps [self .current_step ][0 ])
90
- LOGGER .warning ((f"[GUIDE] Successfully performed { name } .\n "
90
+ LOGGER .warning ((f"[GUIDE] DONE: { name } .\n "
91
91
f"\t You have reached the end of the "
92
92
f"predictive engineering workflow.\n "
93
93
f"\t You can call { cur_step_name } again or re-perform previous steps "
94
94
f"based on results." ))
95
95
else :
96
96
next_step_name = self .or_join (self .ordered_steps [next_step ][0 ])
97
- LOGGER .warning (f"[GUIDE] Successfully performed { name } .\n "
97
+ LOGGER .warning (f"[GUIDE] DONE: { name } .\n "
98
98
f"\t You can perform the next step by calling { next_step_name } ." )
99
99
100
100
def perform_producer_step (self , zephyr , method ,
@@ -112,13 +112,13 @@ def try_log_forward_set_method_warning(self, name, next_step):
112
112
f"step { next_step } by performing { name } ." )
113
113
else :
114
114
from_str = (f"Performing step { next_step } with { name } ." )
115
- LOGGER .warning ((f"[GUIDE] STALE WARNING: \n "
115
+ LOGGER .warning ((f"[GUIDE] STALE WARNING: { name } . \n "
116
116
f"\t { from_str } \n "
117
117
f"\t This is a forward step via a set method.\n "
118
118
f"\t All previous steps' results will be considered stale." ))
119
119
120
120
def try_log_backwards_set_method_warning (self , name , next_step ):
121
- LOGGER .warning ((f"[GUIDE] STALE WARNING: \n "
121
+ LOGGER .warning ((f"[GUIDE] STALE WARNING: { name } . \n "
122
122
f"\t Going from step { self .current_step } to "
123
123
f"step { next_step } by performing { name } .\n "
124
124
f"\t This is a backwards step via a set method.\n "
@@ -133,7 +133,7 @@ def try_log_backwards_key_method_warning(self, name, next_step):
133
133
else :
134
134
steps_in_between_str = ""
135
135
136
- LOGGER .warning ((f"[GUIDE] STALE WARNING:\n "
136
+ LOGGER .warning ((f"[GUIDE] STALE WARNING: { name } . \n "
137
137
f"\t Going from step { self .current_step } to "
138
138
f"step { next_step } by performing { name } .\n "
139
139
f"\t This is a backwards step via a key method.\n "
@@ -143,13 +143,14 @@ def log_get_inconsistent_warning(self, name, next_step):
143
143
prod_steps_str = self .or_join (self .ordered_steps [next_step ][0 ])
144
144
prod_steps = f"{ next_step } .{ prod_steps_str } "
145
145
latest_up_to_date = self .get_last_up_to_date (next_step )
146
- LOGGER .warning ((f"[GUIDE] INCONSISTENCY WARNING: Unable to perform { name } because"
146
+ LOGGER .warning ((f"[GUIDE] INCONSISTENCY WARNING: { name } .\n "
147
+ f"Unable to perform { name } because"
147
148
f"{ prod_steps } has not been run yet.\n "
148
149
f"Run steps starting at or before { latest_up_to_date } ." ))
149
150
150
151
def log_get_stale_warning (self , name , next_step ):
151
152
latest_up_to_date = self .get_last_up_to_date (next_step )
152
- LOGGER .warning ((f"[GUIDE] STALE WARNING: Performing { name } .\n "
153
+ LOGGER .warning ((f"[GUIDE] STALE WARNING: { name } .\n "
153
154
f"This data is potentially stale.\n "
154
155
f"Re-run steps starting at or before { latest_up_to_date } "
155
156
f"to ensure data is up to date." ))
@@ -217,42 +218,52 @@ def try_perform_inconsistent_producer_step( # add using stale and overwriting
217
218
# not up to date
218
219
if (next_step >= self .current_step and
219
220
self .iterations [next_step - 1 ] != self .cur_iteration ):
220
- corr_set_method = self .or_join (self .ordered_steps [next_step ][1 ])
221
221
prev_step = next_step - 1
222
222
prev_set_method = self .or_join (self .ordered_steps [prev_step ][1 ])
223
223
prev_key_method = self .or_join (self .ordered_steps [prev_step ][0 ])
224
- LOGGER .warning (f"[GUIDE] INCONSISTENCY WARNING:\n "
224
+ if next_step == len (self .ordered_steps ) - 1 :
225
+ final_text = (f"\t Otherwise, you can regenerate the data of the previous "
226
+ f"step by calling { prev_key_method } , and then call { name } again." )
227
+ else :
228
+ corr_set_method = self .or_join (self .ordered_steps [next_step ][1 ])
229
+ final_text = (f"\t If you already have the data for THIS step, you can use "
230
+ f"{ corr_set_method } to set the data.\n "
231
+ f"\t Otherwise, you can regenerate the data of the "
232
+ f"previous step by calling { prev_key_method } , "
233
+ f"and then call { name } again." )
234
+ LOGGER .warning (f"[GUIDE] INCONSISTENCY WARNING: { name } \n "
225
235
f"\t Unable to perform { name } because you are "
226
236
f"performing a key method at step { next_step } but the result of the "
227
237
f"previous step, step { prev_step } , is stale.\n "
228
238
f"\t If you want to use the stale result or "
229
- f"already have the data for step { prev_step } , you can use the "
230
- f"corresponding set method: { prev_set_method } .\n "
231
- f"\t If you already have the data for THIS step, you can call "
232
- f"{ corr_set_method } to set the data.\n "
233
- f"\t Otherwise, you can regenerate the data of the "
234
- f"previous step by calling { prev_key_method } , "
235
- f"and then recall this method." )
239
+ f"already have the data for step { prev_step } , you can use "
240
+ f"{ prev_set_method } to set the data.\n "
241
+ f"{ final_text } " )
236
242
elif (next_step < self .current_step and
237
243
self .iterations [next_step - 1 ] != self .cur_iteration ):
238
244
prev_step = next_step - 1
239
245
prev_key_method = self .or_join (self .ordered_steps [prev_step ][0 ])
240
- corr_set_method = self .or_join (self .ordered_steps [next_step ][1 ])
241
246
prev_set_method = self .or_join (self .ordered_steps [prev_step ][1 ])
242
- LOGGER .warning (f"[GUIDE] INCONSISTENCY WARNING:\n "
247
+
248
+ if next_step == len (self .ordered_steps ) - 1 :
249
+ final_text = (f"\t Otherwise, you can regenerate the data of the previous "
250
+ f"step by calling { prev_key_method } , and then call { name } again." )
251
+ else :
252
+ corr_set_method = self .or_join (self .ordered_steps [next_step ][1 ])
253
+ final_text = (f"\t If you already have the data for THIS step, you can use "
254
+ f"{ corr_set_method } to set the data.\n "
255
+ f"\t Otherwise, you can regenerate the data of the "
256
+ f"previous step by calling { prev_key_method } , "
257
+ f"and then call { name } again." )
258
+ LOGGER .warning (f"[GUIDE] INCONSISTENCY WARNING: { name } \n "
243
259
f"\t Unable to perform { name } because "
244
260
f"you are going backwards and starting a new iteration by "
245
261
f"performing a key method at step { next_step } but the result of the "
246
262
f"previous step, step { prev_step } , is STALE.\n "
247
263
f"\t If you want to use the STALE result or "
248
- f"already have the data for step { prev_step } , you can use the "
249
- f"corresponding set method: { prev_set_method } .\n "
250
- f"\t If you already have the data for THIS step, you can call "
251
- f"{ corr_set_method } to set the data.\n "
252
- f"\t Otherwise, you can regenerate the data of the "
253
- f"previous step by calling { prev_key_method } , "
254
- f"and then recall this method."
255
- )
264
+ f"already have the data for step { prev_step } , you can use "
265
+ f"{ prev_set_method } to set the data.\n "
266
+ f"{ final_text } " )
256
267
257
268
def try_perform_getter_step (
258
269
self , zephyr , method , * method_args , ** method_kwargs ):
@@ -424,7 +435,6 @@ def generate_entityset(
424
435
raise ValueError (
425
436
f"Invalid entityset type: { es_type } . Please use one of the following types:\
426
437
{ VALIDATE_DATA_FUNCTIONS .keys ()} " )
427
-
428
438
entityset = _create_entityset (dfs , es_type , custom_kwargs_mapping )
429
439
430
440
# perform signal processing
0 commit comments