feat(week8): add ensemble-joshua assignment (API, Modal, agents); omit large RF model

This commit is contained in:
The Top Dev
2025-10-30 00:38:42 +03:00
parent a20b9b1bce
commit 9d8fca6eb4
11 changed files with 805 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
import logging
class Agent:
"""
An abstract superclass for Agents
Used to log messages in a way that can identify each Agent
"""
# Foreground colors
RED = '\033[31m'
GREEN = '\033[32m'
YELLOW = '\033[33m'
BLUE = '\033[34m'
MAGENTA = '\033[35m'
CYAN = '\033[36m'
WHITE = '\033[37m'
# Background color
BG_BLACK = '\033[40m'
# Reset code to return to default color
RESET = '\033[0m'
name: str = ""
color: str = '\033[37m'
def log(self, message):
"""
Log this as an info message, identifying the agent
"""
color_code = self.BG_BLACK + self.color
message = f"[{self.name}] {message}"
logging.info(color_code + message + self.RESET)