dmarinhoDKR/agentic-mlops-phishing-platform

GitHub: dmarinhoDKR/agentic-mlops-phishing-platform

基于 PyTorch 与 MLflow 的生产级钓鱼检测 MLOps 平台,覆盖训练、评估、推理与 Agentic 分析全流程。

Stars: 1 | Forks: 0

## 技术栈 ![Python](https://img.shields.io/badge/Python-0F172A?style=flat-square&logo=python&logoColor=FFD43B) ![PyTorch](https://img.shields.io/badge/PyTorch-0F172A?style=flat-square&logo=pytorch&logoColor=EE4C2C) ![FastAPI](https://img.shields.io/badge/FastAPI-0F172A?style=flat-square&logo=fastapi&logoColor=009688) ![MLflow](https://img.shields.io/badge/MLflow-0F172A?style=flat-square&logo=mlflow&logoColor=0194E2) ![Pytest](https://img.shields.io/badge/pytest-0F172A?style=flat-square&logo=pytest&logoColor=0A9EDC) ![Docker](https://img.shields.io/badge/Docker-0F172A?style=flat-square&logo=docker&logoColor=2496ED) ![GitHub Actions](https://img.shields.io/badge/GitHub_Actions-0F172A?style=flat-square&logo=githubactions&logoColor=2088FF) **后端:** Python、FastAPI 和 REST API **机器学习与实验跟踪:** PyTorch 和 MLflow **质量与交付:** pytest、Docker 和 GitHub Actions # Agentic MLOps 钓鱼平台 一个用于钓鱼检测和事件检测的生产级 MLOps 平台。 ## 目标 - 使用 PyTorch 训练和评估钓鱼检测模型。 - 使用 MLflow 跟踪实验。 - 通过 FastAPI 推理服务提供预测。 - 使用 Docker 对系统进行容器化。 - 在 Kubernetes 上部署训练和推理工作负载。 - 添加一个 Agentic AI 助手,用于分析模型指标、日志和回归。 - 利用 Ray 和 AWS 的云基础设施,将该平台扩展至分布式训练。 ## 规划架构 数据 -> 预处理 -> 训练 -> 评估 -> 模型注册表 -> 推理 API -> 监控 -> Agentic 分析 ## 本地运行 训练基线模型: ``` python -m phishing_ml.training.train_baseline ``` 本地运行 API: ``` uvicorn phishing_ml.inference.api:app --reload ``` 测试 API: ``` curl http://127.0.0.1:8000/health ``` ``` curl -X POST "http://127.0.0.1:8000/predict" \ -H "Content-Type: application/json" \ -d '{"text":"Security alert: validate your credentials within 24 hours."}' ``` ## 使用确定性 MLOps Copilot 当前的 copilot 阶段无需 LLM 即可运行。它提供确定性的、可测试的工具,用于检查模型质量、对可疑消息进行分类,并从受信任的项目文件中检索带有引用的证据。 检查模型质量状态: ``` python -m phishing_ml.agents.copilot status ``` 对消息进行分类: ``` python -m phishing_ml.agents.copilot classify \ "Urgent: verify your password immediately." ``` 搜索本地项目知识库: ``` python -m phishing_ml.agents.copilot search \ "How is model quality validated?" \ --limit 3 ``` ## 使用 Docker Compose 运行 构建并运行推理 API: ``` docker compose up --build api ``` API 期望在以下位置找到模型 artifacts: ``` artifacts/baseline/model.pt artifacts/baseline/vectorizer.pkl ``` ## 路线图 - [x] 项目脚手架 - [x] 合成钓鱼数据集 - [x] 训练 pipeline - [x] 评估 pipeline - [x] FastAPI 推理服务 - [x] MLflow 实验跟踪 - [x] 配置驱动的训练与 MLflow 可追溯性 - [x] 自动化测试和 GitHub Actions CI - [x] 结构化评估报告和模型质量门禁 - [x] Docker Compose 本地环境 - [x] 确定性 MLOps Copilot 工具和 CLI - [x] 本地 RAG 知识库 - [ ] LangGraph Agentic copilot - [ ] 全栈生成式 AI 界面 - [ ] MCP 工具服务器 - [ ] Kubernetes manifests - [ ] Ray 分布式训练 - [ ] AWS 部署
标签:凭据扫描, 子域名突变, 安全规则引擎, 漏洞利用检测, 请求拦截, 逆向工具