Ahmedik95316 commited on
Commit
680d58d
Β·
verified Β·
1 Parent(s): 3088069

Update initialize_system.py

Browse files
Files changed (1) hide show
  1. initialize_system.py +20 -0
initialize_system.py CHANGED
@@ -428,12 +428,32 @@ def create_initial_logs():
428
  json.dump(activity_log, f, indent=2)
429
  log_step(f"βœ… Created activity log: {activity_log_path}")
430
 
 
 
 
 
 
431
  # Create empty monitoring logs
432
  monitoring_log_path = path_manager.get_logs_path("monitoring_log.json")
433
  with open(monitoring_log_path, 'w') as f:
434
  json.dump([], f)
435
  log_step(f"βœ… Created monitoring log: {monitoring_log_path}")
436
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
437
  # Create other necessary log files
438
  log_files = [
439
  "drift_history.json",
 
428
  json.dump(activity_log, f, indent=2)
429
  log_step(f"βœ… Created activity log: {activity_log_path}")
430
 
431
+ # Create monitoring directory structure
432
+ monitor_dir = path_manager.get_logs_path("monitor")
433
+ monitor_dir.mkdir(parents=True, exist_ok=True)
434
+ log_step(f"βœ… Created monitor directory: {monitor_dir}")
435
+
436
  # Create empty monitoring logs
437
  monitoring_log_path = path_manager.get_logs_path("monitoring_log.json")
438
  with open(monitoring_log_path, 'w') as f:
439
  json.dump([], f)
440
  log_step(f"βœ… Created monitoring log: {monitoring_log_path}")
441
 
442
+ # Create monitor-specific log files
443
+ monitor_log_files = [
444
+ "monitor/predictions.json",
445
+ "monitor/metrics.json",
446
+ "monitor/alerts.json"
447
+ ]
448
+
449
+ for log_file in monitor_log_files:
450
+ log_path = path_manager.get_logs_path(log_file)
451
+ log_path.parent.mkdir(parents=True, exist_ok=True) # Ensure parent dir exists
452
+ if not log_path.exists():
453
+ with open(log_path, 'w') as f:
454
+ json.dump([], f)
455
+ log_step(f"βœ… Created {log_file}")
456
+
457
  # Create other necessary log files
458
  log_files = [
459
  "drift_history.json",