brancheneinstufung2.py aktualisiert

This commit is contained in:
2025-08-04 08:36:07 +00:00
parent 8c7678ce4b
commit d95e46cf36

View File

@@ -57,8 +57,7 @@ def main():
"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"],
"Kombinierte Läufe": ["combined_all"],
"Spezial-Modi": ["reclassify_branches"], # Neue Kategorie oder zu bestehender hinzufügen
"Kombinierte Läufe": ["combined_all"]
"Spezial-Modi": ["reclassify_branches"],
}
valid_modes = [mode for modes in mode_categories.values() for mode in modes]
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_ml_steps='ml_predict' in steps_to_run_set
)
# NEUE BEDINGUNG HINZUGEFÜGT
elif selected_mode == "reclassify_branches":
data_processor.reclassify_all_branches(
start_sheet_row=args.start_sheet_row,
@@ -168,7 +166,8 @@ def main():
alignment_demo(sheet_handler)
elif selected_mode == "train_technician_model":
data_processor.train_technician_model()
elif selected_mode == "predict_technicians":
# KORRIGIERTE EINRÜCKUNG
elif selected_mode == "predict_technicians":
data_processor.process_predict_technicians(
start_sheet_row=args.start_sheet_row,
limit=args.limit
@@ -198,12 +197,12 @@ def main():
except Exception as e:
logger.critical(f"FATAL: Unerwarteter Fehler im Hauptprozess: {e}", exc_info=True)
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}")
finally:
logger.info(f"===== Skript beendet =====")
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}")
if __name__ == '__main__':