fix:update bug of ai_task_submit
SchedulingSimulator 是一个任务调度模拟器,用于在不同计算环境中提交和调度任务。
SchedulingSimulator/ ├── SchedulingSimulator/ # 主程序目录 │ ├── main.py # 程序入口 │ └── threads.py # 线程实现(任务提交和状态监控) ├── config/ # 配置管理 │ ├── config.py # 全局配置和状态定义 │ ├── database.py # 数据库配置加载 │ ├── db_manager.py # 数据库操作管理 │ ├── cache_manager.py # 缓存管理 │ └── ... ├── scheduler/ # 调度器 │ ├── scheduler.py # 主调度器 │ ├── resource_scheduler.py # 资源调度策略 │ ├── price_scheduler.py # 价格调度策略 │ └── data_scheduler.py # 数据位置调度策略 ├── task/ # 任务管理 │ ├── task_manager.py # 任务管理器 │ ├── ai_task_submit.py # AI任务提交 │ ├── cloud_task_submit.py # 云任务提交 │ ├── hpc_task_submit.py # HPC任务提交 │ └── ... ├── TaskSubmissionScript/ # 任务提交脚本示例 └── mysql/ # 数据库相关文件 ├── simulator.sql # 数据库初始化脚本 └── simulator_new.sql # 新版数据库初始化脚本
系统使用MySQL数据库存储配置信息和任务状态。
algorithm_mapping
cluster_resources
api_config
cluster_prices
file_mapping
task_templates
在 config/db_manager.py 文件中修改以下参数:
DB_CONFIG = { 'host': 'localhost', 'database': 'scheduling_simulator', 'user': '', 'password': '' }
CREATE DATABASE scheduling_simulator;
mysql -u root -p scheduling_simulator < mysql/simulator.sql
pip install requests mysql-connector-python pyyaml
或者使用requirements.txt(如果存在):
pip install -r requirements.txt
安装依赖:
配置数据库连接参数
初始化数据库(首次使用):
运行主程序:
python SchedulingSimulator/main.py
系统支持三种调度策略:
系统支持三种任务类型:
系统具有良好的扩展性,可以通过以下方式添加新功能:
©Copyright 2023 CCF 开源发展委员会 Powered by Trustie& IntelliDE 京ICP备13000930号
SchedulingSimulator 调度模拟器
SchedulingSimulator 是一个任务调度模拟器,用于在不同计算环境中提交和调度任务。
功能特性
系统架构
技术选型
数据库配置
系统使用MySQL数据库存储配置信息和任务状态。
数据库表结构
algorithm_mapping: 存储算法映射信息cluster_resources: 存储集群资源信息api_config: 存储API配置信息cluster_prices: 存储集群价格信息file_mapping: 存储文件映射信息task_templates: 存储任务模板信息数据库配置参数
在 config/db_manager.py 文件中修改以下参数:
首次使用初始化
依赖安装
或者使用requirements.txt(如果存在):
使用方法
安装依赖:
配置数据库连接参数
初始化数据库(首次使用):
运行主程序:
工作流程
调度策略
系统支持三种调度策略:
任务类型
系统支持三种任务类型:
扩展性
系统具有良好的扩展性,可以通过以下方式添加新功能: