brancheneinstufung2.py aktualisiert
This commit is contained in:
@@ -57,8 +57,7 @@ def main():
|
|||||||
"Re-Evaluation": ["reeval"],
|
"Re-Evaluation": ["reeval"],
|
||||||
"Dienstprogramme": ["find_wiki_serp", "check_urls", "contacts", "update_wiki_suggestions", "wiki_reextract_missing_an", "website_details", "train_technician_model", "predict_technicians", "alignment", "reparatur_sitz", "plausi_check_data"],
|
"Dienstprogramme": ["find_wiki_serp", "check_urls", "contacts", "update_wiki_suggestions", "wiki_reextract_missing_an", "website_details", "train_technician_model", "predict_technicians", "alignment", "reparatur_sitz", "plausi_check_data"],
|
||||||
"Kombinierte Läufe": ["combined_all"],
|
"Kombinierte Läufe": ["combined_all"],
|
||||||
"Spezial-Modi": ["reclassify_branches"], # Neue Kategorie oder zu bestehender hinzufügen
|
"Spezial-Modi": ["reclassify_branches"],
|
||||||
"Kombinierte Läufe": ["combined_all"]
|
|
||||||
}
|
}
|
||||||
valid_modes = [mode for modes in mode_categories.values() for mode in modes]
|
valid_modes = [mode for modes in mode_categories.values() for mode in modes]
|
||||||
mode_help_text = "Betriebsmodus. Waehlen Sie einen der folgenden:\n"
|
mode_help_text = "Betriebsmodus. Waehlen Sie einen der folgenden:\n"
|
||||||
@@ -158,7 +157,6 @@ def main():
|
|||||||
process_website_steps='web' in steps_to_run_set,
|
process_website_steps='web' in steps_to_run_set,
|
||||||
process_ml_steps='ml_predict' in steps_to_run_set
|
process_ml_steps='ml_predict' in steps_to_run_set
|
||||||
)
|
)
|
||||||
# NEUE BEDINGUNG HINZUGEFÜGT
|
|
||||||
elif selected_mode == "reclassify_branches":
|
elif selected_mode == "reclassify_branches":
|
||||||
data_processor.reclassify_all_branches(
|
data_processor.reclassify_all_branches(
|
||||||
start_sheet_row=args.start_sheet_row,
|
start_sheet_row=args.start_sheet_row,
|
||||||
@@ -168,6 +166,7 @@ def main():
|
|||||||
alignment_demo(sheet_handler)
|
alignment_demo(sheet_handler)
|
||||||
elif selected_mode == "train_technician_model":
|
elif selected_mode == "train_technician_model":
|
||||||
data_processor.train_technician_model()
|
data_processor.train_technician_model()
|
||||||
|
# KORRIGIERTE EINRÜCKUNG
|
||||||
elif selected_mode == "predict_technicians":
|
elif selected_mode == "predict_technicians":
|
||||||
data_processor.process_predict_technicians(
|
data_processor.process_predict_technicians(
|
||||||
start_sheet_row=args.start_sheet_row,
|
start_sheet_row=args.start_sheet_row,
|
||||||
@@ -198,12 +197,12 @@ def main():
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.critical(f"FATAL: Unerwarteter Fehler im Hauptprozess: {e}", exc_info=True)
|
logger.critical(f"FATAL: Unerwarteter Fehler im Hauptprozess: {e}", exc_info=True)
|
||||||
print(f"\n! Ein kritischer Fehler ist aufgetreten: {e}")
|
print(f"\n! Ein kritischer Fehler ist aufgetreten: {e}")
|
||||||
if log_file_path: # Nur ausgeben, wenn Pfad existiert
|
if 'log_file_path' in locals() and log_file_path:
|
||||||
print(f"Bitte pruefen Sie die Logdatei fuer Details: {log_file_path}")
|
print(f"Bitte pruefen Sie die Logdatei fuer Details: {log_file_path}")
|
||||||
finally:
|
finally:
|
||||||
logger.info(f"===== Skript beendet =====")
|
logger.info(f"===== Skript beendet =====")
|
||||||
logging.shutdown()
|
logging.shutdown()
|
||||||
if 'selected_mode' in locals() and selected_mode != 'exit' and log_file_path:
|
if 'selected_mode' in locals() and selected_mode != 'exit' and 'log_file_path' in locals() and log_file_path:
|
||||||
print(f"\nVerarbeitung abgeschlossen. Logfile: {log_file_path}")
|
print(f"\nVerarbeitung abgeschlossen. Logfile: {log_file_path}")
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|||||||
Reference in New Issue
Block a user