{
  "GENERIC_ENDPOINT_CALLED": "Endpoint called: {endpoint} - Fetching configurations",
  "GENERIC_INTERNAL_SERVER_ERROR": "An internal error occurred while processing your request.",
  "GENERIC_ERROR_WITH_EXCEPTION": "An internal error occurred while processing your request: {error}",
  "GENERIC_MODEL_NOT_FOUND": "No model with ID: {model_id}",
  "GENERIC_PERMISSION_DENIED_LOG": "User lacks required permission '{permission}' for {function}",
  "GENERIC_MODEL_NOT_REGISTERED": "Model '{model_name}' is not registered or unavailable.",
  "GENERIC_MODEL_ALREADY_EXISTS": "Model '{model_name}' is already registered.",

  "AUTH_DYNAMIC_PERMISSIONS_SUCCESS": "Successfully integrated {count} dynamic model permissions.",
  "AUTH_DYNAMIC_PERMISSIONS_ERROR": "Failed to append dynamic permissions from database: {error}",
  "AUTH_TOKEN_INIT_LOG": "Initiating token exchange request.",
  "AUTH_TOKEN_SUCCESS_LOG": "Successfully retrieved service token. Expires at: {expires_at}",
  "AUTH_TOKEN_FAILED_LOG": "Failed to fetch token. Status code: {status}, Response: {text}",
  "AUTH_NETWORK_ERROR_LOG": "Network error during token exchange: {error}",
  "AUTH_GENERIC_ERROR_LOG": "Unexpected error during token exchange: {error}",

  "DB_TRIGGER": "Database configuration retrieval triggered",
  "DB_ENV_MISSING": "No environment variables found starting with 'DB_DATABASE'.",
  "DB_GRAPHQL_ERROR": "Failed to fetch storage domains from GraphQL service: {error}. Proceeding with empty domains list to maintain service uptime.",
  "DB_ASSEMBLE_ERROR": "Failed to assemble database configuration response: {error}",

  "DATASHEET_CALLED": "Datasheet retrieval triggered for model ID: {model_id}",
  "DATASHEET_SUCCESS": "Datasheet successfully generated and authorized for model '{model_name}'.",
  "DATASHEET_S3_MISSING": "README.md not found for model: {model_name}",
  "DATASHEET_S3_ERROR": "Storage error: {error}",
  "DATASHEET_GENERATION_FAILED": "PDF generation failed: {error}",

  "MODELS_ERROR": "An error accoured while getting models: {error}",

  "EVAL_REQUEST_RECEIVED": "Received evaluation request for model '{model_id}' (version: {version}) via configuration file.",
  "EVAL_JSON_PARSE_ERROR": "Failed to parse uploaded JSON configuration: {error}",
  "EVAL_VERSION_MISSING_LOG": "Requested version '{version}' for model '{model_name}' does not exist.",
  "EVAL_NO_VERSIONS_LOG": "No uploaded model versions found for model '{model_name}'.",
  "EVAL_SEAWEED_WEIGHTS_ERROR": "Could not load weights from Seaweed for model '{model_name}' ({error}). Proceeding with model=None.",
  "EVAL_FAILED_LOG": "Model evaluation failed: {error}",
  "EVAL_SUCCESS": "Evaluation successful for version '{version}', binary data returned.",
  "EVAL_PROCESSING_EXCEPTION": "Error during evaluation processing for model {model_name}: {error}",
  "EVAL_SEAWEED_FAILED": "Failed to upload evaluation to SeaweedFS: {error}",

  "TRAIN_REQUEST_RECEIVED": "Received asynchronous training request for model: {model_id}",
  "TRAIN_JSON_PARSE_ERROR": "Failed to parse uploaded JSON configuration: {error}",
  "TRAIN_SEAWEED_FETCH_LOG": "Fetching base configuration from Seaweed: {path}",
  "TRAIN_SEAWEED_ERROR_LOG": "Failed to fetch or parse base config from Seaweed for model '{model_name}': {error}",
  "TRAIN_VALIDATION_SUCCESS": "Training parameters cross-validation passed successfully.",
  "TRAIN_DEFAULT_PAYLOAD": "No configuration file provided. Proceeding with default empty payload parameters.",
  "TRAIN_NOT_SUPPORTED_LOG": "Requested model '{model_name}' does not support training.",
  "TASK_DISPATCHED": "Successfully dispatched task for {model_name}. Task ID: {task_id}",
  "JOB_ACCEPTED_MESSAGE": "Task has been successfully accepted and scheduled.",
  "TRAIN_GETTING_README_LOG": "Fetching README.md from Seaweed for model: {model_name}",
  "TRAIN_README_FETCH_ERROR": "Failed to fetch README.md for model {model_name} from Seaweed: {error}",

  "HEALTH_SUCCESS": "Health status checked successfully",

  "UPLOAD_JSON_PARSE_ERROR": "Failed to parse JSON configuration: {error}",
  "UPLOAD_PRETRAINED_CONFLICT_LOG": "Validation failed: 'training_required' is False, but a pretrained model was uploaded.",
  "UPLOAD_PRETRAINED_RECEIVED": "Pre-trained PyTorch model received: {filename} ({size} bytes)",
  "UPLOAD_PROCESSING_SUCCESS": "Model files validated and processed successfully",
  "UPLOAD_SUCCESS": "Model upload successful, binary data returned.",
  "UPLOAD_EXCEPTION_LOG": "Error during model upload processing: {error}",

  "ROUTER_INIT_SUCCESS": "API router initialized with all endpoints",

  "VALIDATION_BASE_MISSING_LOG": "Validation failed: No BaseModel instantiation found in source code.",
  "VALIDATION_BASE_SYNTAX_LOG": "Syntax error in uploaded Python file: {error}",
  "VALIDATION_FILE_EXTENSION_LOG": "Invalid file extension: {filename}",
  "VALIDATION_JSON_MISSING_FIELD": "Missing or empty mandatory field: '{field}'",
  "VALIDATION_JSON_META_REQUIRED": "The 'training_metadata' block is required when 'training_required' is True.",
  "VALIDATION_EXTENSION_REQUIRED": "The 'model_extension' block is required when 'training_required' is True.",
  "VALIDATION_JSON_META_TYPE": "The 'training_metadata' must be a valid JSON object.",
  "VALIDATION_JSON_SOURCE_REQUIRED": "The 'datasource' block is required when 'training_required' is True.",
  "VALIDATION_JSON_HYPER_REQUIRED": "The 'hyperparameters' block is required when uploading a pretrained model.",
  "VALIDATION_JSON_HYPER_TYPE": "The 'hyperparameters' must be a valid JSON object.",
  "VALIDATION_JSON_HYPER_CONFLICT": "Hyperparameters were uploaded without a pretreined model.",
  "VALIDATION_UUID_MISSING_LOG": "Validation failed. The following athlete UUIDs do not exist: {uuids}",
  "VALIDATION_UUID_ERROR_LOG": "Error during athlete UUID validation: {error}",
  "VALIDATION_VERSION_CHECK_LOG": "Checking existence of model '{model_name}' version '{version}' in Seaweed bucket with prefix: {prefix}",
  "VALIDATION_VERSION_SUCCESS_LOG": "Model version '{version}' for '{model_name}' successfully validated in Seaweed.",
  "VALIDATION_VERSION_MISSING_LOG": "Model version '{version}' for '{model_name}' does not exist in Seaweed bucket.",
  "VALIDATION_VERSION_EXCEPTION_LOG": "Failed to query Seaweed bucket for model validation: {error}",

  "TELEMETRY_INIT_LOG": "Setting up OpenTelemetry tracing for application: {app_name}",
  "TELEMETRY_SUCCESS_LOG": "OpenTelemetry tracing has been configured successfully.",

  "TASK_START_LOG": "Starting asynchronous training for model: {model_name} (Task ID: {task_id})",
  "TASK_FETCH_DATA_LOG": "Fetching athlete training data for model: {model_name}",
  "TASK_FINISHED_LOG": "Training for {model_name} finished in {duration:.4f} seconds.",
  "TASK_SUCCESS_LOG": "Training successfully completed for task {task_id}. Artifacts saved to Seaweed.",
  "TASK_EXCEPTION_LOG": "Error inside Celery task for model {model_name}: {error}",

  "SECURITY_JWT_VALIDATE_INIT": "Validating JWT token",
  "SECURITY_JWT_VALIDATE_SUCCESS": "JWT token is valid",
  "SECURITY_JWT_EXPIRED_LOG": "JWT token has expired",
  "SECURITY_JWT_INVALID_LOG": "Invalid JWT token",
  "SECURITY_API_KEY_INIT": "Validating API key",
  "SECURITY_API_KEY_INVALID_LOG": "Invalid API key provided",
  "SECURITY_API_KEY_SUCCESS": "API key is valid",
  "SECURITY_AUTH_CONTEXT_LOG": "Getting current authentication",
  "SECURITY_PERM_VERIFY_INIT": "Verifying permission: {permission}",
  "SECURITY_PERM_UNKNOWN_LOG": "Unknown permission: {permission}",
  "SECURITY_PERM_VERIFY_SUCCESS": "Permission verified: {permission}",
  "SECURITY_PERM_CHECK_INIT": "Checking permission: {permission}",
  "SECURITY_PERM_MISSING_LOG": "User missing permission: {permission}",
  "SECURITY_PERM_CHECK_SUCCESS": "Permission check passed for: {permission}",
  "SECURITY_PERM_GEN_TEMPLATE_EVALUATE": "Access to evaluate the model {model_name}",
  "SECURITY_PERM_GEN_TEMPLATE_TRAIN": "Access to train the model {model_name}",
  "SECURITY_PERM_GEN_TEMPLATE_DATASHEET": "Access to download the model datasheet for {model_name}",
  "SECURITY_PERM_GEN_DB_SUCCESS": "Successfully saved permission '{permission}' to database.",
  "SECURITY_PERM_GEN_DB_ERROR": "Failed to persist permission '{permission}' into database: {error}",
  "SECURITY_PERM_GEN_DB_EXCEPTION": "Database insertion failed for permission mapping: {error}",
  "SECURITY_PERM_GEN_SUMMARY": "Dynamically generated and saved {count} database permission rows for model ID: {model_id}",

  "REGISTRY_DISCOVER_INIT": "Starting model discovery and registration.",
  "REGISTRY_DISCOVER_DIR_ERROR": "Specified directory does not exist or is not a directory.",
  "REGISTRY_IMPORT_SUCCESS": "Successfully imported module: {path}",
  "REGISTRY_INSPECT_CLASS": "Inspecting class: {name}",
  "REGISTRY_REGISTER_SUCCESS": "Registered model: {name}",
  "REGISTRY_IMPORT_ERROR": "Error occurred while importing module: {path}",
  "REGISTRY_IMPORT_EXCEPTION": "Exception: {error}",
  "REGISTRY_TRAIN_NOT_SUPPORTED": "Training is not supported for model: {model_class}",
  "REGISTRY_TRAIN_SUPPORTED": "Training is supported for model: {model_class}",
  "REGISTRY_VERSION_RESOLVE_INIT": "Resolving latest version from Seaweed for model: {model_name}",
  "REGISTRY_VERSION_EMPTY_WARNING": "No explicit version directories found for model '{model_name}'. Defaulting to {default}.",
  "REGISTRY_VERSION_RESOLVE_SUCCESS": "Successfully resolved latest version for '{model_name}' as: {version}",
  "REGISTRY_VERSION_RESOLVE_ERROR": "Failed to fetch model versions from Seaweed for '{model_name}': {error}",
  "REGISTRY_VERSION_BUMP_ERROR": "Could not parse version string '{version}', defaulting to v1.0. Error: {error}",
  "REGISTRY_WEIGHTS_SEARCH_INIT": "Searching for weights in Seaweed bucket with prefix: {prefix}",
  "REGISTRY_WEIGHTS_MISSING_ERROR": "No weight file found under path prefix: {prefix}",
  "REGISTRY_WEIGHTS_DOWNLOAD_INIT": "Downloading weight artifact: {name}",
  "REGISTRY_WEIGHTS_LOAD_ERROR": "Failed to fetch or load PyTorch weights from Seaweed: {error}",
  "REGISTRY_EXTENSION_FETCH_INIT": "Fetching model extension from Seaweed config for model: {model_name}",
  "REGISTRY_EXTENSION_MISSING_WARNING": "The 'model_extension' key was not found or is empty in config for model '{model_name}'.",
  "REGISTRY_EXTENSION_FETCH_SUCCESS": "Successfully resolved extension '{extension}' for model '{model_name}'.",
  "REGISTRY_EXTENSION_FETCH_ERROR": "Failed to fetch or parse configuration from Seaweed at path '{path}': {error}",

  "SAVER_LOCAL_SOURCE_SUCCESS": "Model source code successfully saved locally to: {path}",
  "SAVER_SEAWEED_UPLOAD_ERROR": "Failed to upload components to Seaweed for model '{model_name}': {error}",
  "SAVER_SEAWEED_UPLOAD_EXCEPTION": "Seaweed upload sequence failed: {error}",
  "SAVER_DATASHEET_UPLOAD_SUCCESS": "Model datasheet (README.md) successfully uploaded to Seaweed: {path}",
  "SAVER_CONFIG_UPLOAD_SUCCESS": "Configuration successfully uploaded to Seaweed: {path}",
  "SAVER_WEIGHTS_PREP_LOG": "Preparing weights upload to Seaweed for {model_name} ({version})...",
  "SAVER_WEIGHTS_UPLOAD_SUCCESS": "Pretrained weights successfully uploaded to Seaweed: {path}",
  "SAVER_WEIGHTS_UPLOAD_ERROR": "Failed to serialize or upload PyTorch model to Seaweed: {error}",
  "SAVER_WEIGHTS_UPLOAD_EXCEPTION": "Model upload sequence failed: {error}",

  "GRAFANA_REQUEST_FAILED": "Grafana API request failed: {error}",
  "GRAFANA_DATASOURCE_FOUND": "Found {type} datasource with UID: {uid}",
  "GRAFANA_DATASOURCE_MISSING": "Datasource with type '{type}' not found in Grafana.",
  "GRAFANA_DATASOURCE_ERROR": "Failed to get {type} datasource UID: {error}",
  "GRAFANA_CONFIG_MISSING_WARNING": "Configuration file not found at {path}. Using internal defaults.",
  "GRAFANA_CONFIG_PARSE_ERROR": "Failed to parse configuration file: {error}. Using internal defaults.",
  "GRAFANA_DASHBOARD_CREATE_INIT": "Creating dashboard: {title}",
  "GRAFANA_DASHBOARD_EXISTS": "Dashboard 'mi-service-status' already exists. Skipping creation to preserve model panels.",
  "GRAFANA_DASHBOARD_MISSING_LOG": "Dashboard does not exist. Creating new dashboard.",
  "GRAFANA_DASHBOARD_SUCCESS": "Dashboard created successfully: {response}",
  "GRAFANA_DASHBOARD_ERROR": "Failed to create dashboard: {error}",
  "GRAFANA_WORKFLOW_ERROR": "Error creating dashboard: {error}",
  "GRAFANA_SERVICE_ACCOUNT_EXISTS": "Service account '{name}' might already exist.",
  "GRAFANA_SERVICE_ACCOUNT_CREATION_FAILED": "Failed to create service account '{name}': {error}",
  "GRAFANA_SERVICE_ACCOUNT_TOKEN_CREATION_FAILED": "Failed to create token for account {account_id}: {error}",
  "GRAFANA_SERVICE_ACCOUNT_TOKEN_GENERATED": "Generated Token: {api_token}",
  "GRAFANA_SERVICE_ACCOUNT_CREATED": "Successfully created Service Account with ID: {id}",

  "GRAFANA_PANEL_REAL_TIME_STATUS": "MI Service Status - Real Time",
  "GRAFANA_PANEL_UPTIME_HISTORY": "MI Service Status - Uptime History",
  "GRAFANA_PANEL_CURRENT_STATUS": "MI Service Status - Current Status",
  "GRAFANA_PANEL_UPTIME_DURATION": "MI Service Status - Uptime Duration",
  "GRAFANA_PANEL_STATE_CHANGES": "MI Service Status - State Changes",
  "GRAFANA_PANEL_REQUEST_RATE": "MI Service Status - Request Rate",
  "GRAFANA_PANEL_ENDPOINT_LATENCY": "MI Service Status - Endpoint Latency",
  "GRAFANA_PANEL_MODEL_INVOCATIONS_TRAIN": "MI Service Status - Model Invocations (Train)",
  "GRAFANA_PANEL_MODEL_INVOCATIONS_EVAL": "MI Service Status - Model Invocations (Eval)",
  "GRAFANA_PANEL_MODEL_TRAINING_TIMES": "MI Service Status - Model Training Times",

  "FETCH_QUERY_FILE_MISSING_LOG": "File missing at {path}",
  "FETCH_ENV_MISSING_LOG": "MI_STORAGE_GRAPHQL_URL environment variable is not configured.",
  "FETCH_DISCOVERY_INIT": "Sending storage domains discovery query to: {url}",
  "FETCH_DISCOVERY_LAYOUT_ERROR": "The availableMeasurementTypes field is missing from the GraphQL data response layout.",
  "FETCH_DISCOVERY_SUCCESS": "Successfully fetched {count} storage domain elements.",
  "FETCH_HTTP_ERROR_LOG": "HTTP error occurred while fetching storage domains: {status} - {text}",
  "FETCH_NETWORK_ERROR_LOG": "Network transport error occurred while reaching the data storage service: {error}",
  "FETCH_UUID_SERVER_ERROR": "GraphQL server returned internal errors: {errors}",
  "FETCH_UUID_LAYOUT_WARNING": "GraphQL response 'data' is missing or null.",
  "FETCH_UUID_HTTP_ERROR": "HTTP error occurred: {error} | Response body: {text}",
  "FETCH_UUID_UNEXPECTED_ERROR": "Unexpected error during fetching all athletes: {error}",
  "FETCH_TRAINING_INIT": "Processing training configuration: {config}",
  "FETCH_TRAINING_SUCCESS": "Successfully fetched {count} athlete records.",
  "FETCH_DISCOVERY_ERROR_LOG": "GraphQL storage engine failed to execute the domains metadata query.",
  "JWT_TOKEN_EXPIRED_OR_MISSING_LOG": "JWT token expired or missing. Fetching a new one...",
  "JWT_FETCH_EXCEPTION_ERROR": "Exception occurred during token fetch: {error}",
  "JWT_TOKEN_MISSING_ERROR": "Failed to fetch a valid JWT token from auth service.",

  "DATA_INPUT_SUCCESS": "Job created successfully: {job}",
  "DATA_INPUT_ERROR": "Error while creating job: {error}",

  "LANGUAGE_MANAGER_SUCCESS": "Translation file loaded successfully for {language}.",
  "LANGUAGE_MANAGER_ERROR": "Failed to load translation, error: {error}",

  "DECODE_PROTO_EMPTY": "The downloaded file content is empty.",
  "DECODE_PROTO_DOWNLOAD_ERROR": "Failed to download from URL. Error: {error}",
  "DECODE_PROTO_PARSE_ERROR": "Failed to parse Protobuf data. Error: {error}",
  "DECODE_PROTO_UNEXPECTED_ERROR": "Unexpected error during parsing. Error: {error}",

  "DELETE_LOCAL_SUCCESS":"Local directory removed: {path}",
  "DELETE_SEAWEED_WARNING": "SeaweedFS deletion returned unexpected status: {status_code}",
  "DELETE_SEAWEED_ERROR":"Error communicating with SeaweedFS: {error}",
  "DELETE_SEAWEED_SUCCESS":"Model successfully dedleted from Seaweed",
  "DELETE_DB_SUCCESS":"Model successfully deleted from database"
}