[导入]meta-enhanced Map

博客讨论了hibernate等O/R Mapping软件包中使用javabean作为数据载体的情况,指出其为贫血的领域模型,本身不能作为完整领域模型层。还对比了数据层和业务逻辑层的信息流方向,介绍了witrix平台统一数据访问框架基于Map类型及相关动态处理方式。
  hibernate等O/R Mapping软件包中使用javabean来作为数据的载体, 但这些bean一般除了get/set等数据访问方法之外没有什么其它的业务方法。 前一段时间有人认为这是所谓贫血的领域模型(Anemia Domain Model),引发了一场讨论。 其实这些bean的作用仅是表达了领域内的数据关系, 本身并不可能作为完整的领域模型层存在。 在数据层,我们所需要的是数据对外暴露,因为我们无法预知这些数据的使用方式, 就象是实验数据发表出来以后你无法预知别人如何分析一样,这时信息流是开放的,向外的:信息在这里,放马过来吧。 而在业务逻辑层,复杂的逻辑控制交织在一起,我们需要精细的控制信息通道,通过函数封装,我们反转了信息流的方向:取到什么数据是由调用者提供的信息决定 的。
     实际上,在ORM软件中使用的bean基本上与一个Map类似,只是它具有java Class所提供的元数据,而访问数据时又必须通过get/set方法,因而在这些方法中能够根据元数据动态的作出响应。在witrix平台的统一数据访 问框架中主要基于Map等通用数据类型,而不是个性化的bean。为了使得Map具有与bean一样的动态响应能力,只需要加入meta的支持即可。
interface IExMap extends Map{
     IMapChecker getChecker();
  Map getModifications();
  ...
}
在get/set之前可以通过IMapChecker来实现动态处理,对Map中数据所作的修改也可以记录下来
PowerShell 7 环境已加载 (版本: 7.5.2) PS C:\Users\Administrator\Desktop> pip install diskcache python-dotenv prettytable Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Requirement already satisfied: diskcache in e:\python310\lib\site-packages (5.6.3) Requirement already satisfied: python-dotenv in e:\python310\lib\site-packages (1.0.1) Requirement already satisfied: prettytable in e:\python310\lib\site-packages (3.16.0) Requirement already satisfied: wcwidth in e:\python310\lib\site-packages (from prettytable) (0.2.13) PS C:\Users\Administrator\Desktop> cd E:\AI_System PS E:\AI_System> pip install diskcache python-dotenv prettytable Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Requirement already satisfied: diskcache in e:\python310\lib\site-packages (5.6.3) Requirement already satisfied: python-dotenv in e:\python310\lib\site-packages (1.0.1) Requirement already satisfied: prettytable in e:\python310\lib\site-packages (3.16.0) Requirement already satisfied: wcwidth in e:\python310\lib\site-packages (from prettytable) (0.2.13) PS E:\AI_System> pip install transformers diskcache python-dotenv prettytable Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Requirement already satisfied: transformers in e:\python310\lib\site-packages (4.37.0) Requirement already satisfied: diskcache in e:\python310\lib\site-packages (5.6.3) Requirement already satisfied: python-dotenv in e:\python310\lib\site-packages (1.0.1) Requirement already satisfied: prettytable in e:\python310\lib\site-packages (3.16.0) Requirement already satisfied: filelock in e:\python310\lib\site-packages (from transformers) (3.19.1) Requirement already satisfied: huggingface-hub<1.0,>=0.19.3 in e:\python310\lib\site-packages (from transformers) (0.21.3) Requirement already satisfied: numpy>=1.17 in e:\python310\lib\site-packages (from transformers) (1.26.3) Requirement already satisfied: packaging>=20.0 in e:\python310\lib\site-packages (from transformers) (25.0) Requirement already satisfied: pyyaml>=5.1 in e:\python310\lib\site-packages (from transformers) (6.0.2) Requirement already satisfied: regex!=2019.12.17 in e:\python310\lib\site-packages (from transformers) (2025.7.34) Requirement already satisfied: requests in e:\python310\lib\site-packages (from transformers) (2.31.0) Requirement already satisfied: tokenizers<0.19,>=0.14 in e:\python310\lib\site-packages (from transformers) (0.15.2) Requirement already satisfied: safetensors>=0.3.1 in e:\python310\lib\site-packages (from transformers) (0.4.2) Requirement already satisfied: tqdm>=4.27 in e:\python310\lib\site-packages (from transformers) (4.67.1) Requirement already satisfied: fsspec>=2023.5.0 in e:\python310\lib\site-packages (from huggingface-hub<1.0,>=0.19.3->transformers) (2025.7.0) Requirement already satisfied: typing-extensions>=3.7.4.3 in e:\python310\lib\site-packages (from huggingface-hub<1.0,>=0.19.3->transformers) (4.14.1) Requirement already satisfied: wcwidth in e:\python310\lib\site-packages (from prettytable) (0.2.13) Requirement already satisfied: colorama in e:\python310\lib\site-packages (from tqdm>=4.27->transformers) (0.4.6) Requirement already satisfied: charset-normalizer<4,>=2 in e:\python310\lib\site-packages (from requests->transformers) (3.4.3) Requirement already satisfied: idna<4,>=2.5 in e:\python310\lib\site-packages (from requests->transformers) (3.10) Requirement already satisfied: urllib3<3,>=1.21.1 in e:\python310\lib\site-packages (from requests->transformers) (2.5.0) Requirement already satisfied: certifi>=2017.4.17 in e:\python310\lib\site-packages (from requests->transformers) (2025.8.3) PS E:\AI_System> # 使用配置系统 PS E:\AI_System> from core.config import config ParserError: Line | 1 | from core.config import config | ~~~~ | The 'from' keyword is not supported in this version of the language. PS E:\AI_System> loader = ModelLoader(config=config) config=config: The term 'config=config' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. PS E:\AI_System> PS E:\AI_System> # 加载默认模型 PS E:\AI_System> model, tokenizer = loader.get_cognitive_model() ParserError: Line | 1 | model, tokenizer = loader.get_cognitive_model() | ~ | Missing argument in parameter list. PS E:\AI_System> PS E:\AI_System> # 加载其他模型 PS E:\AI_System> model2, tokenizer2 = loader.load_model("deepseek-7b-chat") ParserError: Line | 1 | model2, tokenizer2 = loader.load_model("deepseek-7b-chat") | ~ | Missing argument in parameter list. PS E:\AI_System> PS E:\AI_System> # 切换模型 PS E:\AI_System> loader.switch_model("Qwen2-7B") loader.switch_model: The term 'loader.switch_model' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. PS E:\AI_System> PS E:\AI_System> # 卸载不用的模型 PS E:\AI_System> loader.unload_model("deepseek-7b-chat") loader.unload_model: The term 'loader.unload_model' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. PS E:\AI_System> venv\Scripts\activate # 激活虚拟环境 (venv) PS E:\AI_System> python main.py # 启动系统 2025-08-27 22:56:12,130 - CoreConfig - INFO - 📂 从 E:\AI_System\config\default.json 加载配置: { "LOG_DIR": "E:/AI_System/logs", "CONFIG_DIR": "E:/AI_System/config", "MODEL_CACHE_DIR": "E:/AI_System/model_cache", "AGENT_NAME": "\u5c0f\u84dd", "DEFAULT_USER": "\u7ba1\u7406\u5458", "MAX_WORKERS": 4, "AGENT_RESPONSE_TIMEOUT": 30.0, "MODEL_BASE_PATH": "E:/AI_Models", "MODEL_PATHS": { "TEXT_BASE": "E:/AI_Models/Qwen2-7B", "TEXT_CHAT": "E:/AI_Models/deepseek-7b-chat", "MULTIMODAL": "E:/AI_Models/deepseek-vl2", "IMAGE_GEN": "E:/AI_Models/sdxl", "YI_VL": "E:/AI_Models/yi-vl", "STABLE_DIFFUSION": "E:/AI_Models/stable-diffusion-xl-base-1.0" }, "NETWORK": { "HOST": "0.0.0.0", "FLASK_PORT": 8000, "GRADIO_PORT": 7860 }, "DATABASE": { "DB_HOST": "localhost", "DB_PORT": 5432, "DB_NAME": "ai_system", "DB_USER": "ai_user", "DB_PASSWORD": "secure_password_here" }, "SECURITY": { "SECRET_KEY": "generated-secret-key-here" }, "ENVIRONMENT": { "ENV": "dev", "LOG_LEVEL": "DEBUG", "USE_GPU": true }, "DIRECTORIES": { "DEFAULT_MODEL": "E:/AI_Models/Qwen2-7B", "WEB_UI_DIR": "E:/AI_System/web_ui", "AGENT_DIR": "E:/AI_System/agent", "PROJECT_ROOT": "E:/AI_System" } } 2025-08-27 22:56:12,130 - CoreConfig - INFO - 📂 从 E:\AI_System\config\local.json 加载配置: {} 2025-08-27 22:56:12,130 - CoreConfig - INFO - 🌐 从 E:\AI_System\.env 加载环境变量 2025-08-27 22:56:12,130 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_ROOT=E:\AI_System 2025-08-27 22:56:12,130 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_DIRECTORIES__PROJECT_ROOT=E:\AI_System 2025-08-27 22:56:12,130 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_DIRECTORIES__AGENT_DIR=E:\AI_System\agent 2025-08-27 22:56:12,130 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_DIRECTORIES__WEB_UI_DIR=E:\AI_System\web_ui 2025-08-27 22:56:12,130 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_DIRECTORIES__DEFAULT_MODEL=E:\AI_Models\Qwen2-7B 2025-08-27 22:56:12,130 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_ENVIRONMENT__LOG_LEVEL=DEBUG 2025-08-27 22:56:12,130 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_DATABASE__DB_HOST=localhost 2025-08-27 22:56:12,130 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_DATABASE__DB_PORT=5432 2025-08-27 22:56:12,130 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_DATABASE__DB_NAME=ai_system 2025-08-27 22:56:12,130 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_DATABASE__DB_USER=ai_user 2025-08-27 22:56:12,130 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_DATABASE__DB_PASSWORD=****** 2025-08-27 22:56:12,130 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_SECURITY__SECRET_KEY=****** 2025-08-27 22:56:12,130 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_MODEL_PATHS__TEXT_BASE=E:\AI_Models\Qwen2-7B 2025-08-27 22:56:12,130 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_MODEL_PATHS__TEXT_CHAT=E:\AI_Models\deepseek-7b-chat 2025-08-27 22:56:12,130 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_MODEL_PATHS__MULTIMODAL=E:\AI_Models\deepseek-vl2 2025-08-27 22:56:12,130 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_MODEL_PATHS__IMAGE_GEN=E:\AI_Models\sdxl 2025-08-27 22:56:12,130 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_MODEL_PATHS__YI_VL=E:\AI_Models\yi-vl 2025-08-27 22:56:12,130 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_MODEL_PATHS__STABLE_DIFFUSION=E:\AI_Models\stable-diffusion-xl-base-1.0 2025-08-27 22:56:12,130 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_NETWORK__HOST=0.0.0.0 2025-08-27 22:56:12,130 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_NETWORK__FLASK_PORT=8000 2025-08-27 22:56:12,130 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_NETWORK__GRADIO_PORT=7860 2025-08-27 22:56:12,133 - CoreConfig - WARNING - ⚠️ 模型路径不存在: STABLE_DIFFUSION = E:/AI_Models/stable-diffusion-xl-base-1.0 2025-08-27 22:56:12,133 - CoreConfig - INFO - ✅ 配置系统初始化完成 2025-08-27 22:56:12,133 - ModelManager - ERROR - ❌ 关键依赖缺失: No module named 'diskcache' 2025-08-27 22:56:12,133 - ModelManager - WARNING - ⚠️ 使用简化缓存系统 2025-08-27 22:56:12,133 - ModelManager - INFO - ✅ 备用下载系统初始化完成 2025-08-27 22:56:12,133 - ModelManager - INFO - ✅ 成功导入BaseModel 2025-08-27 22:56:13,287 - ModelManager - INFO - ✅ 成功导入ModelLoader 2025-08-27 22:56:13,289 - CognitiveArchitecture - INFO - ✅ 成功从core.base_module导入CognitiveModule基类 2025-08-27 22:56:13,292 - CognitiveArchitecture - WARNING - ⚠️ 相对路径导入失败: No module named 'agent.cognitive_modules' 2025-08-27 22:56:13,292 - CognitiveArchitecture - ERROR - ❌ 绝对路径导入失败: No module named 'agent.cognitive_modules' 2025-08-27 22:56:13,292 - CognitiveArchitecture - WARNING - ⚠️ 使用占位符自我认知模块 2025-08-27 22:56:13,297 - Main - INFO - ================================================== 2025-08-27 22:56:13,297 - Main - INFO - 🚀 启动AI系统 2025-08-27 22:56:13,297 - Main - INFO - ================================================== 系统配置摘要: +--------------------------+-----------------------+ | 配置路径 | 值 | +--------------------------+-----------------------+ | AGENT_NAME | 小蓝 | | DIRECTORIES.PROJECT_ROOT | E:\AI_System | | LOG_DIR | E:/AI_System/logs | | AGENT_DIR | 未设置 | | WEB_UI_DIR | 未设置 | | NETWORK.HOST | 0.0.0.0 | | NETWORK.FLASK_PORT | 8000 | | MODEL_PATHS.TEXT_BASE | E:/AI_Models/Qwen2-7B | | ENVIRONMENT.USE_GPU | True | | ENVIRONMENT.LOG_LEVEL | DEBUG | +--------------------------+-----------------------+ 2025-08-27 22:56:13,353 - Main - INFO - ✅ 启动前检查通过 2025-08-27 22:56:13,353 - Main - INFO - 添加子目录到路径: core 2025-08-27 22:56:13,353 - Main - INFO - 添加子目录到路径: utils 2025-08-27 22:56:13,353 - Main - INFO - 添加子目录到路径: config 2025-08-27 22:56:13,353 - Main - INFO - 添加子目录到路径: cognitive_arch 2025-08-27 22:56:13,353 - Main - INFO - 添加子目录到路径: environment 2025-08-27 22:56:13,353 - Main - INFO - 📁 项目根目录: E:\AI_System 2025-08-27 22:56:13,354 - CoreConfig - WARNING - ⚠️ 模型路径不存在: STABLE_DIFFUSION = E:/AI_Models/stable-diffusion-xl-base-1.0 2025-08-27 22:56:13,354 - Main - INFO - 模型验证结果: 5/6 个模型有效 2025-08-27 22:56:13,354 - Main - INFO - TEXT_BASE ✅ 有效 (E:\AI_Models\Qwen2-7B) 2025-08-27 22:56:13,354 - Main - INFO - TEXT_CHAT ✅ 有效 (E:\AI_Models\deepseek-7b-chat) 2025-08-27 22:56:13,354 - Main - INFO - MULTIMODAL ✅ 有效 (E:\AI_Models\deepseek-vl2) 2025-08-27 22:56:13,354 - Main - INFO - IMAGE_GEN ✅ 有效 (E:\AI_Models\sdxl) 2025-08-27 22:56:13,354 - Main - INFO - YI_VL ✅ 有效 (E:\AI_Models\yi-vl) 2025-08-27 22:56:13,354 - Main - INFO - STABLE_DIFFUSION ❌ 无效 (E:\AI_Models\stable-diffusion-xl-base-1.0) 2025-08-27 22:56:13,354 - ModelManager - INFO - 创建简化缓存系统: E:/AI_System/model_cache 2025-08-27 22:56:13,354 - ModelManager - INFO -模型缓存初始化完成 | 路径: E:/AI_System/model_cache 2025-08-27 22:56:13,354 - ModelManager - INFO - ✅ 成功导入ModelLoader类 2025-08-27 22:56:13,354 - ModelManager - INFO - 📦 初始化模型管理器 | 设备: cuda | 模型目录: models | 缓存目录: E:/AI_System/model_cache | 默认模型: E:\AI_Models\Qwen2-7B 2025-08-27 22:56:13,354 - ModelManager - INFO - 🔄 正在加载核心语言模型: E:\AI_Models\Qwen2-7B 2025-08-27 22:56:13,354 - ModelManager - ERROR - ❌ 使用ModelLoader加载认知模型失败: 'str' object has no attribute 'get' 2025-08-27 22:56:13,354 - ModelManager - ERROR - ❌ 加载模型失败: join() argument must be str, bytes, or os.PathLike object, not 'int' 2025-08-27 22:56:13,354 - Main - INFO -模型管理器初始化完成 | 设备: cuda | 默认模型: E:\AI_Models\Qwen2-7B 2025-08-27 22:56:13,355 - Main - WARNING - ⚠️ 硬件监控模块缺失,跳过启动 2025-08-27 22:56:13,355 - Main - WARNING - ⚠️ 生活调度模块缺失,跳过启动 2025-08-27 22:56:13,356 - Main - INFO - ✅ 环境管理器已启动 WARNING:root:快捷方式目标不存在: E:\AI_Workspace\03_前端交互\前端代码.lnk -> E:\AI_System\agent\web_ui WARNING:root:快捷方式目标不存在: E:\AI_Workspace\03_前端交互\配置文件.lnk -> E:\AI_System\agent\config 2025-08-27 22:56:13,377 - WebServer - INFO - ============================================================ INFO:WebServer:============================================================ 2025-08-27 22:56:13,377 - WebServer - INFO - 模型存储路径: E:\AI_Models INFO:WebServer:模型存储路径: E:\AI_Models 2025-08-27 22:56:13,377 - WebServer - INFO - 智能体系统路径: E:\AI_System\agent INFO:WebServer:智能体系统路径: E:\AI_System\agent 2025-08-27 22:56:13,377 - WebServer - INFO - Web UI路径: E:\AI_System\agent INFO:WebServer:Web UI路径: E:\AI_System\agent 2025-08-27 22:56:13,377 - WebServer - INFO - 配置路径: E:\AI_System\agent INFO:WebServer:配置路径: E:\AI_System\agent 2025-08-27 22:56:13,377 - WebServer - INFO -模型路径: E:\AI_Models\Qwen2-7B INFO:WebServer:主模型路径: E:\AI_Models\Qwen2-7B 2025-08-27 22:56:13,377 - WebServer - INFO - 备用模型路径: E:\AI_Models\deepseek-7b-chat INFO:WebServer:备用模型路径: E:\AI_Models\deepseek-7b-chat 2025-08-27 22:56:13,377 - WebServer - INFO - ============================================================ INFO:WebServer:============================================================ 2025-08-27 22:56:13,377 - WebServer - INFO - 强制启用离线模式 INFO:WebServer:强制启用离线模式 2025-08-27 22:56:13,379 - Main - INFO - 🌐 启动Web服务器: http://0.0.0.0:8000 INFO:Main:🌐 启动Web服务器: http://0.0.0.0:8000 2025-08-27 22:56:13,379 - WebServer - INFO - ============================================================ INFO:WebServer:============================================================ 2025-08-27 22:56:13,379 - WebServer - INFO - 🚀 启动Web服务器 (星型架构) INFO:WebServer:🚀 启动Web服务器 (星型架构) 2025-08-27 22:56:13,379 - WebServer - INFO - ============================================================ INFO:WebServer:============================================================ 2025-08-27 22:56:13,888 - PlasticCore - INFO - 可塑核心初始化完成 INFO:PlasticCore:可塑核心初始化完成 2025-08-27 22:56:13,888 - WebServer - INFO - ✅ 核心接口已初始化 INFO:WebServer:✅ 核心接口已初始化 2025-08-27 22:56:13,888 - PlasticCore - WARNING - 核心系统已在运行中 WARNING:PlasticCore:核心系统已在运行中 2025-08-27 22:56:13,889 - WebServer - INFO - ✅ 核心系统已启动 INFO:WebServer:✅ 核心系统已启动 2025-08-27 22:56:13,890 - WebServer - INFO - 🔄 健康监控线程已启动 INFO:WebServer:🔄 健康监控线程已启动 2025-08-27 22:56:13,890 - WebServer - INFO - 📊 系统监控已启动 INFO:WebServer:📊 系统监控已启动 2025-08-27 22:56:13,890 - WebServer - INFO - 🌐 Web服务器运行在 0.0.0.0:8000 INFO:WebServer:🌐 Web服务器运行在 0.0.0.0:8000 * Serving Flask app 'web_ui.server' * Debug mode: off INFO:werkzeug:WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead. * Running on all addresses (0.0.0.0) * Running on http://127.0.0.1:8000 * Running on http://192.168.10.140:8000 INFO:werkzeug:Press CTRL+C to quit 2025-08-27 22:56:16,939 - WebServer - INFO - 正在关闭系统... INFO:WebServer:正在关闭系统... 2025-08-27 22:56:18,918 - PlasticCore - INFO - 开始关闭核心系统... INFO:PlasticCore:开始关闭核心系统... 2025-08-27 22:56:18,918 - PlasticCore - INFO - 核心系统已关闭 INFO:PlasticCore:核心系统已关闭 2025-08-27 22:56:18,919 - WebServer - INFO - 系统已安全关闭 INFO:WebServer:系统已安全关闭 (venv) PS E:\AI_System> python diagnose_modules.py ============================================================ 模块文件诊断报告 ============================================================ 🔍 检查 CognitiveSystem 模块: 预期路径: E:\AI_System\agent\cognitive_architecture.py ✅ 文件存在 ⚠️ 文件中包含相对导入,可能导致导入错误 ✅ 找到类定义: class CognitiveSystem ✅ 类继承CognitiveModule ✅ 找到__init__方法 📋 初始化方法: def __init__(self, name): 🔍 检查 EnvironmentInterface 模块: 预期路径: E:\AI_System\agent\environment_interface.py ✅ 文件存在 ✅ 找到类定义: class EnvironmentInterface ✅ 类继承CognitiveModule ✅ 找到__init__方法 📋 初始化方法: def __init__(self, coordinator=None, config=None): 🔍 检查 AffectiveSystem 模块: 预期路径: E:\AI_System\agent\affective_system.py ✅ 文件存在 ✅ 找到类定义: class AffectiveSystem ✅ 类继承CognitiveModule ✅ 找到__init__方法 📋 初始化方法: def __init__(self, coordinator=None, config=None): ============================================================ 建议解决方案: ============================================================ 1. 检查每个模块文件中的相对导入语句 2. 确保每个模块类都正确继承CognitiveModule 3. 检查初始化方法的参数是否正确 4. 确保模块内部的导入使用绝对路径或正确处理相对导入 5. 考虑使用try-catch包装模块内部的导入语句 (venv) PS E:\AI_System> python test_core_import.py E:\Python310\python.exe: can't open file 'E:\\AI_System\\test_core_import.py': [Errno 2] No such file or directory (venv) PS E:\AI_System> python diagnose_architecture.py 2025-08-27 22:56:29,135 - CoreConfig - INFO - 📂 从 E:\AI_System\config\default.json 加载配置: { "LOG_DIR": "E:/AI_System/logs", "CONFIG_DIR": "E:/AI_System/config", "MODEL_CACHE_DIR": "E:/AI_System/model_cache", "AGENT_NAME": "\u5c0f\u84dd", "DEFAULT_USER": "\u7ba1\u7406\u5458", "MAX_WORKERS": 4, "AGENT_RESPONSE_TIMEOUT": 30.0, "MODEL_BASE_PATH": "E:/AI_Models", "MODEL_PATHS": { "TEXT_BASE": "E:/AI_Models/Qwen2-7B", "TEXT_CHAT": "E:/AI_Models/deepseek-7b-chat", "MULTIMODAL": "E:/AI_Models/deepseek-vl2", "IMAGE_GEN": "E:/AI_Models/sdxl", "YI_VL": "E:/AI_Models/yi-vl", "STABLE_DIFFUSION": "E:/AI_Models/stable-diffusion-xl-base-1.0" }, "NETWORK": { "HOST": "0.0.0.0", "FLASK_PORT": 8000, "GRADIO_PORT": 7860 }, "DATABASE": { "DB_HOST": "localhost", "DB_PORT": 5432, "DB_NAME": "ai_system", "DB_USER": "ai_user", "DB_PASSWORD": "secure_password_here" }, "SECURITY": { "SECRET_KEY": "generated-secret-key-here" }, "ENVIRONMENT": { "ENV": "dev", "LOG_LEVEL": "DEBUG", "USE_GPU": true }, "DIRECTORIES": { "DEFAULT_MODEL": "E:/AI_Models/Qwen2-7B", "WEB_UI_DIR": "E:/AI_System/web_ui", "AGENT_DIR": "E:/AI_System/agent", "PROJECT_ROOT": "E:/AI_System" } } 2025-08-27 22:56:29,136 - CoreConfig - INFO - 📂 从 E:\AI_System\config\local.json 加载配置: {} 2025-08-27 22:56:29,137 - CoreConfig - INFO - 🌐 从 E:\AI_System\.env 加载环境变量 2025-08-27 22:56:29,137 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_ROOT=E:\AI_System 2025-08-27 22:56:29,137 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_DIRECTORIES__PROJECT_ROOT=E:\AI_System 2025-08-27 22:56:29,137 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_DIRECTORIES__AGENT_DIR=E:\AI_System\agent 2025-08-27 22:56:29,137 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_DIRECTORIES__WEB_UI_DIR=E:\AI_System\web_ui 2025-08-27 22:56:29,137 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_DIRECTORIES__DEFAULT_MODEL=E:\AI_Models\Qwen2-7B 2025-08-27 22:56:29,137 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_ENVIRONMENT__LOG_LEVEL=DEBUG 2025-08-27 22:56:29,137 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_DATABASE__DB_HOST=localhost 2025-08-27 22:56:29,137 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_DATABASE__DB_PORT=5432 2025-08-27 22:56:29,137 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_DATABASE__DB_NAME=ai_system 2025-08-27 22:56:29,137 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_DATABASE__DB_USER=ai_user 2025-08-27 22:56:29,137 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_DATABASE__DB_PASSWORD=****** 2025-08-27 22:56:29,137 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_SECURITY__SECRET_KEY=****** 2025-08-27 22:56:29,137 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_MODEL_PATHS__TEXT_BASE=E:\AI_Models\Qwen2-7B 2025-08-27 22:56:29,137 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_MODEL_PATHS__TEXT_CHAT=E:\AI_Models\deepseek-7b-chat 2025-08-27 22:56:29,137 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_MODEL_PATHS__MULTIMODAL=E:\AI_Models\deepseek-vl2 2025-08-27 22:56:29,137 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_MODEL_PATHS__IMAGE_GEN=E:\AI_Models\sdxl 2025-08-27 22:56:29,137 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_MODEL_PATHS__YI_VL=E:\AI_Models\yi-vl 2025-08-27 22:56:29,137 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_MODEL_PATHS__STABLE_DIFFUSION=E:\AI_Models\stable-diffusion-xl-base-1.0 2025-08-27 22:56:29,137 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_NETWORK__HOST=0.0.0.0 2025-08-27 22:56:29,137 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_NETWORK__FLASK_PORT=8000 2025-08-27 22:56:29,137 - CoreConfig - INFO - 🔄 环境变量覆盖: AI_SYSTEM_NETWORK__GRADIO_PORT=7860 2025-08-27 22:56:29,138 - CoreConfig - WARNING - ⚠️ 模型路径不存在: STABLE_DIFFUSION = E:/AI_Models/stable-diffusion-xl-base-1.0 2025-08-27 22:56:29,138 - CoreConfig - INFO - ✅ 配置系统初始化完成 2025-08-27 22:56:29,138 - ModelManager - ERROR - ❌ 关键依赖缺失: No module named 'diskcache' 2025-08-27 22:56:29,138 - ModelManager - WARNING - ⚠️ 使用简化缓存系统 2025-08-27 22:56:29,138 - ModelManager - INFO - ✅ 备用下载系统初始化完成 2025-08-27 22:56:29,138 - ModelManager - INFO - ✅ 成功导入BaseModel 2025-08-27 22:56:30,266 - ModelManager - INFO - ✅ 成功导入ModelLoader 2025-08-27 22:56:30,268 - CognitiveArchitecture - INFO - ✅ 成功从core.base_module导入CognitiveModule基类 2025-08-27 22:56:30,268 - CognitiveArchitecture - WARNING - ⚠️ 相对路径导入失败: No module named 'agent.cognitive_modules' 2025-08-27 22:56:30,268 - CognitiveArchitecture - ERROR - ❌ 绝对路径导入失败: No module named 'agent.cognitive_modules' 2025-08-27 22:56:30,268 - CognitiveArchitecture - WARNING - ⚠️ 使用占位符自我认知模块 ============================================================ AI系统架构诊断报告 ============================================================ 2025-08-27 22:56:30,277 - CognitiveArchitecture - INFO - ✅ 成功从core.base_module导入CognitiveModule基类 2025-08-27 22:56:30,277 - CognitiveArchitecture - INFO - ✅ 成功从core.base_module导入CognitiveModule基类 2025-08-27 22:56:30,277 - CognitiveArchitecture - WARNING - ⚠️ 相对路径导入失败: attempted relative import with no known parent package 2025-08-27 22:56:30,277 - CognitiveArchitecture - WARNING - ⚠️ 相对路径导入失败: attempted relative import with no known parent package 2025-08-27 22:56:30,277 - CognitiveArchitecture - ERROR - ❌ 绝对路径导入失败: No module named 'agent.cognitive_modules' 2025-08-27 22:56:30,277 - CognitiveArchitecture - ERROR - ❌ 绝对路径导入失败: No module named 'agent.cognitive_modules' 2025-08-27 22:56:30,277 - CognitiveArchitecture - WARNING - ⚠️ 使用占位符自我认知模块 2025-08-27 22:56:30,277 - CognitiveArchitecture - WARNING - ⚠️ 使用占位符自我认知模块 1. 模块文件检查: ---------------------------------------- ✅ CognitiveSystem: E:\AI_System\agent\cognitive_architecture.py ✅ EnvironmentInterface: E:\AI_System\agent\environment_interface.py ✅ AffectiveSystem: E:\AI_System\agent\affective_system.py 2. Agent目录结构 (E:\AI_System\agent): ---------------------------------------- 📄 action_executor.py 📁 affective_modules/ 📄 affective_system.py 📄 agent_core.log 📄 agent_core.py 📄 autonomous_agent.py 📄 auto_backup.bat 📄 cognitive_architecture.py 📁 cognitive_system/ 📄 communication_system.py 📄 conscious_framework.py 📁 conscious_system/ 📁 decision_system/ 📄 enhanced_cognitive.py 📄 environment.py 📄 environment_interface.py 📄 env_loader.py 📁 generated_images/ 📄 health_system.py 📄 knowledge graph.db 📁 knowledge_system/ 📄 main.py 📄 maintain_workspace.py 📄 memory_manager.py 📁 memory_system/ 📄 meta_cognition.py 📄 minimal_model.py 📁 models/ 📄 model_learning.py 📄 model_manager.py 📄 notepad 📄 performance_monitor.py 📄 pip 📄 security_manager.py 📄 self_growth.bat 📄 shortcut_resolver.py 📄 system_maintain.bat 📁 tests/ 📄 test_my_models.py 📁 text_results/ 📄 unified_learning.py 📁 utils/ 📄 world_view.py 📄 __init__.py 📁 __pycache__/ 3. 建议下一步: ---------------------------------------- 📍 所有模块文件都存在,需要检查模块实现内容 诊断完成 (venv) PS E:\AI_System>
08-28
PowerShell 7 环境已加载 (版本: 7.5.2) PS C:\Users\Administrator\Desktop> cd E:\AI_System PS E:\AI_System> python -m venv venv PS E:\AI_System> source venv/bin/activate # Linux/Mac source: The term 'source' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. PS E:\AI_System> venv\Scripts\activate # Windows (venv) PS E:\AI_System> pip install -r requirements.txt Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Requirement already satisfied: accelerate==0.27.2 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 1)) (0.27.2) Requirement already satisfied: aiofiles==23.2.1 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 2)) (23.2.1) Requirement already satisfied: aiohttp==3.9.3 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 3)) (3.9.3) Requirement already satisfied: aiosignal==1.4.0 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 4)) (1.4.0) Requirement already satisfied: altair==5.5.0 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 5)) (5.5.0) Requirement already satisfied: annotated-types==0.7.0 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 6)) (0.7.0) Requirement already satisfied: ansicon==1.89.0 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 7)) (1.89.0) Requirement already satisfied: anyio==4.10.0 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 8)) (4.10.0) Requirement already satisfied: async-timeout==4.0.3 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 9)) (4.0.3) Requirement already satisfied: attrs==25.3.0 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 10)) (25.3.0) Requirement already satisfied: bidict==0.23.1 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 11)) (0.23.1) Requirement already satisfied: blessed==1.21.0 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 12)) (1.21.0) Requirement already satisfied: blinker==1.9.0 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 13)) (1.9.0) Requirement already satisfied: certifi==2025.8.3 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 14)) (2025.8.3) Requirement already satisfied: cffi==1.17.1 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 15)) (1.17.1) Requirement already satisfied: charset-normalizer==3.4.3 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 16)) (3.4.3) Requirement already satisfied: click==8.2.1 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 17)) (8.2.1) Requirement already satisfied: colorama==0.4.6 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 18)) (0.4.6) Requirement already satisfied: coloredlogs==15.0.1 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 19)) (15.0.1) Requirement already satisfied: contourpy==1.3.2 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 20)) (1.3.2) Requirement already satisfied: cryptography==42.0.4 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 21)) (42.0.4) Requirement already satisfied: cycler==0.12.1 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 22)) (0.12.1) Requirement already satisfied: diffusers==0.26.3 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 23)) (0.26.3) Requirement already satisfied: distro==1.9.0 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 24)) (1.9.0) Requirement already satisfied: exceptiongroup==1.3.0 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 25)) (1.3.0) Requirement already satisfied: fastapi==0.116.1 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 26)) (0.116.1) Requirement already satisfied: ffmpy==0.6.1 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 27)) (0.6.1) Requirement already satisfied: filelock==3.19.1 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 28)) (3.19.1) Requirement already satisfied: Flask==3.0.2 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 29)) (3.0.2) Requirement already satisfied: Flask-SocketIO==5.3.6 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 30)) (5.3.6) Requirement already satisfied: flatbuffers==25.2.10 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 31)) (25.2.10) Requirement already satisfied: fonttools==4.59.1 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 32)) (4.59.1) Requirement already satisfied: frozenlist==1.7.0 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 33)) (1.7.0) Requirement already satisfied: fsspec==2025.7.0 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 34)) (2025.7.0) Requirement already satisfied: gpustat==1.1 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 35)) (1.1) Requirement already satisfied: gradio==4.19.2 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 36)) (4.19.2) Requirement already satisfied: gradio_client==0.10.1 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 37)) (0.10.1) Requirement already satisfied: h11==0.16.0 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 38)) (0.16.0) Requirement already satisfied: httpcore==1.0.9 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 39)) (1.0.9) Requirement already satisfied: httpx==0.28.1 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 40)) (0.28.1) Requirement already satisfied: huggingface-hub==0.21.3 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 41)) (0.21.3) Requirement already satisfied: humanfriendly==10.0 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 42)) (10.0) Requirement already satisfied: idna==3.10 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 43)) (3.10) Requirement already satisfied: importlib_metadata==8.7.0 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 44)) (8.7.0) Requirement already satisfied: importlib_resources==6.5.2 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 45)) (6.5.2) Requirement already satisfied: itsdangerous==2.2.0 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 46)) (2.2.0) Requirement already satisfied: Jinja2==3.1.6 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 47)) (3.1.6) Requirement already satisfied: jinxed==1.3.0 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 48)) (1.3.0) Requirement already satisfied: jsonschema==4.25.1 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 49)) (4.25.1) Requirement already satisfied: jsonschema-specifications==2025.4.1 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 50)) (2025.4.1) Requirement already satisfied: kiwisolver==1.4.9 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 51)) (1.4.9) Requirement already satisfied: loguru==0.7.2 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 52)) (0.7.2) Requirement already satisfied: markdown-it-py==4.0.0 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 53)) (4.0.0) Requirement already satisfied: MarkupSafe==2.1.5 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 54)) (2.1.5) Requirement already satisfied: matplotlib==3.10.5 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 55)) (3.10.5) Requirement already satisfied: mdurl==0.1.2 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 56)) (0.1.2) Requirement already satisfied: mpmath==1.3.0 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 57)) (1.3.0) Requirement already satisfied: multidict==6.6.4 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 58)) (6.6.4) Requirement already satisfied: narwhals==2.1.2 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 59)) (2.1.2) Requirement already satisfied: networkx==3.4.2 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 60)) (3.4.2) Requirement already satisfied: numpy==1.26.3 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 61)) (1.26.3) Requirement already satisfied: nvidia-ml-py==13.580.65 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 62)) (13.580.65) Requirement already satisfied: onnxruntime==1.17.1 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 63)) (1.17.1) Requirement already satisfied: openai==1.13.3 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 64)) (1.13.3) Requirement already satisfied: orjson==3.11.2 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 65)) (3.11.2) Requirement already satisfied: packaging==25.0 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 66)) (25.0) Requirement already satisfied: pandas==2.1.4 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 67)) (2.1.4) Requirement already satisfied: pillow==10.4.0 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 68)) (10.4.0) Requirement already satisfied: prettytable==3.16.0 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 69)) (3.16.0) Requirement already satisfied: propcache==0.3.2 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 70)) (0.3.2) Requirement already satisfied: protobuf==6.32.0 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 71)) (6.32.0) Requirement already satisfied: psutil==5.9.7 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 72)) (5.9.7) Requirement already satisfied: pycparser==2.22 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 73)) (2.22) Requirement already satisfied: pydantic==2.11.7 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 74)) (2.11.7) Requirement already satisfied: pydantic_core==2.33.2 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 75)) (2.33.2) Requirement already satisfied: pydub==0.25.1 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 76)) (0.25.1) Requirement already satisfied: Pygments==2.19.2 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 77)) (2.19.2) Requirement already satisfied: pyparsing==3.2.3 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 78)) (3.2.3) Requirement already satisfied: pyreadline3==3.5.4 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 79)) (3.5.4) Requirement already satisfied: python-dateutil==2.9.0.post0 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 80)) (2.9.0.post0) Requirement already satisfied: python-dotenv==1.0.1 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 81)) (1.0.1) Requirement already satisfied: python-engineio==4.12.2 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 82)) (4.12.2) Requirement already satisfied: python-multipart==0.0.20 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 83)) (0.0.20) Requirement already satisfied: python-socketio==5.13.0 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 84)) (5.13.0) Requirement already satisfied: pytz==2025.2 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 85)) (2025.2) Requirement already satisfied: pywin32==306 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 86)) (306) Requirement already satisfied: PyYAML==6.0.2 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 87)) (6.0.2) Requirement already satisfied: redis==5.0.3 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 88)) (5.0.3) Requirement already satisfied: referencing==0.36.2 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 89)) (0.36.2) Requirement already satisfied: regex==2025.7.34 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 90)) (2025.7.34) Requirement already satisfied: requests==2.31.0 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 91)) (2.31.0) Requirement already satisfied: rich==14.1.0 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 92)) (14.1.0) Requirement already satisfied: rpds-py==0.27.0 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 93)) (0.27.0) Requirement already satisfied: ruff==0.12.10 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 94)) (0.12.10) Requirement already satisfied: safetensors==0.4.2 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 95)) (0.4.2) Requirement already satisfied: semantic-version==2.10.0 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 96)) (2.10.0) Requirement already satisfied: shellingham==1.5.4 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 97)) (1.5.4) Requirement already satisfied: simple-websocket==1.1.0 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 98)) (1.1.0) Requirement already satisfied: six==1.17.0 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 99)) (1.17.0) Requirement already satisfied: sniffio==1.3.1 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 100)) (1.3.1) Requirement already satisfied: starlette==0.47.2 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 101)) (0.47.2) Requirement already satisfied: sympy==1.14.0 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 102)) (1.14.0) Requirement already satisfied: tokenizers==0.15.2 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 103)) (0.15.2) Requirement already satisfied: tomlkit==0.12.0 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 104)) (0.12.0) Requirement already satisfied: torch==2.1.2 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 105)) (2.1.2) Requirement already satisfied: tqdm==4.67.1 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 106)) (4.67.1) Requirement already satisfied: transformers==4.37.0 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 107)) (4.37.0) Requirement already satisfied: typer==0.16.1 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 108)) (0.16.1) Requirement already satisfied: typing-inspection==0.4.1 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 109)) (0.4.1) Requirement already satisfied: typing_extensions==4.14.1 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 110)) (4.14.1) Requirement already satisfied: tzdata==2025.2 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 111)) (2025.2) Requirement already satisfied: urllib3==2.5.0 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 112)) (2.5.0) Requirement already satisfied: uvicorn==0.35.0 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 113)) (0.35.0) Requirement already satisfied: waitress==2.1.2 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 114)) (2.1.2) Requirement already satisfied: wcwidth==0.2.13 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 115)) (0.2.13) Requirement already satisfied: websockets==11.0.3 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 116)) (11.0.3) Requirement already satisfied: Werkzeug==3.1.3 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 117)) (3.1.3) Requirement already satisfied: win32_setctime==1.2.0 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 118)) (1.2.0) Requirement already satisfied: wsproto==1.2.0 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 119)) (1.2.0) Requirement already satisfied: yarl==1.20.1 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 120)) (1.20.1) Requirement already satisfied: zipp==3.23.0 in e:\ai_system\venv\lib\site-packages (from -r requirements.txt (line 121)) (3.23.0) WARNING: typer 0.16.1 does not provide the extra 'all' [notice] A new release of pip available: 22.3.1 -> 25.2 [notice] To update, run: python.exe -m pip install --upgrade pip (venv) PS E:\AI_System> python diagnose_modules.py ============================================================ 模块文件诊断报告 ============================================================ 🔍 检查 CognitiveSystem 模块: 预期路径: E:\AI_System\agent\cognitive_architecture.py ✅ 文件存在 ✅ 找到类定义: class CognitiveSystem ✅ 类继承CognitiveModule ✅ 找到__init__方法 📋 初始化方法: def __init__(self, name: str, model_manager, config: dict = None): 🔍 检查 EnvironmentInterface 模块: 预期路径: E:\AI_System\agent\environment_interface.py ✅ 文件存在 ✅ 找到类定义: class EnvironmentInterface ✅ 类继承CognitiveModule ✅ 找到__init__方法 📋 初始化方法: def __init__( 🔍 检查 AffectiveSystem 模块: 预期路径: E:\AI_System\agent\affective_system.py ✅ 文件存在 ✅ 找到类定义: class AffectiveSystem ✅ 类继承CognitiveModule ✅ 找到__init__方法 📋 初始化方法: def __init__(self, coordinator=None, config=None): ============================================================ 建议解决方案: ============================================================ 1. 检查每个模块文件中的相对导入语句 2. 确保每个模块类都正确继承CognitiveModule 3. 检查初始化方法的参数是否正确 4. 确保模块内部的导入使用绝对路径或正确处理相对导入 5. 考虑使用try-catch包装模块内部的导入语句 (venv) PS E:\AI_System> python test_core_import.py E:\Python310\python.exe: can't open file 'E:\\AI_System\\test_core_import.py': [Errno 2] No such file or directory (venv) PS E:\AI_System> python diagnose_architecture.py ❌ 导入Agent模块失败: No module named 'agent.model_manager' ============================================================ AI系统架构诊断报告 ============================================================ ERROR:root:无法导入 CognitiveModule 基类,使用占位实现 1. 模块文件检查: ---------------------------------------- ✅ CognitiveSystem: E:\AI_System\agent\cognitive_architecture.py ✅ EnvironmentInterface: E:\AI_System\agent\environment_interface.py ✅ AffectiveSystem: E:\AI_System\agent\affective_system.py 2. Agent目录结构 (E:\AI_System\agent): ---------------------------------------- 📄 action_executor.py 📁 affective_modules/ 📄 affective_system.py 📄 agent_core.log 📄 agent_core.py 📄 autonomous_agent.py 📄 auto_backup.bat 📄 base_module.py 📄 cognitive_architecture.py 📁 cognitive_system/ 📄 communication_system.py 📁 concrete_modules/ 📄 conscious_framework.py 📁 conscious_system/ 📁 decision_system/ 📄 diagnostic_system.py 📄 enhanced_cognitive.py 📄 environment.py 📄 environment_interface.py 📄 env_loader.py 📁 generated_images/ 📄 health_monitor.py 📄 health_system.py 📄 knowledge graph.db 📁 knowledge_system/ 📄 main.py 📄 maintain_workspace.py 📄 memory_manager.py 📁 memory_system/ 📄 meta_cognition.py 📄 minimal_model.py 📁 models/ 📄 model_learning.py 📄 notepad 📄 performance_monitor.py 📄 pip 📄 security_manager.py 📄 self_growth.bat 📄 shortcut_resolver.py 📄 system_maintain.bat 📁 tests/ 📄 test_my_models.py 📁 text_results/ 📄 unified_learning.py 📁 utils/ 📄 world_view.py 📄 __init__.py 📁 __pycache__/ 3. 建议下一步: ---------------------------------------- 📍 所有模块文件都存在,需要检查模块实现内容 诊断完成 (venv) PS E:\AI_System> python main.py ❌ 导入Agent模块失败: No module named 'agent.model_manager' 2025-08-30 14:28:25,977 - CoreConfig - INFO - 🌐 从 E:\AI_System\.env 加载环境变量 2025-08-30 14:28:25,977 - CoreConfig - INFO - 📄 加载配置文件: E:\AI_System\config\config.json 2025-08-30 14:28:25,977 - CoreConfig - INFO - ✅ 配置系统初始化完成 Traceback (most recent call last): File "E:\AI_System\main.py", line 11, in <module> from agent.model_manager import ModelManager ModuleNotFoundError: No module named 'agent.model_manager' (venv) PS E:\AI_System>
08-31
学生社团系统-学生社团“一站式”运营管理平台-学生社团管理系统-基于SSM的学生社团管理系统-springboot学生社团管理系统.zip-Java学生社团管理系统开发实战-源码 更多学生社团系统: SpringBoot+Vue学生社团“一站式”运营管理平台源码(活动管理+成员考核+经费审批) Java学生社团管理系统开发实战:SSM升级SpringBoot(招新报名+场地预约+数据看板) 基于SpringSecurity的社团管理APP(移动端签到+权限分级+消息推送) 企业级社团数字化平台解决方案(SpringBoot+Redis缓存+Elasticsearch活动搜索) 微信小程序社团服务系统开发(活动直播+社团文化墙+成员互动社区) SpringBoot社团核心源码(多角色支持+工作流引擎+API接口开放) AI赋能社团管理:智能匹配兴趣标签+活动热度预测+成员贡献度分析(附代码) 响应式社团管理平台开发(PC/移动端适配+暗黑模式+无障碍访问) 完整学生社团系统源码下载(SpringBoot3+Vue3+MySQL8+Docker部署) 高校垂直领域社团平台:百团大战系统+社团星级评定+跨校活动联盟 适用对象:本代码学习资料适用于计算机、电子信息工程、数学等专业正在做毕设的学生,需要项目实战练习的学习者,也适用于课程设计、期末大作业。 技术栈:前端是vue,后端是springboot,项目代码都经过严格调试,代码没有任何bug! 核心管理:社团注册、成员管理、权限分级 活动运营:活动发布、报名签到、场地预约 资源服务:经费申请、物资管理、文档共享 数据分析:成员活跃度、活动效果评估、社团影响力排名
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值