@@ -273,6 +273,20 @@ code_search_results = Search results for '%s' | |||||
code_last_indexed_at = Last indexed %s | code_last_indexed_at = Last indexed %s | ||||
save=Save | save=Save | ||||
cancel=Cancel | cancel=Cancel | ||||
hot_repo=Hot Repositories | |||||
active_repo=Active Repositories | |||||
all_fields = All fields | |||||
large_model = Large model | |||||
ai_development_tools = AI tools | |||||
computer_version = Computer version | |||||
natural_language_processing = NLP | |||||
machine_learning = Machine learning | |||||
neural_networks = Neural networks | |||||
autopilot = Autopilot | |||||
robot = Robot | |||||
federated_learning = Federated learning | |||||
data_mining = Data mining | |||||
RISC-V_development = RISC-V development | |||||
[auth] | [auth] | ||||
create_new_account = Register Account | create_new_account = Register Account | ||||
@@ -848,6 +862,7 @@ model_noright=No right | |||||
model_rename=Duplicate model name, please modify model name. | model_rename=Duplicate model name, please modify model name. | ||||
debug=Debug | debug=Debug | ||||
debug_again=Restart | |||||
stop=Stop | stop=Stop | ||||
delete=Delete | delete=Delete | ||||
more=More | more=More | ||||
@@ -855,7 +870,7 @@ gpu_type_all=All | |||||
model_download=Model Download | model_download=Model Download | ||||
submit_image=Submit Image | submit_image=Submit Image | ||||
download=Download | download=Download | ||||
score=score | |||||
cloudbrain=Cloudbrain | cloudbrain=Cloudbrain | ||||
cloudbrain.new=New cloudbrain | cloudbrain.new=New cloudbrain | ||||
@@ -977,13 +992,28 @@ cloudbrain.benchmark.evaluate_child_type=Child Type | |||||
cloudbrain.benchmark.evaluate_mirror=Mirror | cloudbrain.benchmark.evaluate_mirror=Mirror | ||||
cloudbrain.benchmark.evaluate_train=Train Script | cloudbrain.benchmark.evaluate_train=Train Script | ||||
cloudbrain.benchmark.evaluate_test=Test Script | cloudbrain.benchmark.evaluate_test=Test Script | ||||
cloudbrain.benchmark.types={"type":[{"id":1,"rank_link":"https://git.openi.org.cn/benchmark/?username=admin&algType=detection","first":"Target detection","second":[{"id":1,"value":"None","attachment":"84cf39c4-d8bc-41aa-aaa3-182ce289b105","owner":"yangzhx","repo_name":"detection_benchmark_script"}]},{"id":2,"rank_link":"https://git.openi.org.cn/benchmark/?username=admin&algType=reid","first":"Target re-identification","second":[{"id":1,"value":"Vehicle re-identification","attachment":"84cf39c4-d8bc-41aa-aaa3-182ce289b105","owner":"JiahongXu","repo_name":"benchmark_reID_script"},{"id":2,"value":"Image-based person re-identification","attachment":"84cf39c4-d8bc-41aa-aaa3-182ce289b105","owner":"JiahongXu","repo_name":"benchmark_reID_script"}]},{"id":3,"rank_link":"https://git.openi.org.cn/benchmark/?username=admin&algType=tracking","first":"Multi-target tracking","second":[{"id":1,"value":"None","attachment":"84cf39c4-d8bc-41aa-aaa3-182ce289b105","owner":"lix07","repo_name":"MOT_benchmark_script"}]}]} | |||||
modelarts.infer_job_model = Model | modelarts.infer_job_model = Model | ||||
modelarts.infer_job_model_file = Model File | modelarts.infer_job_model_file = Model File | ||||
modelarts.infer_job = Inference Job | modelarts.infer_job = Inference Job | ||||
modelarts.infer_job.model_version = Model/Version | modelarts.infer_job.model_version = Model/Version | ||||
modelarts.infer_job.select_model = Select Model | modelarts.infer_job.select_model = Select Model | ||||
modelarts.infer_job.boot_file_helper=The startup file is the entry file for your program execution and must end in.py.Such as inference.py, main.py, example/inference. Py, case/main.py. | |||||
modelarts.infer_job.tooltip = The model has been deleted and cannot be viewed. | modelarts.infer_job.tooltip = The model has been deleted and cannot be viewed. | ||||
debug_task_not_created = Debug task has not been created | |||||
train_task_not_created = Train task has not been created | |||||
inference_job_not_created = Inference job has not been created | |||||
model_Evaluation_not_created = Model evaluation has not been created | |||||
repo_not_initialized = Code version: You have not initialized the code repository, please <a href="%s"> initialized </a> first ; | |||||
debug_task_running_limit =Running time: no more than 4 hours, it will automatically stop if it exceeds 4 hours; | |||||
dataset_desc = Dataset: Cloud Brain 1 provides CPU/GPU,Cloud Brain 2 provides Ascend NPU.And dataset also needs to be uploaded to the corresponding environment; | |||||
platform_instructions = Instructions for use: You can refer to the <a href="https://git.openi.org.cn/zeizei/OpenI_Learning">Xiaobai training camp </a> course of Qizhi AI collaboration platform. | |||||
model_not_exist = Model file: You do not have a model file yet, please generate and <a href="%s/modelmanage/show_model">export the model</a> through the <a href="%s/modelarts/train-job">training task</a> first ; | |||||
benchmark_leaderboards = Benchmark leaderboards | |||||
model.manage.import_new_model=Import New Model | model.manage.import_new_model=Import New Model | ||||
model.manage.create_error=Equal Name and Version has existed. | model.manage.create_error=Equal Name and Version has existed. | ||||
model.manage.model_name = Model Name | model.manage.model_name = Model Name | ||||
@@ -2819,4 +2849,24 @@ benchmark_path = Benchmark script path | |||||
snn4imagenet_path = Snn4imagenet script path | snn4imagenet_path = Snn4imagenet script path | ||||
brainscore_path = Brainscore script path | brainscore_path = Brainscore script path | ||||
start_command = Start command | start_command = Start command | ||||
choose_mirror = select mirror | |||||
choose_mirror = select mirror or enter mirror path | |||||
select_dataset = select dataset | |||||
specification = specification | |||||
select_specification = select specification | |||||
description = description | |||||
job_name_rule = Please enter letters, numbers, _ and - up to 64 characters and cannot end with a dash (-). | |||||
dataset_path_rule = The dataset location is stored in the environment variable data_url, and the training output path is stored in the environment variable train_url. | |||||
view_sample = View sample | |||||
inference_output_path_rule = The inference output path is stored in the environment variable result_url. | |||||
model_file_path_rule=The model file location is stored in the environment variable ckpt_url | |||||
delete_task = Delete task | |||||
task_delete_confirm = Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered. | |||||
operate_confirm = confirm | |||||
operate_cancel = cancel | |||||
gpu_num = GPU | |||||
cpu_num = CPU | |||||
memory = Memory | |||||
shared_memory = Shared Memory |
@@ -275,6 +275,20 @@ code_search_results=“%s” 的搜索结果是 | |||||
code_last_indexed_at=最后索引于 %s | code_last_indexed_at=最后索引于 %s | ||||
save=保存 | save=保存 | ||||
cancel=取消 | cancel=取消 | ||||
hot_repo=热门项目 | |||||
active_repo=活跃项目 | |||||
all_fields = 全部领域 | |||||
large_model = 大模型 | |||||
ai_development_tools = AI开发工具 | |||||
computer_version = 计算机视觉 | |||||
natural_language_processing = 自然语言处理 | |||||
machine_learning = 机器学习 | |||||
neural_networks = 神经网络 | |||||
autopilot = 自动驾驶 | |||||
robot = 机器人 | |||||
federated_learning = 联邦学习 | |||||
data_mining = 数据挖掘 | |||||
RISC-V_development = RISC-V开发 | |||||
[auth] | [auth] | ||||
create_new_account=注册帐号 | create_new_account=注册帐号 | ||||
@@ -860,6 +874,7 @@ gpu_type_all=全部 | |||||
model_download=结果下载 | model_download=结果下载 | ||||
submit_image=提交镜像 | submit_image=提交镜像 | ||||
download=模型下载 | download=模型下载 | ||||
score=评分 | |||||
cloudbrain=云脑 | cloudbrain=云脑 | ||||
cloudbrain.new=新建任务 | cloudbrain.new=新建任务 | ||||
@@ -983,7 +998,7 @@ cloudbrain.benchmark.evaluate_child_type=子类型 | |||||
cloudbrain.benchmark.evaluate_mirror=镜像 | cloudbrain.benchmark.evaluate_mirror=镜像 | ||||
cloudbrain.benchmark.evaluate_train=训练程序 | cloudbrain.benchmark.evaluate_train=训练程序 | ||||
cloudbrain.benchmark.evaluate_test=测试程序 | cloudbrain.benchmark.evaluate_test=测试程序 | ||||
cloudbrain.benchmark.types={"type":[{"id":1,"rank_link":"https://git.openi.org.cn/benchmark/?username=admin&algType=detection","first":"目标检测","second":[{"id":1,"value":"无","attachment":"84cf39c4-d8bc-41aa-aaa3-182ce289b105","owner":"yangzhx","repo_name":"detection_benchmark_script"}]},{"id":2,"rank_link":"https://git.openi.org.cn/benchmark/?username=admin&algType=reid","first":"目标重识别","second":[{"id":1,"value":"车辆重识别","attachment":"84cf39c4-d8bc-41aa-aaa3-182ce289b105","owner":"JiahongXu","repo_name":"benchmark_reID_script"},{"id":2,"value":"基于图像的行人重识别","attachment":"84cf39c4-d8bc-41aa-aaa3-182ce289b105","owner":"JiahongXu","repo_name":"benchmark_reID_script"}]},{"id":3,"rank_link":"https://git.openi.org.cn/benchmark/?username=admin&algType=tracking","first":"多目标跟踪","second":[{"id":1,"value":"无","attachment":"84cf39c4-d8bc-41aa-aaa3-182ce289b105","owner":"lix07","repo_name":"MOT_benchmark_script"}]}]} | |||||
modelarts.infer_job_model = 模型名称 | modelarts.infer_job_model = 模型名称 | ||||
modelarts.infer_job_model_file = 模型文件 | modelarts.infer_job_model_file = 模型文件 | ||||
@@ -993,6 +1008,18 @@ modelarts.infer_job.select_model = 选择模型 | |||||
modelarts.infer_job.boot_file_helper=启动文件是您程序执行的入口文件,必须是以.py结尾的文件。比如inference.py、main.py、example/inference.py、case/main.py。 | modelarts.infer_job.boot_file_helper=启动文件是您程序执行的入口文件,必须是以.py结尾的文件。比如inference.py、main.py、example/inference.py、case/main.py。 | ||||
modelarts.infer_job.tooltip = 该模型已删除,无法查看。 | modelarts.infer_job.tooltip = 该模型已删除,无法查看。 | ||||
debug_task_not_created = 未创建过调试任务 | |||||
train_task_not_created = 未创建过训练任务 | |||||
inference_job_not_created = 未创建过推理任务 | |||||
model_Evaluation_not_created = 未创建过评测任务 | |||||
repo_not_initialized = 代码版本:您还没有初始化代码仓库,请先<a href=%s>创建代码版本</a>; | |||||
debug_task_running_limit = 运行时长:最长不超过4个小时,超过4个小时将自动停止; | |||||
dataset_desc = 数据集:云脑1提供 CPU / GPU 资源,云脑2提供 Ascend NPU 资源,调试使用的数据集也需要上传到对应的环境; | |||||
platform_instructions = 使用说明:可以参考启智AI协作平台<a href="https://git.openi.org.cn/zeizei/OpenI_Learning">小白训练营课程</a>。 | |||||
model_not_exist = 模型文件:您还没有模型文件,请先通过<a href="%s/modelarts/train-job">训练任务</a>产生并 <a href="%s/modelmanage/show_model">导出模型</a> ; | |||||
benchmark_leaderboards = 基准测试排行榜 | |||||
model.manage.import_new_model=导入新模型 | model.manage.import_new_model=导入新模型 | ||||
model.manage.create_error=相同的名称和版本的模型已经存在。 | model.manage.create_error=相同的名称和版本的模型已经存在。 | ||||
model.manage.model_name = 模型名称 | model.manage.model_name = 模型名称 | ||||
@@ -2828,3 +2855,24 @@ snn4imagenet_path = snn4imagenet脚本存放路径 | |||||
brainscore_path = brainscore脚本存放路径 | brainscore_path = brainscore脚本存放路径 | ||||
start_command = 启动命令 | start_command = 启动命令 | ||||
choose_mirror = 选择镜像或输入镜像地址 | choose_mirror = 选择镜像或输入镜像地址 | ||||
select_dataset = 选择数据集 | |||||
specification = 规格 | |||||
select_specification = 选择资源规格 | |||||
description = 描述 | |||||
job_name_rule = 请输入字母、数字、_和-,最长64个字符,且不能以中划线(-)结尾。 | |||||
dataset_path_rule = 数据集位置存储在环境变量data_url中,训练输出路径存储在环境变量train_url中。 | |||||
view_sample = 查看样例 | |||||
inference_output_path_rule = 推理输出路径存储在环境变量result_url中。 | |||||
model_file_path_rule = 模型文件位置存储在环境变量ckpt_url中。 | |||||
delete_task = 删除任务 | |||||
task_delete_confirm = 你确认删除该任务么?此任务一旦删除不可恢复。 | |||||
operate_confirm = 确定操作 | |||||
operate_cancel = 取消操作 | |||||
gpu_num = GPU数 | |||||
cpu_num = CPU数 | |||||
memory = 内存 | |||||
shared_memory = 共享内存 | |||||
@@ -292,41 +292,41 @@ func getFileName(ctx *context.Context, beginTime time.Time, endTime time.Time, p | |||||
func allProjectsPeroidHeader(ctx *context.Context) map[string]string { | func allProjectsPeroidHeader(ctx *context.Context) map[string]string { | ||||
return map[string]string{"A1": ctx.Tr("admin.repos.id"), "B1": ctx.Tr("admin.repos.projectName"), "C1": ctx.Tr("repo.owner"), "D1": ctx.Tr("admin.repos.isPrivate"), "E1": ctx.Tr("admin.repos.isFork"), "F1": ctx.Tr("admin.repos.isMirror"), "G1": ctx.Tr("admin.repos.openi"), "H1": ctx.Tr("admin.repos.visit"), "I1": ctx.Tr("admin.repos.download"), "J1": ctx.Tr("admin.repos.pr"), "K1": ctx.Tr("admin.repos.commit"), | |||||
"L1": ctx.Tr("admin.repos.watches"), "M1": ctx.Tr("admin.repos.stars"), "N1": ctx.Tr("admin.repos.forks"), "O1": ctx.Tr("admin.repos.issues"), "P1": ctx.Tr("admin.repos.closedIssues"), "Q1": ctx.Tr("admin.repos.contributor"), "R1": ctx.Tr("admin.repos.create")} | |||||
return map[string]string{"A1": ctx.Tr("admin.repos.id"), "B1": ctx.Tr("admin.repos.projectName"), "C1": ctx.Tr("repo.owner"), "D1": ctx.Tr("admin.repos.isPrivate"), "E1": ctx.Tr("admin.repos.openi"), "F1": ctx.Tr("admin.repos.visit"), "G1": ctx.Tr("admin.repos.download"), "H1": ctx.Tr("admin.repos.pr"), "I1": ctx.Tr("admin.repos.commit"), | |||||
"J1": ctx.Tr("admin.repos.watches"), "K1": ctx.Tr("admin.repos.stars"), "L1": ctx.Tr("admin.repos.forks"), "M1": ctx.Tr("admin.repos.issues"), "N1": ctx.Tr("admin.repos.closedIssues"), "O1": ctx.Tr("admin.repos.contributor"), "P1": ctx.Tr("admin.repos.isFork"), "Q1": ctx.Tr("admin.repos.isMirror"), "R1": ctx.Tr("admin.repos.create")} | |||||
} | } | ||||
func allProjectsPeroidValues(row int, rs *models.RepoStatistic, ctx *context.Context) map[string]string { | func allProjectsPeroidValues(row int, rs *models.RepoStatistic, ctx *context.Context) map[string]string { | ||||
return map[string]string{getCellName("A", row): strconv.FormatInt(rs.RepoID, 10), getCellName("B", row): rs.DisplayName(), getCellName("C", row): rs.OwnerName, getCellName("D", row): getBoolDisplay(rs.IsPrivate, ctx), getCellName("E", row): getBoolDisplay(rs.IsFork, ctx), getCellName("F", row): getBoolDisplay(rs.IsMirror, ctx), getCellName("G", row): strconv.FormatFloat(rs.RadarTotal, 'f', 2, 64), | |||||
getCellName("H", row): strconv.FormatInt(rs.NumVisits, 10), getCellName("I", row): strconv.FormatInt(rs.NumDownloads, 10), getCellName("J", row): strconv.FormatInt(rs.NumPulls, 10), getCellName("K", row): strconv.FormatInt(rs.NumCommits, 10), | |||||
getCellName("L", row): strconv.FormatInt(rs.NumWatches, 10), getCellName("M", row): strconv.FormatInt(rs.NumStars, 10), getCellName("N", row): strconv.FormatInt(rs.NumForks, 10), getCellName("O", row): strconv.FormatInt(rs.NumIssues, 10), | |||||
getCellName("P", row): strconv.FormatInt(rs.NumClosedIssues, 10), getCellName("Q", row): strconv.FormatInt(rs.NumContributor, 10), getCellName("R", row): time.Unix(int64(rs.RepoCreatedUnix), 0).Format(CREATE_TIME_FORMAT), | |||||
return map[string]string{getCellName("A", row): strconv.FormatInt(rs.RepoID, 10), getCellName("B", row): rs.DisplayName(), getCellName("C", row): rs.OwnerName, getCellName("D", row): getBoolDisplay(rs.IsPrivate, ctx), getCellName("E", row): strconv.FormatFloat(rs.RadarTotal, 'f', 2, 64), | |||||
getCellName("F", row): strconv.FormatInt(rs.NumVisits, 10), getCellName("G", row): strconv.FormatInt(rs.NumDownloads, 10), getCellName("H", row): strconv.FormatInt(rs.NumPulls, 10), getCellName("I", row): strconv.FormatInt(rs.NumCommits, 10), | |||||
getCellName("J", row): strconv.FormatInt(rs.NumWatches, 10), getCellName("K", row): strconv.FormatInt(rs.NumStars, 10), getCellName("L", row): strconv.FormatInt(rs.NumForks, 10), getCellName("M", row): strconv.FormatInt(rs.NumIssues, 10), | |||||
getCellName("N", row): strconv.FormatInt(rs.NumClosedIssues, 10), getCellName("O", row): strconv.FormatInt(rs.NumContributor, 10), getCellName("P", row): getBoolDisplay(rs.IsFork, ctx), getCellName("Q", row): getBoolDisplay(rs.IsMirror, ctx), getCellName("R", row): time.Unix(int64(rs.RepoCreatedUnix), 0).Format(CREATE_TIME_FORMAT), | |||||
} | } | ||||
} | } | ||||
func allProjectsOpenIHeader() map[string]string { | func allProjectsOpenIHeader() map[string]string { | ||||
return map[string]string{"A1": "ID", "B1": "项目名称", "C1": "拥有者", "D1": "私有", "E1": "迁移", "F1": "镜像", "G1": "OpenI指数", | |||||
"H1": "影响力", "I1": "成熟度", "J1": "活跃度", "K1": "项目健康度", "L1": "团队健康度", "M1": "项目发展趋势", | |||||
"N1": "关注数", "O1": "点赞数", "P1": "派生数", "Q1": "代码下载量", "R1": "评论数", "S1": "浏览量", "T1": "已解决任务数", "U1": "版本发布数量", "V1": "有效开发年龄", | |||||
"W1": "数据集", "X1": "模型数", "Y1": "百科页面数量", "Z1": "提交数", "AA1": "任务数", "AB1": "PR数", "AC1": "版本发布数量", "AD1": "任务完成比例", "AE1": "贡献者数", "AF1": "关键贡献者数", | |||||
"AG1": "新人增长量", "AH1": "代码规模增长量", "AI1": "任务增长量", "AJ1": "新人增长量", "AK1": "提交增长量", "AL1": "评论增长量", "AM1": "项目创建时间", | |||||
return map[string]string{"A1": "ID", "B1": "项目名称", "C1": "拥有者", "D1": "私有", "E1": "OpenI指数", | |||||
"F1": "影响力", "G1": "成熟度", "H1": "活跃度", "I1": "项目健康度", "J1": "团队健康度", "K1": "项目发展趋势", | |||||
"L1": "关注数", "M1": "点赞数", "N1": "派生数", "O1": "代码下载量", "P1": "评论数", "Q1": "浏览量", "R1": "已解决任务数", "S1": "版本发布数量", "T1": "有效开发年龄", | |||||
"U1": "数据集", "V1": "模型数", "W1": "百科页面数量", "X1": "提交数", "Y1": "任务数", "Z1": "PR数", "AA1": "版本发布数量", "AB1": "任务完成比例", "AC1": "贡献者数", "AD1": "关键贡献者数", | |||||
"AE1": "新人增长量", "AF1": "代码规模增长量", "AG1": "任务增长量", "AH1": "新人增长量", "AI1": "提交增长量", "AJ1": "评论增长量", "AK1": "迁移", "AL1": "镜像", "AM1": "项目创建时间", | |||||
} | } | ||||
} | } | ||||
func allProjectsOpenIValues(row int, rs *models.RepoStatistic, ctx *context.Context) map[string]string { | func allProjectsOpenIValues(row int, rs *models.RepoStatistic, ctx *context.Context) map[string]string { | ||||
return map[string]string{getCellName("A", row): strconv.FormatInt(rs.RepoID, 10), getCellName("B", row): rs.DisplayName(), getCellName("C", row): rs.OwnerName, getCellName("D", row): getBoolDisplay(rs.IsPrivate, ctx), getCellName("E", row): getBoolDisplay(rs.IsFork, ctx), getCellName("F", row): getBoolDisplay(rs.IsMirror, ctx), getCellName("G", row): strconv.FormatFloat(rs.RadarTotal, 'f', 2, 64), | |||||
getCellName("H", row): strconv.FormatFloat(rs.Impact, 'f', 2, 64), getCellName("I", row): strconv.FormatFloat(rs.Completeness, 'f', 2, 64), getCellName("J", row): strconv.FormatFloat(rs.Liveness, 'f', 2, 64), getCellName("K", row): strconv.FormatFloat(rs.ProjectHealth, 'f', 2, 64), getCellName("L", row): strconv.FormatFloat(rs.TeamHealth, 'f', 2, 64), getCellName("M", row): strconv.FormatFloat(rs.Growth, 'f', 2, 64), | |||||
getCellName("N", row): strconv.FormatInt(rs.NumWatches, 10), getCellName("O", row): strconv.FormatInt(rs.NumStars, 10), getCellName("P", row): strconv.FormatInt(rs.NumForks, 10), getCellName("Q", row): strconv.FormatInt(rs.NumDownloads, 10), | |||||
return map[string]string{getCellName("A", row): strconv.FormatInt(rs.RepoID, 10), getCellName("B", row): rs.DisplayName(), getCellName("C", row): rs.OwnerName, getCellName("D", row): getBoolDisplay(rs.IsPrivate, ctx), getCellName("E", row): strconv.FormatFloat(rs.RadarTotal, 'f', 2, 64), | |||||
getCellName("F", row): strconv.FormatFloat(rs.Impact, 'f', 2, 64), getCellName("G", row): strconv.FormatFloat(rs.Completeness, 'f', 2, 64), getCellName("H", row): strconv.FormatFloat(rs.Liveness, 'f', 2, 64), getCellName("I", row): strconv.FormatFloat(rs.ProjectHealth, 'f', 2, 64), getCellName("J", row): strconv.FormatFloat(rs.TeamHealth, 'f', 2, 64), getCellName("K", row): strconv.FormatFloat(rs.Growth, 'f', 2, 64), | |||||
getCellName("L", row): strconv.FormatInt(rs.NumWatches, 10), getCellName("M", row): strconv.FormatInt(rs.NumStars, 10), getCellName("N", row): strconv.FormatInt(rs.NumForks, 10), getCellName("O", row): strconv.FormatInt(rs.NumDownloads, 10), | |||||
getCellName("R", row): strconv.FormatInt(rs.NumComments, 10), getCellName("S", row): strconv.FormatInt(rs.NumVisits, 10), getCellName("T", row): strconv.FormatInt(rs.NumClosedIssues, 10), getCellName("U", row): strconv.FormatInt(rs.NumVersions, 10), | |||||
getCellName("V", row): strconv.FormatInt(rs.NumDevMonths, 10), getCellName("W", row): strconv.FormatInt(rs.DatasetSize, 10), getCellName("X", row): strconv.FormatInt(rs.NumModels, 10), getCellName("Y", row): strconv.FormatInt(rs.NumWikiViews, 10), | |||||
getCellName("Z", row): strconv.FormatInt(rs.NumCommits, 10), getCellName("AA", row): strconv.FormatInt(rs.NumIssues, 10), getCellName("AB", row): strconv.FormatInt(rs.NumPulls, 10), getCellName("AC", row): strconv.FormatInt(rs.NumVersions, 10), | |||||
getCellName("AD", row): strconv.FormatFloat(float64(rs.IssueFixedRate), 'f', 2, 64), getCellName("AE", row): strconv.FormatInt(rs.NumContributor, 10), getCellName("AF", row): strconv.FormatInt(rs.NumKeyContributor, 10), getCellName("AG", row): strconv.FormatInt(rs.NumContributorsGrowth, 10), | |||||
getCellName("AH", row): strconv.FormatInt(rs.NumCommitLinesGrowth, 10), getCellName("AI", row): strconv.FormatInt(rs.NumIssuesGrowth, 10), getCellName("AJ", row): strconv.FormatInt(rs.NumContributorsGrowth, 10), getCellName("AK", row): strconv.FormatInt(rs.NumCommitsGrowth, 10), getCellName("AL", row): strconv.FormatInt(rs.NumCommentsGrowth, 10), getCellName("AM", row): time.Unix(int64(rs.RepoCreatedUnix), 0).Format(CREATE_TIME_FORMAT), | |||||
getCellName("P", row): strconv.FormatInt(rs.NumComments, 10), getCellName("Q", row): strconv.FormatInt(rs.NumVisits, 10), getCellName("R", row): strconv.FormatInt(rs.NumClosedIssues, 10), getCellName("S", row): strconv.FormatInt(rs.NumVersions, 10), | |||||
getCellName("T", row): strconv.FormatInt(rs.NumDevMonths, 10), getCellName("U", row): strconv.FormatInt(rs.DatasetSize, 10), getCellName("V", row): strconv.FormatInt(rs.NumModels, 10), getCellName("W", row): strconv.FormatInt(rs.NumWikiViews, 10), | |||||
getCellName("X", row): strconv.FormatInt(rs.NumCommits, 10), getCellName("Y", row): strconv.FormatInt(rs.NumIssues, 10), getCellName("Z", row): strconv.FormatInt(rs.NumPulls, 10), getCellName("AA", row): strconv.FormatInt(rs.NumVersions, 10), | |||||
getCellName("AB", row): strconv.FormatFloat(float64(rs.IssueFixedRate), 'f', 2, 64), getCellName("AC", row): strconv.FormatInt(rs.NumContributor, 10), getCellName("AD", row): strconv.FormatInt(rs.NumKeyContributor, 10), getCellName("AE", row): strconv.FormatInt(rs.NumContributorsGrowth, 10), | |||||
getCellName("AF", row): strconv.FormatInt(rs.NumCommitLinesGrowth, 10), getCellName("AG", row): strconv.FormatInt(rs.NumIssuesGrowth, 10), getCellName("AH", row): strconv.FormatInt(rs.NumContributorsGrowth, 10), getCellName("AI", row): strconv.FormatInt(rs.NumCommitsGrowth, 10), getCellName("AJ", row): strconv.FormatInt(rs.NumCommentsGrowth, 10), getCellName("AK", row): getBoolDisplay(rs.IsFork, ctx), getCellName("AL", row): getBoolDisplay(rs.IsMirror, ctx), getCellName("AM", row): time.Unix(int64(rs.RepoCreatedUnix), 0).Format(CREATE_TIME_FORMAT), | |||||
} | } | ||||
} | } | ||||
@@ -5,6 +5,7 @@ import ( | |||||
"encoding/json" | "encoding/json" | ||||
"errors" | "errors" | ||||
"fmt" | "fmt" | ||||
"github.com/unknwon/i18n" | |||||
"io" | "io" | ||||
"net/http" | "net/http" | ||||
"os" | "os" | ||||
@@ -45,6 +46,10 @@ var ( | |||||
benchmarkResourceSpecs *models.ResourceSpecs | benchmarkResourceSpecs *models.ResourceSpecs | ||||
) | ) | ||||
const BENCHMARK_TYPE_CODE = "repo.cloudbrain.benchmark.types" | |||||
var benchmarkTypesMap = make(map[string]*models.BenchmarkTypes, 0) | |||||
var jobNamePattern = regexp.MustCompile(`^[a-z0-9][a-z0-9-_]{1,34}[a-z0-9-]$`) | var jobNamePattern = regexp.MustCompile(`^[a-z0-9][a-z0-9-_]{1,34}[a-z0-9-]$`) | ||||
// MustEnableDataset check if repository enable internal cb | // MustEnableDataset check if repository enable internal cb | ||||
@@ -130,12 +135,7 @@ func cloudBrainNewDataPrepare(ctx *context.Context) error { | |||||
} | } | ||||
ctx.Data["benchmark_categories"] = categories.Category | ctx.Data["benchmark_categories"] = categories.Category | ||||
if benchmarkTypes == nil { | |||||
if err := json.Unmarshal([]byte(setting.BenchmarkTypes), &benchmarkTypes); err != nil { | |||||
log.Error("json.Unmarshal BenchmarkTypes(%s) failed:%v", setting.BenchmarkTypes, err, ctx.Data["MsgID"]) | |||||
} | |||||
} | |||||
ctx.Data["benchmark_types"] = benchmarkTypes.BenchmarkType | |||||
ctx.Data["benchmark_types"] = GetBenchmarkTypes(ctx).BenchmarkType | |||||
if gpuInfos == nil { | if gpuInfos == nil { | ||||
json.Unmarshal([]byte(setting.GpuTypes), &gpuInfos) | json.Unmarshal([]byte(setting.GpuTypes), &gpuInfos) | ||||
@@ -339,13 +339,6 @@ func CloudBrainRestart(ctx *context.Context) { | |||||
} | } | ||||
func CloudBrainBenchMarkShow(ctx *context.Context) { | func CloudBrainBenchMarkShow(ctx *context.Context) { | ||||
if benchmarkTypes == nil { | |||||
if err := json.Unmarshal([]byte(setting.BenchmarkTypes), &benchmarkTypes); err != nil { | |||||
log.Error("json.Unmarshal BenchmarkTypes(%s) failed:%v", setting.BenchmarkTypes, err, ctx.Data["MsgID"]) | |||||
ctx.ServerError(err.Error(), err) | |||||
return | |||||
} | |||||
} | |||||
cloudBrainShow(ctx, tplCloudBrainBenchmarkShow) | cloudBrainShow(ctx, tplCloudBrainBenchmarkShow) | ||||
} | } | ||||
@@ -412,7 +405,7 @@ func cloudBrainShow(ctx *context.Context, tpName base.TplName) { | |||||
duration = int64(task.UpdatedUnix) - int64(task.CreatedUnix) | duration = int64(task.UpdatedUnix) - int64(task.CreatedUnix) | ||||
} | } | ||||
if task.BenchmarkTypeID > 0 { | if task.BenchmarkTypeID > 0 { | ||||
for _, benchmarkType := range benchmarkTypes.BenchmarkType { | |||||
for _, benchmarkType := range GetBenchmarkTypes(ctx).BenchmarkType { | |||||
if task.BenchmarkTypeID == benchmarkType.Id { | if task.BenchmarkTypeID == benchmarkType.Id { | ||||
ctx.Data["BenchmarkTypeName"] = benchmarkType.First | ctx.Data["BenchmarkTypeName"] = benchmarkType.First | ||||
for _, benchmarkChildType := range benchmarkType.Second { | for _, benchmarkChildType := range benchmarkType.Second { | ||||
@@ -1059,13 +1052,6 @@ func CloudBrainBenchmarkIndex(ctx *context.Context) { | |||||
return | return | ||||
} | } | ||||
if benchmarkTypes == nil { | |||||
if err := json.Unmarshal([]byte(setting.BenchmarkTypes), &benchmarkTypes); err != nil { | |||||
ctx.ServerError("Get BenchmarkTypes faild:", err) | |||||
return | |||||
} | |||||
} | |||||
for i, task := range ciTasks { | for i, task := range ciTasks { | ||||
ciTasks[i].CanDel = cloudbrain.CanDeleteJob(ctx, &task.Cloudbrain) | ciTasks[i].CanDel = cloudbrain.CanDeleteJob(ctx, &task.Cloudbrain) | ||||
ciTasks[i].Cloudbrain.ComputeResource = task.ComputeResource | ciTasks[i].Cloudbrain.ComputeResource = task.ComputeResource | ||||
@@ -1078,7 +1064,7 @@ func CloudBrainBenchmarkIndex(ctx *context.Context) { | |||||
ciTasks[i].TrainJobDuration = util.AddZero(duration/3600000) + ":" + util.AddZero(duration%3600000/60000) + ":" + util.AddZero(duration%60000/1000) | ciTasks[i].TrainJobDuration = util.AddZero(duration/3600000) + ":" + util.AddZero(duration%3600000/60000) + ":" + util.AddZero(duration%60000/1000) | ||||
ciTasks[i].BenchmarkTypeName = "" | ciTasks[i].BenchmarkTypeName = "" | ||||
if task.BenchmarkTypeID > 0 { | if task.BenchmarkTypeID > 0 { | ||||
for _, benchmarkType := range benchmarkTypes.BenchmarkType { | |||||
for _, benchmarkType := range GetBenchmarkTypes(ctx).BenchmarkType { | |||||
if task.BenchmarkTypeID == benchmarkType.Id { | if task.BenchmarkTypeID == benchmarkType.Id { | ||||
ciTasks[i].BenchmarkTypeRankLink = benchmarkType.RankLink | ciTasks[i].BenchmarkTypeRankLink = benchmarkType.RankLink | ||||
ciTasks[i].BenchmarkTypeName = benchmarkType.First | ciTasks[i].BenchmarkTypeName = benchmarkType.First | ||||
@@ -1102,15 +1088,8 @@ func GetChildTypes(ctx *context.Context) { | |||||
benchmarkTypeID := ctx.QueryInt("benchmark_type_id") | benchmarkTypeID := ctx.QueryInt("benchmark_type_id") | ||||
re := make(map[string]interface{}) | re := make(map[string]interface{}) | ||||
for { | for { | ||||
if benchmarkTypes == nil { | |||||
if err := json.Unmarshal([]byte(setting.BenchmarkTypes), &benchmarkTypes); err != nil { | |||||
log.Error("json.Unmarshal BenchmarkTypes(%s) failed:%v", setting.BenchmarkTypes, err, ctx.Data["MsgID"]) | |||||
re["errMsg"] = "system error" | |||||
break | |||||
} | |||||
} | |||||
var isExist bool | var isExist bool | ||||
for _, benchmarkType := range benchmarkTypes.BenchmarkType { | |||||
for _, benchmarkType := range GetBenchmarkTypes(ctx).BenchmarkType { | |||||
if benchmarkTypeID == benchmarkType.Id { | if benchmarkTypeID == benchmarkType.Id { | ||||
isExist = true | isExist = true | ||||
re["child_types"] = benchmarkType.Second | re["child_types"] = benchmarkType.Second | ||||
@@ -1141,17 +1120,11 @@ func CloudBrainBenchmarkNew(ctx *context.Context) { | |||||
ctx.HTML(200, tplCloudBrainBenchmarkNew) | ctx.HTML(200, tplCloudBrainBenchmarkNew) | ||||
} | } | ||||
func getBenchmarkAttachment(benchmarkTypeID, benchmarkChildTypeID int) (*models.BenchmarkDataset, error) { | |||||
func getBenchmarkAttachment(benchmarkTypeID, benchmarkChildTypeID int, ctx *context.Context) (*models.BenchmarkDataset, error) { | |||||
var childInfo *models.BenchmarkDataset | var childInfo *models.BenchmarkDataset | ||||
if benchmarkTypes == nil { | |||||
if err := json.Unmarshal([]byte(setting.BenchmarkTypes), &benchmarkTypes); err != nil { | |||||
log.Error("json.Unmarshal BenchmarkTypes(%s) failed:%v", setting.BenchmarkTypes, err) | |||||
return childInfo, err | |||||
} | |||||
} | |||||
var isExist bool | var isExist bool | ||||
for _, benchmarkType := range benchmarkTypes.BenchmarkType { | |||||
for _, benchmarkType := range GetBenchmarkTypes(ctx).BenchmarkType { | |||||
if benchmarkType.Id == benchmarkTypeID { | if benchmarkType.Id == benchmarkTypeID { | ||||
for _, childType := range benchmarkType.Second { | for _, childType := range benchmarkType.Second { | ||||
if childType.Id == benchmarkChildTypeID { | if childType.Id == benchmarkChildTypeID { | ||||
@@ -1265,7 +1238,7 @@ func CloudBrainBenchmarkCreate(ctx *context.Context, form auth.CreateCloudBrainF | |||||
return | return | ||||
} | } | ||||
childInfo, err := getBenchmarkAttachment(benchmarkTypeID, benchmarkChildTypeID) | |||||
childInfo, err := getBenchmarkAttachment(benchmarkTypeID, benchmarkChildTypeID, ctx) | |||||
if err != nil { | if err != nil { | ||||
log.Error("getBenchmarkAttachment failed:%v", err, ctx.Data["MsgID"]) | log.Error("getBenchmarkAttachment failed:%v", err, ctx.Data["MsgID"]) | ||||
cloudBrainNewDataPrepare(ctx) | cloudBrainNewDataPrepare(ctx) | ||||
@@ -1395,3 +1368,17 @@ func BenchmarkDel(ctx *context.Context) { | |||||
ctx.Redirect(setting.AppSubURL + ctx.Repo.RepoLink + "/cloudbrain/benchmark") | ctx.Redirect(setting.AppSubURL + ctx.Repo.RepoLink + "/cloudbrain/benchmark") | ||||
} | } | ||||
} | } | ||||
func GetBenchmarkTypes(ctx *context.Context) *models.BenchmarkTypes { | |||||
var lang = ctx.Locale.Language() | |||||
if benchmarkTypesMap[lang] == nil { | |||||
var val = i18n.Tr(lang, BENCHMARK_TYPE_CODE) | |||||
var tempType *models.BenchmarkTypes | |||||
if err := json.Unmarshal([]byte(val), &tempType); err != nil { | |||||
log.Error("json.Unmarshal BenchmarkTypes(%s) failed:%v", val, err, ctx.Data["MsgID"]) | |||||
return &models.BenchmarkTypes{} | |||||
} | |||||
benchmarkTypesMap[lang] = tempType | |||||
} | |||||
return benchmarkTypesMap[lang] | |||||
} |
@@ -43,26 +43,26 @@ | |||||
<span>{{$.i18n.Tr "repo.cloudbrain_status_runtime"}}</span> | <span>{{$.i18n.Tr "repo.cloudbrain_status_runtime"}}</span> | ||||
</div> | </div> | ||||
<div class="one wide column text center nowrap"> | <div class="one wide column text center nowrap"> | ||||
<span>{{$.i18n.Tr "repo.modelarts.computing_resources"}}</span> | |||||
<span>{{$.i18n.Tr "repo.modelarts.computing_resources"}}</span> | |||||
</div> | </div> | ||||
<div class="one wide column text center nowrap"> | <div class="one wide column text center nowrap"> | ||||
<span>{{$.i18n.Tr "repo.cloudbrain_creator"}}</span> | |||||
<span>{{$.i18n.Tr "repo.cloudbrain_creator"}}</span> | |||||
</div> | </div> | ||||
<div class="two wide column text center nowrap"> | <div class="two wide column text center nowrap"> | ||||
<span>{{$.i18n.Tr "repository"}}</span> | |||||
<span>{{$.i18n.Tr "repository"}}</span> | |||||
</div> | </div> | ||||
<div class="two wide column text center nowrap"> | <div class="two wide column text center nowrap"> | ||||
<span>{{.i18n.Tr "admin.cloudbrain.cloudbrain_name"}}</span> | |||||
<span>{{.i18n.Tr "admin.cloudbrain.cloudbrain_name"}}</span> | |||||
</div> | </div> | ||||
<div class="two wide column text center nowrap" style="width: 17.5%!important;"> | <div class="two wide column text center nowrap" style="width: 17.5%!important;"> | ||||
<span>{{$.i18n.Tr "repo.cloudbrain_operate"}}</span> | <span>{{$.i18n.Tr "repo.cloudbrain_operate"}}</span> | ||||
</div> | </div> | ||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
{{range .Tasks}} | {{range .Tasks}} | ||||
{{if .Repo}} | {{if .Repo}} | ||||
<div class="ui grid stackable item"> | <div class="ui grid stackable item"> | ||||
<div class="row"> | |||||
<div class="row"> | |||||
<!-- 任务名 --> | <!-- 任务名 --> | ||||
{{$JobID := '0'}} | {{$JobID := '0'}} | ||||
{{if eq .JobType "DEBUG" "SNN4IMAGENET" "BRAINSCORE" "BENCHMARK"}} | {{if eq .JobType "DEBUG" "SNN4IMAGENET" "BRAINSCORE" "BENCHMARK"}} | ||||
@@ -91,8 +91,8 @@ | |||||
{{end}} | {{end}} | ||||
</div> | </div> | ||||
<!-- 任务类型 --> | <!-- 任务类型 --> | ||||
<div class="one wide column text center nowrap"> | |||||
<span style="font-size: 12px;">{{.JobType}} </span> | |||||
<div class="one wide column text center nowrap"> | |||||
<span style="font-size: 12px;">{{.JobType}} </span> | |||||
</div> | </div> | ||||
<!-- 任务状态 --> | <!-- 任务状态 --> | ||||
<div class="two wide column text center nowrap" style="padding-left: 2.2rem !important; width: 10% !important;"> | <div class="two wide column text center nowrap" style="padding-left: 2.2rem !important; width: 10% !important;"> | ||||
@@ -105,12 +105,12 @@ | |||||
<span style="font-size: 12px;" class="">{{TimeSinceUnix1 .Cloudbrain.CreatedUnix}}</span> | <span style="font-size: 12px;" class="">{{TimeSinceUnix1 .Cloudbrain.CreatedUnix}}</span> | ||||
</div> | </div> | ||||
<!-- 任务运行时间 --> | <!-- 任务运行时间 --> | ||||
<div class="one wide column text center nowrap"> | |||||
<span style="font-size: 12px;" id="duration-{{$JobID}}">{{if .TrainJobDuration}}{{.TrainJobDuration}}{{else}}--{{end}}</span> | |||||
<div class="one wide column text center nowrap"> | |||||
<span style="font-size: 12px;" id="duration-{{$JobID}}">{{if .TrainJobDuration}}{{.TrainJobDuration}}{{else}}--{{end}}</span> | |||||
</div> | </div> | ||||
<!-- 计算资源 --> | <!-- 计算资源 --> | ||||
<div class="one wide column text center nowrap"> | <div class="one wide column text center nowrap"> | ||||
<span style="font-size: 12px;">{{if .ComputeResource}}{{.ComputeResource}}{{else}}--{{end}}</span> | |||||
<span style="font-size: 12px;">{{if .ComputeResource}}{{.ComputeResource}}{{else}}--{{end}}</span> | |||||
</div> | </div> | ||||
<!-- 创建者 --> | <!-- 创建者 --> | ||||
<div class="one wide column text center nowrap"> | <div class="one wide column text center nowrap"> | ||||
@@ -178,7 +178,7 @@ | |||||
{{$JobID = .JobID}} | {{$JobID = .JobID}} | ||||
{{end}} | {{end}} | ||||
<div class="ui grid stackable item"> | <div class="ui grid stackable item"> | ||||
<div class="row"> | |||||
<div class="row"> | |||||
<!-- 任务名 --> | <!-- 任务名 --> | ||||
<div class="two wide column nowrap"> | <div class="two wide column nowrap"> | ||||
{{if eq .JobType "DEBUG"}} | {{if eq .JobType "DEBUG"}} | ||||
@@ -200,8 +200,8 @@ | |||||
{{end}} | {{end}} | ||||
</div> | </div> | ||||
<!-- 任务类型 --> | <!-- 任务类型 --> | ||||
<div class="one wide column text center nowrap"> | |||||
<span style="font-size: 12px;">{{.JobType}} </span> | |||||
<div class="one wide column text center nowrap"> | |||||
<span style="font-size: 12px;">{{.JobType}} </span> | |||||
</div> | </div> | ||||
<!-- 任务状态 --> | <!-- 任务状态 --> | ||||
<div class="two wide column text center nowrap" style="padding-left: 2.2rem !important; width: 10% !important;"> | <div class="two wide column text center nowrap" style="padding-left: 2.2rem !important; width: 10% !important;"> | ||||
@@ -214,12 +214,12 @@ | |||||
<span style="font-size: 12px;" class="">{{TimeSinceUnix1 .Cloudbrain.CreatedUnix}}</span> | <span style="font-size: 12px;" class="">{{TimeSinceUnix1 .Cloudbrain.CreatedUnix}}</span> | ||||
</div> | </div> | ||||
<!-- 任务运行时间 --> | <!-- 任务运行时间 --> | ||||
<div class="one wide column text center nowrap"> | |||||
<span style="font-size: 12px;" id="duration-{{$JobID}}">{{if .TrainJobDuration}}{{.TrainJobDuration}}{{else}}--{{end}}</span> | |||||
<div class="one wide column text center nowrap"> | |||||
<span style="font-size: 12px;" id="duration-{{$JobID}}">{{if .TrainJobDuration}}{{.TrainJobDuration}}{{else}}--{{end}}</span> | |||||
</div> | </div> | ||||
<!-- 计算资源 --> | <!-- 计算资源 --> | ||||
<div class="one wide column text center nowrap"> | <div class="one wide column text center nowrap"> | ||||
<span style="font-size: 12px;">{{if .ComputeResource}}{{.ComputeResource}}{{else}}--{{end}}</span> | |||||
<span style="font-size: 12px;">{{if .ComputeResource}}{{.ComputeResource}}{{else}}--{{end}}</span> | |||||
</div> | </div> | ||||
<!-- 创建者 --> | <!-- 创建者 --> | ||||
<div class="one wide column text center nowrap"> | <div class="one wide column text center nowrap"> | ||||
@@ -296,18 +296,18 @@ | |||||
<div id="deletemodel"> | <div id="deletemodel"> | ||||
<div class="ui basic modal"> | <div class="ui basic modal"> | ||||
<div class="ui icon header"> | <div class="ui icon header"> | ||||
<i class="trash icon"></i> 删除任务 | |||||
<i class="trash icon"></i> {{.i18n.Tr "cloudbrain.delete_task"}} | |||||
</div> | </div> | ||||
<div class="content"> | <div class="content"> | ||||
<p>你确认删除该任务么?此任务一旦删除不可恢复。</p> | |||||
<p>{{.i18n.Tr "cloudbrain.task_delete_confirm"}}</p> | |||||
</div> | </div> | ||||
<div class="actions"> | <div class="actions"> | ||||
<div class="ui red basic inverted cancel button"> | <div class="ui red basic inverted cancel button"> | ||||
<i class="remove icon"></i> 取消操作 | |||||
<i class="remove icon"></i> {{.i18n.Tr "cloudbrain.operate_cancel"}} | |||||
</div> | </div> | ||||
<div class="ui green basic inverted ok button"> | <div class="ui green basic inverted ok button"> | ||||
<i class="checkmark icon"></i> 确定操作 | |||||
<i class="checkmark icon"></i> {{.i18n.Tr "cloudbrain.operate_confirm"}} | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -4,73 +4,73 @@ | |||||
<svg class="svg octicon-inbox" width="16" height="16" viewBox="0 0 24 24"> | <svg class="svg octicon-inbox" width="16" height="16" viewBox="0 0 24 24"> | ||||
<path fill="currentColor" d="M16,20H20V16H16M16,14H20V10H16M10,8H14V4H10M16,8H20V4H16M10,14H14V10H10M4,14H8V10H4M4,20H8V16H4M10,20H14V16H10M4,8H8V4H4V8Z" /> | <path fill="currentColor" d="M16,20H20V16H16M16,14H20V10H16M10,8H14V4H10M16,8H20V4H16M10,14H14V10H10M4,14H8V10H4M4,20H8V16H4M10,20H14V16H10M4,8H8V4H4V8Z" /> | ||||
</svg> | </svg> | ||||
全部领域 | |||||
{{.i18n.Tr "explore.all_fields"}} | |||||
</a> | </a> | ||||
<a class="{{if eq $.Topic "大模型"}}active {{end}}item" href="/explore/repos?q=&topic=大模型&sort={{.SortType}}"> | <a class="{{if eq $.Topic "大模型"}}active {{end}}item" href="/explore/repos?q=&topic=大模型&sort={{.SortType}}"> | ||||
<svg class="svg octicon-inbox" width="16" height="16" viewBox="0 0 24 24"> | <svg class="svg octicon-inbox" width="16" height="16" viewBox="0 0 24 24"> | ||||
<path fill="currentColor" d="M19 3H5C3.89 3 3 3.89 3 5V19C3 20.11 3.9 21 5 21H19C20.11 21 21 20.11 21 19V5C21 3.89 20.1 3 19 3M16.1 15.9C15.07 15.9 14.09 15.5 13.35 14.76L12.71 14.12L14.13 12.71L14.76 13.34C15.12 13.7 15.6 13.9 16.11 13.9C17.15 13.9 18 13.05 18 12S17.15 10.1 16.1 10.1C15.6 10.1 15.12 10.3 14.76 10.66L10.65 14.76C9.91 15.5 8.94 15.9 7.9 15.9C5.75 15.9 4 14.15 4 12S5.75 8.1 7.9 8.1C8.94 8.1 9.91 8.5 10.65 9.24L11.29 9.88L9.87 11.3L9.24 10.66C8.88 10.3 8.4 10.1 7.9 10.1C6.85 10.1 6 10.95 6 12S6.85 13.9 7.9 13.9C8.4 13.9 8.88 13.7 9.24 13.34L13.35 9.24C14.09 8.5 15.06 8.1 16.1 8.1C18.25 8.1 20 9.85 20 12S18.25 15.9 16.1 15.9Z" /> | <path fill="currentColor" d="M19 3H5C3.89 3 3 3.89 3 5V19C3 20.11 3.9 21 5 21H19C20.11 21 21 20.11 21 19V5C21 3.89 20.1 3 19 3M16.1 15.9C15.07 15.9 14.09 15.5 13.35 14.76L12.71 14.12L14.13 12.71L14.76 13.34C15.12 13.7 15.6 13.9 16.11 13.9C17.15 13.9 18 13.05 18 12S17.15 10.1 16.1 10.1C15.6 10.1 15.12 10.3 14.76 10.66L10.65 14.76C9.91 15.5 8.94 15.9 7.9 15.9C5.75 15.9 4 14.15 4 12S5.75 8.1 7.9 8.1C8.94 8.1 9.91 8.5 10.65 9.24L11.29 9.88L9.87 11.3L9.24 10.66C8.88 10.3 8.4 10.1 7.9 10.1C6.85 10.1 6 10.95 6 12S6.85 13.9 7.9 13.9C8.4 13.9 8.88 13.7 9.24 13.34L13.35 9.24C14.09 8.5 15.06 8.1 16.1 8.1C18.25 8.1 20 9.85 20 12S18.25 15.9 16.1 15.9Z" /> | ||||
</svg> | </svg> | ||||
大模型 | |||||
{{.i18n.Tr "explore.large_model"}} | |||||
</a> | </a> | ||||
<a class="{{if eq $.Topic "AI开发工具"}}active {{end}}item" href="/explore/repos?q=&topic=AI开发工具&sort={{.SortType}}"> | <a class="{{if eq $.Topic "AI开发工具"}}active {{end}}item" href="/explore/repos?q=&topic=AI开发工具&sort={{.SortType}}"> | ||||
<svg class="svg octicon-inbox" width="16" height="16" viewBox="0 0 24 24"> | <svg class="svg octicon-inbox" width="16" height="16" viewBox="0 0 24 24"> | ||||
<path fill="currentColor" d="M19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3M11 8H9V10C9 11.1 8.1 12 7 12C8.1 12 9 12.9 9 14V16H11V18H9C7.9 18 7 17.1 7 16V15C7 13.9 6.1 13 5 13V11C6.1 11 7 10.1 7 9V8C7 6.9 7.9 6 9 6H11V8M19 13C17.9 13 17 13.9 17 15V16C17 17.1 16.1 18 15 18H13V16H15V14C15 12.9 15.9 12 17 12C15.9 12 15 11.1 15 10V8H13V6H15C16.1 6 17 6.9 17 8V9C17 10.1 17.9 11 19 11V13Z" /> | <path fill="currentColor" d="M19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3M11 8H9V10C9 11.1 8.1 12 7 12C8.1 12 9 12.9 9 14V16H11V18H9C7.9 18 7 17.1 7 16V15C7 13.9 6.1 13 5 13V11C6.1 11 7 10.1 7 9V8C7 6.9 7.9 6 9 6H11V8M19 13C17.9 13 17 13.9 17 15V16C17 17.1 16.1 18 15 18H13V16H15V14C15 12.9 15.9 12 17 12C15.9 12 15 11.1 15 10V8H13V6H15C16.1 6 17 6.9 17 8V9C17 10.1 17.9 11 19 11V13Z" /> | ||||
</svg> | </svg> | ||||
AI开发工具 | |||||
{{.i18n.Tr "explore.ai_development_tools"}} | |||||
</a> | </a> | ||||
<a class="{{if eq $.Topic "计算机视觉"}}active {{end}}item" href="/explore/repos?q=&topic=计算机视觉&sort={{.SortType}}"> | <a class="{{if eq $.Topic "计算机视觉"}}active {{end}}item" href="/explore/repos?q=&topic=计算机视觉&sort={{.SortType}}"> | ||||
<svg class="svg octicon-inbox" width="16" height="16" viewBox="0 0 24 24"> | <svg class="svg octicon-inbox" width="16" height="16" viewBox="0 0 24 24"> | ||||
<path fill="currentColor" d="M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z" /> | <path fill="currentColor" d="M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z" /> | ||||
</svg> | </svg> | ||||
计算机视觉 | |||||
{{.i18n.Tr "explore.computer_version"}} | |||||
</a> | </a> | ||||
<a class="{{if eq $.Topic "自然语言处理"}}active {{end}}item" href="/explore/repos?q=&topic=自然语言处理&sort={{.SortType}}"> | <a class="{{if eq $.Topic "自然语言处理"}}active {{end}}item" href="/explore/repos?q=&topic=自然语言处理&sort={{.SortType}}"> | ||||
<svg class="svg octicon-inbox" width="16" height="16" viewBox="0 0 24 24"> | <svg class="svg octicon-inbox" width="16" height="16" viewBox="0 0 24 24"> | ||||
<path fill="currentColor" d="M9,5A4,4 0 0,1 13,9A4,4 0 0,1 9,13A4,4 0 0,1 5,9A4,4 0 0,1 9,5M9,15C11.67,15 17,16.34 17,19V21H1V19C1,16.34 6.33,15 9,15M16.76,5.36C18.78,7.56 18.78,10.61 16.76,12.63L15.08,10.94C15.92,9.76 15.92,8.23 15.08,7.05L16.76,5.36M20.07,2C24,6.05 23.97,12.11 20.07,16L18.44,14.37C21.21,11.19 21.21,6.65 18.44,3.63L20.07,2Z" /> | <path fill="currentColor" d="M9,5A4,4 0 0,1 13,9A4,4 0 0,1 9,13A4,4 0 0,1 5,9A4,4 0 0,1 9,5M9,15C11.67,15 17,16.34 17,19V21H1V19C1,16.34 6.33,15 9,15M16.76,5.36C18.78,7.56 18.78,10.61 16.76,12.63L15.08,10.94C15.92,9.76 15.92,8.23 15.08,7.05L16.76,5.36M20.07,2C24,6.05 23.97,12.11 20.07,16L18.44,14.37C21.21,11.19 21.21,6.65 18.44,3.63L20.07,2Z" /> | ||||
</svg> | </svg> | ||||
自然语言处理 | |||||
{{.i18n.Tr "explore.natural_language_processing"}} | |||||
</a> | </a> | ||||
<a class="{{if eq $.Topic "机器学习"}}active {{end}}item" href="/explore/repos?q=&topic=机器学习&sort={{.SortType}}"> | <a class="{{if eq $.Topic "机器学习"}}active {{end}}item" href="/explore/repos?q=&topic=机器学习&sort={{.SortType}}"> | ||||
<svg class="svg octicon-inbox" width="16" height="16" viewBox="0 0 24 24"> | <svg class="svg octicon-inbox" width="16" height="16" viewBox="0 0 24 24"> | ||||
<path fill="currentColor" d="M19,12V13.5A4,4 0 0,1 23,17.5C23,18.32 22.75,19.08 22.33,19.71L21.24,18.62C21.41,18.28 21.5,17.9 21.5,17.5A2.5,2.5 0 0,0 19,15V16.5L16.75,14.25L19,12M19,23V21.5A4,4 0 0,1 15,17.5C15,16.68 15.25,15.92 15.67,15.29L16.76,16.38C16.59,16.72 16.5,17.1 16.5,17.5A2.5,2.5 0 0,0 19,20V18.5L21.25,20.75L19,23M12,3C16.42,3 20,4.79 20,7C20,9.21 16.42,11 12,11C7.58,11 4,9.21 4,7C4,4.79 7.58,3 12,3M4,9C4,11.21 7.58,13 12,13C13.11,13 14.17,12.89 15.14,12.68C14.19,13.54 13.5,14.67 13.18,15.96L12,16C7.58,16 4,14.21 4,12V9M20,9V11H19.5L18.9,11.03C19.6,10.43 20,9.74 20,9M4,14C4,16.21 7.58,18 12,18L13,17.97C13.09,19.03 13.42,20 13.95,20.88L12,21C7.58,21 4,19.21 4,17V14Z" /> | <path fill="currentColor" d="M19,12V13.5A4,4 0 0,1 23,17.5C23,18.32 22.75,19.08 22.33,19.71L21.24,18.62C21.41,18.28 21.5,17.9 21.5,17.5A2.5,2.5 0 0,0 19,15V16.5L16.75,14.25L19,12M19,23V21.5A4,4 0 0,1 15,17.5C15,16.68 15.25,15.92 15.67,15.29L16.76,16.38C16.59,16.72 16.5,17.1 16.5,17.5A2.5,2.5 0 0,0 19,20V18.5L21.25,20.75L19,23M12,3C16.42,3 20,4.79 20,7C20,9.21 16.42,11 12,11C7.58,11 4,9.21 4,7C4,4.79 7.58,3 12,3M4,9C4,11.21 7.58,13 12,13C13.11,13 14.17,12.89 15.14,12.68C14.19,13.54 13.5,14.67 13.18,15.96L12,16C7.58,16 4,14.21 4,12V9M20,9V11H19.5L18.9,11.03C19.6,10.43 20,9.74 20,9M4,14C4,16.21 7.58,18 12,18L13,17.97C13.09,19.03 13.42,20 13.95,20.88L12,21C7.58,21 4,19.21 4,17V14Z" /> | ||||
</svg> | </svg> | ||||
机器学习 | |||||
{{.i18n.Tr "explore.machine_learning"}} | |||||
</a> | </a> | ||||
<a class="{{if eq $.Topic "神经网络"}}active {{end}}item" href="/explore/repos?q=&topic=神经网络&sort={{.SortType}}"> | <a class="{{if eq $.Topic "神经网络"}}active {{end}}item" href="/explore/repos?q=&topic=神经网络&sort={{.SortType}}"> | ||||
<svg class="svg octicon-inbox" width="16" height="16" viewBox="0 0 24 24"> | <svg class="svg octicon-inbox" width="16" height="16" viewBox="0 0 24 24"> | ||||
<path fill="currentColor" d="M13 3C9.23 3 6.19 5.95 6 9.66L4.08 12.19C3.84 12.5 4.08 13 4.5 13H6V16C6 17.11 6.89 18 8 18H9V21H16V16.31C18.37 15.19 20 12.8 20 10C20 6.14 16.88 3 13 3M17.06 9.57L15.1 10.09L16.54 11.54C16.89 11.88 16.89 12.46 16.54 12.81C16.19 13.16 15.61 13.16 15.27 12.81L13.81 11.37L13.3 13.33C13.18 13.82 12.68 14.1 12.21 13.97C11.72 13.84 11.44 13.35 11.57 12.87L12.1 10.9L10.13 11.43C9.65 11.56 9.15 11.28 9.03 10.79C8.9 10.32 9.18 9.82 9.67 9.7L11.63 9.19L10.19 7.73C9.84 7.39 9.84 6.82 10.19 6.46C10.54 6.11 11.12 6.11 11.46 6.46L12.91 7.9L13.43 5.94C13.55 5.46 14.04 5.18 14.5 5.3C15 5.43 15.28 5.92 15.16 6.41L14.63 8.37L16.59 7.84C17.08 7.72 17.57 8 17.7 8.5C17.82 8.96 17.54 9.45 17.06 9.57Z" /> | <path fill="currentColor" d="M13 3C9.23 3 6.19 5.95 6 9.66L4.08 12.19C3.84 12.5 4.08 13 4.5 13H6V16C6 17.11 6.89 18 8 18H9V21H16V16.31C18.37 15.19 20 12.8 20 10C20 6.14 16.88 3 13 3M17.06 9.57L15.1 10.09L16.54 11.54C16.89 11.88 16.89 12.46 16.54 12.81C16.19 13.16 15.61 13.16 15.27 12.81L13.81 11.37L13.3 13.33C13.18 13.82 12.68 14.1 12.21 13.97C11.72 13.84 11.44 13.35 11.57 12.87L12.1 10.9L10.13 11.43C9.65 11.56 9.15 11.28 9.03 10.79C8.9 10.32 9.18 9.82 9.67 9.7L11.63 9.19L10.19 7.73C9.84 7.39 9.84 6.82 10.19 6.46C10.54 6.11 11.12 6.11 11.46 6.46L12.91 7.9L13.43 5.94C13.55 5.46 14.04 5.18 14.5 5.3C15 5.43 15.28 5.92 15.16 6.41L14.63 8.37L16.59 7.84C17.08 7.72 17.57 8 17.7 8.5C17.82 8.96 17.54 9.45 17.06 9.57Z" /> | ||||
</svg> | </svg> | ||||
神经网络 | |||||
{{.i18n.Tr "explore.neural_networks"}} | |||||
</a> | </a> | ||||
<a class="{{if eq $.Topic "自动驾驶"}}active {{end}}item" href="/explore/repos?q=&topic=自动驾驶&sort={{.SortType}}"> | <a class="{{if eq $.Topic "自动驾驶"}}active {{end}}item" href="/explore/repos?q=&topic=自动驾驶&sort={{.SortType}}"> | ||||
<svg class="svg octicon-inbox" width="16" height="16" viewBox="0 0 24 24"> | <svg class="svg octicon-inbox" width="16" height="16" viewBox="0 0 24 24"> | ||||
<path fill="currentColor" d="M5,14H19L17.5,9.5H6.5L5,14M17.5,19A1.5,1.5 0 0,0 19,17.5A1.5,1.5 0 0,0 17.5,16A1.5,1.5 0 0,0 16,17.5A1.5,1.5 0 0,0 17.5,19M6.5,19A1.5,1.5 0 0,0 8,17.5A1.5,1.5 0 0,0 6.5,16A1.5,1.5 0 0,0 5,17.5A1.5,1.5 0 0,0 6.5,19M18.92,9L21,15V23A1,1 0 0,1 20,24H19A1,1 0 0,1 18,23V22H6V23A1,1 0 0,1 5,24H4A1,1 0 0,1 3,23V15L5.08,9C5.28,8.42 5.85,8 6.5,8H17.5C18.15,8 18.72,8.42 18.92,9M12,0C14.12,0 16.15,0.86 17.65,2.35L16.23,3.77C15.11,2.65 13.58,2 12,2C10.42,2 8.89,2.65 7.77,3.77L6.36,2.35C7.85,0.86 9.88,0 12,0M12,4C13.06,4 14.07,4.44 14.82,5.18L13.4,6.6C13.03,6.23 12.53,6 12,6C11.5,6 10.97,6.23 10.6,6.6L9.18,5.18C9.93,4.44 10.94,4 12,4Z" /> | <path fill="currentColor" d="M5,14H19L17.5,9.5H6.5L5,14M17.5,19A1.5,1.5 0 0,0 19,17.5A1.5,1.5 0 0,0 17.5,16A1.5,1.5 0 0,0 16,17.5A1.5,1.5 0 0,0 17.5,19M6.5,19A1.5,1.5 0 0,0 8,17.5A1.5,1.5 0 0,0 6.5,16A1.5,1.5 0 0,0 5,17.5A1.5,1.5 0 0,0 6.5,19M18.92,9L21,15V23A1,1 0 0,1 20,24H19A1,1 0 0,1 18,23V22H6V23A1,1 0 0,1 5,24H4A1,1 0 0,1 3,23V15L5.08,9C5.28,8.42 5.85,8 6.5,8H17.5C18.15,8 18.72,8.42 18.92,9M12,0C14.12,0 16.15,0.86 17.65,2.35L16.23,3.77C15.11,2.65 13.58,2 12,2C10.42,2 8.89,2.65 7.77,3.77L6.36,2.35C7.85,0.86 9.88,0 12,0M12,4C13.06,4 14.07,4.44 14.82,5.18L13.4,6.6C13.03,6.23 12.53,6 12,6C11.5,6 10.97,6.23 10.6,6.6L9.18,5.18C9.93,4.44 10.94,4 12,4Z" /> | ||||
</svg> | </svg> | ||||
自动驾驶 | |||||
{{.i18n.Tr "explore.autopilot"}} | |||||
</a> | </a> | ||||
<a class="{{if eq $.Topic "机器人"}}active {{end}}item" href="/explore/repos?q=&topic=机器人&sort={{.SortType}}"> | <a class="{{if eq $.Topic "机器人"}}active {{end}}item" href="/explore/repos?q=&topic=机器人&sort={{.SortType}}"> | ||||
<svg class="svg octicon-inbox" width="16" height="16" viewBox="0 0 24 24"> | <svg class="svg octicon-inbox" width="16" height="16" viewBox="0 0 24 24"> | ||||
<path fill="currentColor" d="M12,2A2,2 0 0,1 14,4C14,4.74 13.6,5.39 13,5.73V7H14A7,7 0 0,1 21,14H22A1,1 0 0,1 23,15V18A1,1 0 0,1 22,19H21V20A2,2 0 0,1 19,22H5A2,2 0 0,1 3,20V19H2A1,1 0 0,1 1,18V15A1,1 0 0,1 2,14H3A7,7 0 0,1 10,7H11V5.73C10.4,5.39 10,4.74 10,4A2,2 0 0,1 12,2M7.5,13A2.5,2.5 0 0,0 5,15.5A2.5,2.5 0 0,0 7.5,18A2.5,2.5 0 0,0 10,15.5A2.5,2.5 0 0,0 7.5,13M16.5,13A2.5,2.5 0 0,0 14,15.5A2.5,2.5 0 0,0 16.5,18A2.5,2.5 0 0,0 19,15.5A2.5,2.5 0 0,0 16.5,13Z" /> | <path fill="currentColor" d="M12,2A2,2 0 0,1 14,4C14,4.74 13.6,5.39 13,5.73V7H14A7,7 0 0,1 21,14H22A1,1 0 0,1 23,15V18A1,1 0 0,1 22,19H21V20A2,2 0 0,1 19,22H5A2,2 0 0,1 3,20V19H2A1,1 0 0,1 1,18V15A1,1 0 0,1 2,14H3A7,7 0 0,1 10,7H11V5.73C10.4,5.39 10,4.74 10,4A2,2 0 0,1 12,2M7.5,13A2.5,2.5 0 0,0 5,15.5A2.5,2.5 0 0,0 7.5,18A2.5,2.5 0 0,0 10,15.5A2.5,2.5 0 0,0 7.5,13M16.5,13A2.5,2.5 0 0,0 14,15.5A2.5,2.5 0 0,0 16.5,18A2.5,2.5 0 0,0 19,15.5A2.5,2.5 0 0,0 16.5,13Z" /> | ||||
</svg> | </svg> | ||||
机器人 | |||||
{{.i18n.Tr "explore.robot"}} | |||||
</a> | </a> | ||||
<a class="{{if eq $.Topic "联邦学习"}}active {{end}}item" href="/explore/repos?q=&topic=联邦学习&sort={{.SortType}}"> | <a class="{{if eq $.Topic "联邦学习"}}active {{end}}item" href="/explore/repos?q=&topic=联邦学习&sort={{.SortType}}"> | ||||
<svg class="svg octicon-inbox" width="16" height="16" viewBox="0 0 24 24"> | <svg class="svg octicon-inbox" width="16" height="16" viewBox="0 0 24 24"> | ||||
<path fill="currentColor" d="M3 11H11V3H3M5 5H9V9H5M13 21H21V13H13M15 15H19V19H15M3 21H11V13H3M5 15H9V19H5M13 3V11H21V3M19 9H15V5H19Z" /> | <path fill="currentColor" d="M3 11H11V3H3M5 5H9V9H5M13 21H21V13H13M15 15H19V19H15M3 21H11V13H3M5 15H9V19H5M13 3V11H21V3M19 9H15V5H19Z" /> | ||||
</svg> | </svg> | ||||
联邦学习 | |||||
{{.i18n.Tr "explore.federated_learning"}} | |||||
</a> | </a> | ||||
<a class="{{if eq $.Topic "数据挖掘"}}active {{end}}item" href="/explore/repos?q=&topic=数据挖掘&sort={{.SortType}}"> | <a class="{{if eq $.Topic "数据挖掘"}}active {{end}}item" href="/explore/repos?q=&topic=数据挖掘&sort={{.SortType}}"> | ||||
<svg class="svg octicon-inbox" width="16" height="16" viewBox="0 0 24 24"> | <svg class="svg octicon-inbox" width="16" height="16" viewBox="0 0 24 24"> | ||||
<path fill="currentColor" d="M18.36,2.64C20,2.64 21.36,4 21.36,5.64C21.36,7.29 20,8.64 18.36,8.64C16.71,8.64 15.36,7.29 15.36,5.64C15.36,5.34 15.41,5.06 15.5,4.8C14.43,4.29 13.25,4 12,4A8,8 0 0,0 4,12L4.04,12.84L2.05,13.05L2,12A10,10 0 0,1 12,2C13.69,2 15.28,2.42 16.67,3.16C17.16,2.83 17.74,2.64 18.36,2.64M18.36,4.64A1,1 0 0,0 17.36,5.64A1,1 0 0,0 18.36,6.64C18.92,6.64 19.36,6.19 19.36,5.64C19.36,5.08 18.92,4.64 18.36,4.64M5.64,15.36C7.29,15.36 8.64,16.71 8.64,18.36C8.64,18.66 8.59,18.94 8.5,19.2C9.57,19.71 10.75,20 12,20A8,8 0 0,0 20,12L19.96,11.16L21.95,10.95L22,12A10,10 0 0,1 12,22C10.31,22 8.72,21.58 7.33,20.84C6.84,21.17 6.26,21.36 5.64,21.36C4,21.36 2.64,20 2.64,18.36C2.64,16.71 4,15.36 5.64,15.36M5.64,17.36C5.08,17.36 4.64,17.81 4.64,18.36C4.64,18.92 5.08,19.36 5.64,19.36A1,1 0 0,0 6.64,18.36A1,1 0 0,0 5.64,17.36M12,8A4,4 0 0,1 16,12A4,4 0 0,1 12,16A4,4 0 0,1 8,12A4,4 0 0,1 12,8Z" /> | <path fill="currentColor" d="M18.36,2.64C20,2.64 21.36,4 21.36,5.64C21.36,7.29 20,8.64 18.36,8.64C16.71,8.64 15.36,7.29 15.36,5.64C15.36,5.34 15.41,5.06 15.5,4.8C14.43,4.29 13.25,4 12,4A8,8 0 0,0 4,12L4.04,12.84L2.05,13.05L2,12A10,10 0 0,1 12,2C13.69,2 15.28,2.42 16.67,3.16C17.16,2.83 17.74,2.64 18.36,2.64M18.36,4.64A1,1 0 0,0 17.36,5.64A1,1 0 0,0 18.36,6.64C18.92,6.64 19.36,6.19 19.36,5.64C19.36,5.08 18.92,4.64 18.36,4.64M5.64,15.36C7.29,15.36 8.64,16.71 8.64,18.36C8.64,18.66 8.59,18.94 8.5,19.2C9.57,19.71 10.75,20 12,20A8,8 0 0,0 20,12L19.96,11.16L21.95,10.95L22,12A10,10 0 0,1 12,22C10.31,22 8.72,21.58 7.33,20.84C6.84,21.17 6.26,21.36 5.64,21.36C4,21.36 2.64,20 2.64,18.36C2.64,16.71 4,15.36 5.64,15.36M5.64,17.36C5.08,17.36 4.64,17.81 4.64,18.36C4.64,18.92 5.08,19.36 5.64,19.36A1,1 0 0,0 6.64,18.36A1,1 0 0,0 5.64,17.36M12,8A4,4 0 0,1 16,12A4,4 0 0,1 12,16A4,4 0 0,1 8,12A4,4 0 0,1 12,8Z" /> | ||||
</svg> | </svg> | ||||
数据挖掘 | |||||
{{.i18n.Tr "explore.data_mining"}} | |||||
</a> | </a> | ||||
<a class="{{if eq $.Topic "RISC-V"}}active {{end}}item" href="/explore/repos?q=&topic=RISC-V&sort={{.SortType}}"> | <a class="{{if eq $.Topic "RISC-V"}}active {{end}}item" href="/explore/repos?q=&topic=RISC-V&sort={{.SortType}}"> | ||||
<svg class="svg octicon-inbox" width="16" height="16" viewBox="0 0 24 24"> | <svg class="svg octicon-inbox" width="16" height="16" viewBox="0 0 24 24"> | ||||
<path fill="currentColor" d="M17,17H7V7H17M21,11V9H19V7C19,5.89 18.1,5 17,5H15V3H13V5H11V3H9V5H7C5.89,5 5,5.89 5,7V9H3V11H5V13H3V15H5V17A2,2 0 0,0 7,19H9V21H11V19H13V21H15V19H17A2,2 0 0,0 19,17V15H21V13H19V11M13,13H11V11H13M15,9H9V15H15V9Z" /> | <path fill="currentColor" d="M17,17H7V7H17M21,11V9H19V7C19,5.89 18.1,5 17,5H15V3H13V5H11V3H9V5H7C5.89,5 5,5.89 5,7V9H3V11H5V13H3V15H5V17A2,2 0 0,0 7,19H9V21H11V19H13V21H15V19H17A2,2 0 0,0 19,17V15H21V13H19V11M13,13H11V11H13M15,9H9V15H15V9Z" /> | ||||
</svg> | </svg> | ||||
RISC-V开发 | |||||
</a> | |||||
{{.i18n.Tr "explore.RISC-V_development"}} | |||||
</a> | |||||
</div> | </div> | ||||
</div> | |||||
</div> |
@@ -44,13 +44,13 @@ | |||||
<svg class="svg octicon-repo" width="16" height="16" aria-hidden="true"> | <svg class="svg octicon-repo" width="16" height="16" aria-hidden="true"> | ||||
<use xlink:href="#octicon-repo" /> | <use xlink:href="#octicon-repo" /> | ||||
</svg> | </svg> | ||||
热门{{.i18n.Tr "explore.repos"}} | |||||
{{.i18n.Tr "explore.hot_repo"}} | |||||
</a> | </a> | ||||
<a class="{{if eq .SortType "active"}}active{{end}} item" href="{{$.Link}}?q={{$.Keyword}}&topic={{$.Topic}}&sort=active&tab={{$.TabName}}"> | <a class="{{if eq .SortType "active"}}active{{end}} item" href="{{$.Link}}?q={{$.Keyword}}&topic={{$.Topic}}&sort=active&tab={{$.TabName}}"> | ||||
<svg class="svg octicon-inbox" width="16" height="16" aria-hidden="true"> | <svg class="svg octicon-inbox" width="16" height="16" aria-hidden="true"> | ||||
<use xlink:href="#octicon-inbox" /> | <use xlink:href="#octicon-inbox" /> | ||||
</svg> | </svg> | ||||
活跃{{.i18n.Tr "explore.repos"}} | |||||
{{.i18n.Tr "explore.active_repo"}} | |||||
</a> | </a> | ||||
{{end}} | {{end}} | ||||
<a class="{{if eq .SortType "recentupdate"}}active{{end}} item" href="{{$.Link}}?q={{$.Keyword}}&topic={{$.Topic}}&sort=recentupdate&tab={{$.TabName}}"> | <a class="{{if eq .SortType "recentupdate"}}active{{end}} item" href="{{$.Link}}?q={{$.Keyword}}&topic={{$.Topic}}&sort=recentupdate&tab={{$.TabName}}"> | ||||
@@ -39,8 +39,8 @@ | |||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="column right aligned"> | <div class="column right aligned"> | ||||
<a class="ui compact orange basic icon button" href="https://openi.org.cn/projects/Benchmark/#algType" style="box-shadow: none;" target="_blank"><i class="large ri-trophy-fill middle aligned icon"></i>基准测试排行榜</a> | |||||
{{if .Permission.CanWrite $.UnitTypeCloudBrain}} | |||||
<a class="ui compact orange basic icon button" href="https://openi.org.cn/projects/Benchmark/#algType" style="box-shadow: none;" target="_blank"><i class="large ri-trophy-fill middle aligned icon"></i>{{$.i18n.Tr "repo.benchmark_leaderboards"}}</a> | |||||
{{if .Permission.CanWrite $.UnitTypeCloudBrain}} | |||||
<a class="ui green button" href="{{.RepoLink}}/cloudbrain/benchmark/create">{{$.i18n.Tr "repo.modelarts.evaluate_job.new_job"}}</a> | <a class="ui green button" href="{{.RepoLink}}/cloudbrain/benchmark/create">{{$.i18n.Tr "repo.modelarts.evaluate_job.new_job"}}</a> | ||||
{{else}} | {{else}} | ||||
<a class="ui disabled button" >{{$.i18n.Tr "repo.modelarts.evaluate_job.new_job"}}</a> | <a class="ui disabled button" >{{$.i18n.Tr "repo.modelarts.evaluate_job.new_job"}}</a> | ||||
@@ -50,12 +50,12 @@ | |||||
{{if eq 0 (len .Tasks)}} | {{if eq 0 (len .Tasks)}} | ||||
<div class="ui placeholder segment bgtask-none"> | <div class="ui placeholder segment bgtask-none"> | ||||
<div class="ui icon header bgtask-header-pic"></div> | <div class="ui icon header bgtask-header-pic"></div> | ||||
<div class="bgtask-content-header">未创建过评测任务</div> | |||||
<div class="bgtask-content-header">{{$.i18n.Tr "repo.model_Evaluation_not_created"}}</div> | |||||
<div class="bgtask-content"> | <div class="bgtask-content"> | ||||
{{if $.RepoIsEmpty}} | {{if $.RepoIsEmpty}} | ||||
<div class="bgtask-content-txt">代码版本:您还没有初始化代码仓库,请先<a href="{{.RepoLink}}">创建代码版本;</a></div> | |||||
<div class="bgtask-content-txt">{{$.i18n.Tr "repo.repo_not_initialized" .RepoLink | Safe}}</div> | |||||
{{end}} | {{end}} | ||||
<div class="bgtask-content-txt">使用说明:可以参考启智AI协作平台<a href="https://git.openi.org.cn/zeizei/OpenI_Learning">小白训练营课程。</a></div> | |||||
<div class="bgtask-content-txt">{{$.i18n.Tr "repo.platform_instructions" | Safe}}</div> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
{{else}} | {{else}} | ||||
@@ -85,21 +85,21 @@ | |||||
<span>{{$.i18n.Tr "repo.cloudbrain_status_runtime"}}</span> | <span>{{$.i18n.Tr "repo.cloudbrain_status_runtime"}}</span> | ||||
</div> | </div> | ||||
<div class="two wide column text center padding0"> | <div class="two wide column text center padding0"> | ||||
<span>{{$.i18n.Tr "repo.modelarts.computing_resources"}}</span> | |||||
<span>{{$.i18n.Tr "repo.modelarts.computing_resources"}}</span> | |||||
</div> | </div> | ||||
<div class="one wide column text center padding0"> | <div class="one wide column text center padding0"> | ||||
<span>{{$.i18n.Tr "repo.cloudbrain_creator"}}</span> | |||||
<span>{{$.i18n.Tr "repo.cloudbrain_creator"}}</span> | |||||
</div> | </div> | ||||
<div class="three wide column text center padding0"> | <div class="three wide column text center padding0"> | ||||
<span>{{$.i18n.Tr "repo.cloudbrain_operate"}}</span> | <span>{{$.i18n.Tr "repo.cloudbrain_operate"}}</span> | ||||
</div> | </div> | ||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
{{range .Tasks}} | {{range .Tasks}} | ||||
<div class="ui grid stackable item"> | <div class="ui grid stackable item"> | ||||
<div class="row"> | <div class="row"> | ||||
<!-- 任务名 --> | <!-- 任务名 --> | ||||
<div class="three wide column padding0"> | <div class="three wide column padding0"> | ||||
<a class="title" href="{{$.Link}}/{{.Cloudbrain.ID}}" title="{{.Cloudbrain.ID}}" style="font-size: 14px;"> | <a class="title" href="{{$.Link}}/{{.Cloudbrain.ID}}" title="{{.Cloudbrain.ID}}" style="font-size: 14px;"> | ||||
@@ -122,12 +122,12 @@ | |||||
<span style="font-size: 12px;" class="">{{TimeSinceUnix .Cloudbrain.CreatedUnix $.Lang}}</span> | <span style="font-size: 12px;" class="">{{TimeSinceUnix .Cloudbrain.CreatedUnix $.Lang}}</span> | ||||
</div> | </div> | ||||
<!-- 任务运行时间 --> | <!-- 任务运行时间 --> | ||||
<div class="one wide column text center padding0"> | |||||
<span style="font-size: 12px;" id="duration-{{.Cloudbrain.ID}}">{{.TrainJobDuration}}</span> | |||||
<div class="one wide column text center padding0"> | |||||
<span style="font-size: 12px;" id="duration-{{.Cloudbrain.ID}}">{{.TrainJobDuration}}</span> | |||||
</div> | </div> | ||||
<!-- 计算资源 --> | <!-- 计算资源 --> | ||||
<div class="two wide column text center padding0"> | <div class="two wide column text center padding0"> | ||||
<span style="font-size: 12px;">{{.ComputeResource}}</span> | |||||
<span style="font-size: 12px;">{{.ComputeResource}}</span> | |||||
</div> | </div> | ||||
<!-- 创建者 --> | <!-- 创建者 --> | ||||
<div class="one wide column text center padding0"> | <div class="one wide column text center padding0"> | ||||
@@ -139,7 +139,7 @@ | |||||
</div> | </div> | ||||
<div class="three wide column text center padding0"> | <div class="three wide column text center padding0"> | ||||
<div class="ui compact buttons" > | |||||
<div class="ui compact buttons" > | |||||
<!-- 停止任务 --> | <!-- 停止任务 --> | ||||
<form id="stopForm-{{.Cloudbrain.ID}}" style="margin-left:-1px;"> | <form id="stopForm-{{.Cloudbrain.ID}}" style="margin-left:-1px;"> | ||||
{{$.CsrfTokenHtml}} | {{$.CsrfTokenHtml}} | ||||
@@ -147,7 +147,7 @@ | |||||
<a id="ai-stop-{{.Cloudbrain.ID}}" class='ui basic ai_stop {{if eq .Status "STOPPED" "FAILED" "START_FAILED" "STOPPING" "CREATING" "STARTING" "SUCCEEDED"}}disabled {{else}}blue {{end}}button' data-repopath="{{$.RepoLink}}{{if eq .ComputeResource "CPU/GPU"}}/cloudbrain{{else}}/modelarts/notebook{{end}}/{{.Cloudbrain.ID}}/stop" data-jobid="{{.Cloudbrain.ID}}"> | <a id="ai-stop-{{.Cloudbrain.ID}}" class='ui basic ai_stop {{if eq .Status "STOPPED" "FAILED" "START_FAILED" "STOPPING" "CREATING" "STARTING" "SUCCEEDED"}}disabled {{else}}blue {{end}}button' data-repopath="{{$.RepoLink}}{{if eq .ComputeResource "CPU/GPU"}}/cloudbrain{{else}}/modelarts/notebook{{end}}/{{.Cloudbrain.ID}}/stop" data-jobid="{{.Cloudbrain.ID}}"> | ||||
{{$.i18n.Tr "repo.stop"}} | {{$.i18n.Tr "repo.stop"}} | ||||
</a> | </a> | ||||
{{else}} | {{else}} | ||||
<a class="ui basic disabled button"> | <a class="ui basic disabled button"> | ||||
{{$.i18n.Tr "repo.stop"}} | {{$.i18n.Tr "repo.stop"}} | ||||
@@ -155,9 +155,9 @@ | |||||
{{end}} | {{end}} | ||||
</form> | </form> | ||||
<a class="ui basic button {{if $.IsSigned}} blue{{else}} disabled{{end}}" href="{{$.RepoLink}}/cloudbrain/{{.Cloudbrain.ID}}/rate" target="_blank"> | <a class="ui basic button {{if $.IsSigned}} blue{{else}} disabled{{end}}" href="{{$.RepoLink}}/cloudbrain/{{.Cloudbrain.ID}}/rate" target="_blank"> | ||||
评分 | |||||
{{$.i18n.Tr "repo.stop"}} | |||||
</a> | </a> | ||||
<!-- 删除任务 --> | <!-- 删除任务 --> | ||||
<form id="delForm-{{.Cloudbrain.ID}}" action="{{if eq .ComputeResource "CPU/GPU"}}{{$.RepoLink}}/cloudbrain/benchmark{{else}}{{$.RepoLink}}/modelarts/notebook{{end}}/{{.Cloudbrain.ID}}/del" method="post"> | <form id="delForm-{{.Cloudbrain.ID}}" action="{{if eq .ComputeResource "CPU/GPU"}}{{$.RepoLink}}/cloudbrain/benchmark{{else}}{{$.RepoLink}}/modelarts/notebook{{end}}/{{.Cloudbrain.ID}}/del" method="post"> | ||||
<input type="hidden" name="debugListType" value="all"> | <input type="hidden" name="debugListType" value="all"> | ||||
@@ -171,20 +171,20 @@ | |||||
{{$.i18n.Tr "repo.delete"}} | {{$.i18n.Tr "repo.delete"}} | ||||
</a> | </a> | ||||
{{end}} | {{end}} | ||||
</form> | |||||
</form> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
{{end}} | |||||
{{end}} | |||||
<!-- | <!-- | ||||
<div class="" style="margin-top: 3.0em;"> | <div class="" style="margin-top: 3.0em;"> | ||||
<img class="ui middle aligned tiny image" src="/img/ranking_list.jpg"> | |||||
<img class="ui middle aligned tiny image" src="/img/ranking_list.jpg"> | |||||
<a class="ui blue" href="{{$.RepoLink}}/cloudbrain/123/rate?isObjectDetcionAll=true" target="_blank">目标检测算法排行榜</a> | <a class="ui blue" href="{{$.RepoLink}}/cloudbrain/123/rate?isObjectDetcionAll=true" target="_blank">目标检测算法排行榜</a> | ||||
</div> | </div> | ||||
--> | --> | ||||
{{template "base/paginate" .}} | {{template "base/paginate" .}} | ||||
</div> | </div> | ||||
@@ -204,18 +204,18 @@ | |||||
<div id="deletemodel"> | <div id="deletemodel"> | ||||
<div class="ui basic modal"> | <div class="ui basic modal"> | ||||
<div class="ui icon header"> | <div class="ui icon header"> | ||||
<i class="trash icon"></i> 删除任务 | |||||
<i class="trash icon"></i> {{.i18n.Tr "cloudbrain.delete_task"}} | |||||
</div> | </div> | ||||
<div class="content"> | <div class="content"> | ||||
<p>你确认删除该任务么?此任务一旦删除不可恢复。</p> | |||||
<p>{{.i18n.Tr "cloudbrain.task_delete_confirm"}}</p> | |||||
</div> | </div> | ||||
<div class="actions"> | <div class="actions"> | ||||
<div class="ui red basic inverted cancel button"> | <div class="ui red basic inverted cancel button"> | ||||
<i class="remove icon"></i> 取消操作 | |||||
<i class="remove icon"></i> {{.i18n.Tr "cloudbrain.operate_cancel"}} | |||||
</div> | </div> | ||||
<div class="ui green basic inverted ok button"> | <div class="ui green basic inverted ok button"> | ||||
<i class="checkmark icon"></i> 确定操作 | |||||
<i class="checkmark icon"></i> {{.i18n.Tr "cloudbrain.operate_confirm"}} | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -78,8 +78,8 @@ | |||||
<form class="ui form" action="{{.Link}}" method="post"> | <form class="ui form" action="{{.Link}}" method="post"> | ||||
{{.CsrfTokenHtml}} | {{.CsrfTokenHtml}} | ||||
<input type="hidden" name="action" value="update"> | <input type="hidden" name="action" value="update"> | ||||
<div class="required unite min_title inline field"> | <div class="required unite min_title inline field"> | ||||
<label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.job_name"}}</label> | <label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.job_name"}}</label> | ||||
<input style="width: 80%;" name="display_job_name" id="trainjob_job_name" placeholder={{.i18n.Tr "repo.modelarts.train_job.job_name"}} value="{{.display_job_name}}" tabindex="3" autofocus required maxlength="254"> | <input style="width: 80%;" name="display_job_name" id="trainjob_job_name" placeholder={{.i18n.Tr "repo.modelarts.train_job.job_name"}} value="{{.display_job_name}}" tabindex="3" autofocus required maxlength="254"> | ||||
@@ -90,7 +90,7 @@ | |||||
</div> | </div> | ||||
<div class="required unite min_title inline field"> | <div class="required unite min_title inline field"> | ||||
<label style="font-weight: normal;">GPU类型</label> | |||||
<label style="font-weight: normal;">{{.i18n.Tr "cloudbrain.gpu_type"}}</label> | |||||
<select id="cloudbrain_gpu_type" class="ui search dropdown" placeholder="选择GPU类型" style='width:385px' name="gpu_type"> | <select id="cloudbrain_gpu_type" class="ui search dropdown" placeholder="选择GPU类型" style='width:385px' name="gpu_type"> | ||||
{{range .benchmark_gpu_types}} | {{range .benchmark_gpu_types}} | ||||
<option value="{{.Queue}}">{{.Value}}</option> | <option value="{{.Queue}}">{{.Value}}</option> | ||||
@@ -124,7 +124,7 @@ | |||||
<div class="required unite min_title inline field"> | <div class="required unite min_title inline field"> | ||||
<label style="font-weight: normal;">{{.i18n.Tr "repo.cloudbrain.benchmark.evaluate_mirror"}}</label> | <label style="font-weight: normal;">{{.i18n.Tr "repo.cloudbrain.benchmark.evaluate_mirror"}}</label> | ||||
<span> </span> | <span> </span> | ||||
<input type="text" list="cloudbrain_image" placeholder="选择镜像或输入镜像地址" name="image" value="{{.image}}" class="required autofocus" style='width:492px;' maxlength="254"> | |||||
<input type="text" list="cloudbrain_image" placeholder="{{.i18n.Tr "cloudbrain.choose_mirror"}}" name="image" value="{{.image}}" class="required autofocus" style='width:492px;' maxlength="254"> | |||||
<i class="times circle outline icon icons" style="visibility: hidden;" onclick="clearValue()"></i> | <i class="times circle outline icon icons" style="visibility: hidden;" onclick="clearValue()"></i> | ||||
<datalist class="ui search" id="cloudbrain_image" style='width:385px;' name="image"> | <datalist class="ui search" id="cloudbrain_image" style='width:385px;' name="image"> | ||||
{{range .images}} | {{range .images}} | ||||
@@ -136,13 +136,13 @@ | |||||
</datalist> | </datalist> | ||||
</div> | </div> | ||||
<div class="required unite min_title inline field"> | <div class="required unite min_title inline field"> | ||||
<label style="font-weight: normal;">资源规格</label> | |||||
<select id="cloudbrain_resource_spec" class="ui search dropdown" placeholder="选择资源规格" style='width:385px' name="resource_spec_id"> | |||||
<label style="font-weight: normal;">{{.i18n.Tr "cloudbrain.resource_specification"}}</label> | |||||
<select id="cloudbrain_resource_spec" class="ui search dropdown" placeholder="{{.i18n.Tr "cloudbrain.select_specification"}}" style='width:385px' name="resource_spec_id"> | |||||
{{range .benchmark_resource_specs}} | {{range .benchmark_resource_specs}} | ||||
<option name="resource_spec_id" value="{{.Id}}">GPU数:{{.GpuNum}},CPU数:{{.CpuNum}},内存(MB):{{.MemMiB}},共享内存(MB):{{.ShareMemMiB}}</option> | |||||
<option name="resource_spec_id" value="{{.Id}}">{{$.i18n.Tr "cloudbrain.gpu_num"}}:{{.GpuNum}},{{$.i18n.Tr "cloudbrain.cpu_num"}}:{{.CpuNum}},{{$.i18n.Tr "cloudbrain.memory"}}(MB):{{.MemMiB}},{{$.i18n.Tr "cloudbrain.shared_memory"}}(MB):{{.ShareMemMiB}}</option> | |||||
{{end}} | {{end}} | ||||
</select> | </select> | ||||
</div> | </div> | ||||
@@ -150,25 +150,25 @@ | |||||
<div class="inline unite min_title field required"> | <div class="inline unite min_title field required"> | ||||
<label style="font-weight: normal;">{{.i18n.Tr "repo.cloudbrain.benchmark.evaluate_train"}}</label> | <label style="font-weight: normal;">{{.i18n.Tr "repo.cloudbrain.benchmark.evaluate_train"}}</label> | ||||
<input disabled="disabled" style="width: 33.5%;" name="train_file" id="train_file" value="train.py" tabindex="3" autofocus required maxlength="254" > | <input disabled="disabled" style="width: 33.5%;" name="train_file" id="train_file" value="train.py" tabindex="3" autofocus required maxlength="254" > | ||||
<a id="train_href_id" href="https://git.openi.org.cn/CV_benchmark/CV_reID_benchmark" target="_blank">查看样例</a> | |||||
<a id="train_href_id" href="https://git.openi.org.cn/CV_benchmark/CV_reID_benchmark" target="_blank">{{.i18n.Tr "repo.cloudbrain.benchmark.evaluate_train"}}</a> | |||||
</div> | </div> | ||||
<div class="inline unite min_title field required"> | <div class="inline unite min_title field required"> | ||||
<label style="font-weight: normal;">{{.i18n.Tr "repo.cloudbrain.benchmark.evaluate_test"}}</label> | <label style="font-weight: normal;">{{.i18n.Tr "repo.cloudbrain.benchmark.evaluate_test"}}</label> | ||||
<input disabled="disabled" style="width: 33.5%;" name="test_file" id="test_file" value="test.py" tabindex="3" autofocus required maxlength="254" > | <input disabled="disabled" style="width: 33.5%;" name="test_file" id="test_file" value="test.py" tabindex="3" autofocus required maxlength="254" > | ||||
<a id="test_href_id" href="https://git.openi.org.cn/CV_benchmark/CV_reID_benchmark" target="_blank">查看样例</a> | |||||
<a id="test_href_id" href="https://git.openi.org.cn/CV_benchmark/CV_reID_benchmark" target="_blank">{{.i18n.Tr "cloudbrain.view_sample"}}</a> | |||||
</div> | </div> | ||||
<div class="inline unite min_title field"> | <div class="inline unite min_title field"> | ||||
<button class="ui create_train_job green button"> | <button class="ui create_train_job green button"> | ||||
{{.i18n.Tr "repo.cloudbrain.new"}} | {{.i18n.Tr "repo.cloudbrain.new"}} | ||||
</button> | </button> | ||||
<a class="ui button" href="/">{{.i18n.Tr "repo.cloudbrain.cancel"}}</a> | <a class="ui button" href="/">{{.i18n.Tr "repo.cloudbrain.cancel"}}</a> | ||||
</div> | </div> | ||||
<!-- 模态框 --> | <!-- 模态框 --> | ||||
</form> | </form> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -217,7 +217,7 @@ | |||||
setChildType(); | setChildType(); | ||||
} | } | ||||
} | } | ||||
function validate(){ | function validate(){ | ||||
$('.ui.form') | $('.ui.form') | ||||
.form({ | .form({ | ||||
@@ -239,7 +239,7 @@ | |||||
// $('.ui.page.dimmer').dimmer('show') | // $('.ui.page.dimmer').dimmer('show') | ||||
document.getElementById("mask").style.display = "block" | document.getElementById("mask").style.display = "block" | ||||
}, | }, | ||||
onFailure: function(e){ | |||||
onFailure: function(e){ | |||||
return false; | return false; | ||||
} | } | ||||
}) | }) | ||||
@@ -247,6 +247,6 @@ | |||||
$('.ui.create_train_job.green.button').click(function(e) { | $('.ui.create_train_job.green.button').click(function(e) { | ||||
validate() | |||||
validate() | |||||
}) | }) | ||||
</script> | |||||
</script> |
@@ -82,7 +82,7 @@ | |||||
vertical-align: inherit; | vertical-align: inherit; | ||||
} | } | ||||
.ti-text-form-label { | .ti-text-form-label { | ||||
padding-bottom: 20px; | padding-bottom: 20px; | ||||
padding-right: 20px; | padding-right: 20px; | ||||
color: #8a8e99; | color: #8a8e99; | ||||
@@ -152,7 +152,7 @@ td, th { | |||||
opacity: .45 !important; | opacity: .45 !important; | ||||
} | } | ||||
.pad20{ | .pad20{ | ||||
border:0px !important; | border:0px !important; | ||||
} | } | ||||
.model_file_bread{ | .model_file_bread{ | ||||
@@ -196,14 +196,14 @@ td, th { | |||||
<span class="accordion-panel-title-content"> | <span class="accordion-panel-title-content"> | ||||
<span> | <span> | ||||
<div class="ac-display-inblock title_text acc-margin-bottom"> | <div class="ac-display-inblock title_text acc-margin-bottom"> | ||||
<span class="cti-mgRight-sm">{{TimeSinceUnix1 .CreatedUnix}}</span> | |||||
<span class="cti-mgRight-sm">{{TimeSinceUnix1 .CreatedUnix}}</span> | |||||
<span class="cti-mgRight-sm">{{$.i18n.Tr "repo.modelarts.status"}}: | <span class="cti-mgRight-sm">{{$.i18n.Tr "repo.modelarts.status"}}: | ||||
<span id="{{.VersionName}}-status-span"><i id="icon" style="vertical-align: middle;" class="{{.Status}}"></i><span id="text" style="margin-left: 0.4em;font-size: 12px;">{{.Status}}</span></span> | <span id="{{.VersionName}}-status-span"><i id="icon" style="vertical-align: middle;" class="{{.Status}}"></i><span id="text" style="margin-left: 0.4em;font-size: 12px;">{{.Status}}</span></span> | ||||
</span> | </span> | ||||
<span class="cti-mgRight-sm">{{$.i18n.Tr "repo.modelarts.train_job.dura_time"}}:</span> | <span class="cti-mgRight-sm">{{$.i18n.Tr "repo.modelarts.train_job.dura_time"}}:</span> | ||||
<span class="cti-mgRight-sm uc-accordionTitle-black" id="{{.VersionName}}-duration-span">{{$.duration}}</span> | <span class="cti-mgRight-sm uc-accordionTitle-black" id="{{.VersionName}}-duration-span">{{$.duration}}</span> | ||||
</div> | </div> | ||||
</span> | </span> | ||||
</span> | </span> | ||||
@@ -244,12 +244,12 @@ td, th { | |||||
</div> | </div> | ||||
</td> | </td> | ||||
</tr> | </tr> | ||||
<tr class="ti-no-ng-animate"> | <tr class="ti-no-ng-animate"> | ||||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | <td class="ti-no-ng-animate ti-text-form-label text-width80"> | ||||
{{$.i18n.Tr "repo.modelarts.train_job.start_time"}} | |||||
{{$.i18n.Tr "repo.modelarts.train_job.start_time"}} | |||||
</td> | </td> | ||||
<td class="ti-text-form-content"> | <td class="ti-text-form-content"> | ||||
<div class="text-span text-span-w"> | <div class="text-span text-span-w"> | ||||
<span style="font-size: 12px;" class="">{{TimeSinceUnix1 .CreatedUnix}}</span> | <span style="font-size: 12px;" class="">{{TimeSinceUnix1 .CreatedUnix}}</span> | ||||
@@ -258,9 +258,9 @@ td, th { | |||||
</tr> | </tr> | ||||
<tr class="ti-no-ng-animate"> | <tr class="ti-no-ng-animate"> | ||||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | <td class="ti-no-ng-animate ti-text-form-label text-width80"> | ||||
{{$.i18n.Tr "repo.modelarts.train_job.dura_time"}} | |||||
{{$.i18n.Tr "repo.modelarts.train_job.dura_time"}} | |||||
</td> | </td> | ||||
<td class="ti-text-form-content"> | <td class="ti-text-form-content"> | ||||
<div class="text-span text-span-w" id="{{.VersionName}}-duration"> | <div class="text-span text-span-w" id="{{.VersionName}}-duration"> | ||||
{{$.duration}} | {{$.duration}} | ||||
@@ -269,9 +269,9 @@ td, th { | |||||
</tr> | </tr> | ||||
<tr class="ti-no-ng-animate"> | <tr class="ti-no-ng-animate"> | ||||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | <td class="ti-no-ng-animate ti-text-form-label text-width80"> | ||||
镜像 | |||||
镜像 | |||||
</td> | </td> | ||||
<td class="ti-text-form-content"> | <td class="ti-text-form-content"> | ||||
<div class="text-span text-span-w" id="{{.VersionName}}-mirror"> | <div class="text-span text-span-w" id="{{.VersionName}}-mirror"> | ||||
{{.Image}} | {{.Image}} | ||||
@@ -280,30 +280,30 @@ td, th { | |||||
</tr> | </tr> | ||||
<tr class="ti-no-ng-animate"> | <tr class="ti-no-ng-animate"> | ||||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | <td class="ti-no-ng-animate ti-text-form-label text-width80"> | ||||
类型 | |||||
类型 | |||||
</td> | </td> | ||||
<td class="ti-text-form-content"> | <td class="ti-text-form-content"> | ||||
<div class="text-span text-span-w" id="{{.VersionName}}-BenchmarkTypeName"> | <div class="text-span text-span-w" id="{{.VersionName}}-BenchmarkTypeName"> | ||||
{{$.BenchmarkTypeName}} | {{$.BenchmarkTypeName}} | ||||
</div> | </div> | ||||
</td> | </td> | ||||
</tr> | </tr> | ||||
</tbody> | </tbody> | ||||
</table> | </table> | ||||
</div> | </div> | ||||
<div class="ac-grid-col"> | <div class="ac-grid-col"> | ||||
<table class="ti-form"> | <table class="ti-form"> | ||||
<tbody class="ti-text-form"> | <tbody class="ti-text-form"> | ||||
<tr class="ti-no-ng-animate"> | <tr class="ti-no-ng-animate"> | ||||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | <td class="ti-no-ng-animate ti-text-form-label text-width80"> | ||||
训练程序 | 训练程序 | ||||
</td> | </td> | ||||
<td class="ti-text-form-content"> | <td class="ti-text-form-content"> | ||||
<div class="text-span text-span-w"> | <div class="text-span text-span-w"> | ||||
train.py | train.py | ||||
@@ -314,19 +314,19 @@ td, th { | |||||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | <td class="ti-no-ng-animate ti-text-form-label text-width80"> | ||||
测试程序 | 测试程序 | ||||
</td> | </td> | ||||
<td class="ti-text-form-content"> | <td class="ti-text-form-content"> | ||||
<div class="text-span text-span-w"> | <div class="text-span text-span-w"> | ||||
test.py | test.py | ||||
</div> | </div> | ||||
</td> | </td> | ||||
</tr> | </tr> | ||||
<tr class="ti-no-ng-animate"> | <tr class="ti-no-ng-animate"> | ||||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | <td class="ti-no-ng-animate ti-text-form-label text-width80"> | ||||
{{$.i18n.Tr "repo.modelarts.train_job.description"}} | |||||
{{$.i18n.Tr "repo.modelarts.train_job.description"}} | |||||
</td> | </td> | ||||
<td class="ti-text-form-content"> | <td class="ti-text-form-content"> | ||||
<div class="text-span text-span-w" title="{{.Description}}"> | <div class="text-span text-span-w" title="{{.Description}}"> | ||||
{{.Description}} | {{.Description}} | ||||
@@ -336,9 +336,9 @@ td, th { | |||||
<tr class="ti-no-ng-animate"> | <tr class="ti-no-ng-animate"> | ||||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | <td class="ti-no-ng-animate ti-text-form-label text-width80"> | ||||
{{$.i18n.Tr "repo.modelarts.train_job.standard"}} | |||||
{{$.i18n.Tr "repo.modelarts.train_job.standard"}} | |||||
</td> | </td> | ||||
<td class="ti-text-form-content"> | <td class="ti-text-form-content"> | ||||
<div class="text-span text-span-w"> | <div class="text-span text-span-w"> | ||||
{{$.resource_spec}} | {{$.resource_spec}} | ||||
@@ -348,9 +348,9 @@ td, th { | |||||
<tr class="ti-no-ng-animate"> | <tr class="ti-no-ng-animate"> | ||||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | <td class="ti-no-ng-animate ti-text-form-label text-width80"> | ||||
创建者 | |||||
创建者 | |||||
</td> | </td> | ||||
<td class="ti-text-form-content"> | <td class="ti-text-form-content"> | ||||
<div class="text-span text-span-w" id="{{.VersionName}}-mirror"> | <div class="text-span text-span-w" id="{{.VersionName}}-mirror"> | ||||
{{.User.Name}} | {{.User.Name}} | ||||
@@ -359,9 +359,9 @@ td, th { | |||||
</tr> | </tr> | ||||
<tr class="ti-no-ng-animate"> | <tr class="ti-no-ng-animate"> | ||||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | <td class="ti-no-ng-animate ti-text-form-label text-width80"> | ||||
子类型 | |||||
子类型 | |||||
</td> | </td> | ||||
<td class="ti-text-form-content"> | <td class="ti-text-form-content"> | ||||
<div class="text-span text-span-w" id="{{.VersionName}}-BenchmarkChildTypeName"> | <div class="text-span text-span-w" id="{{.VersionName}}-BenchmarkChildTypeName"> | ||||
{{$.BenchmarkChildTypeName}} | {{$.BenchmarkChildTypeName}} | ||||
@@ -373,7 +373,7 @@ td, th { | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="ui tab" data-tab="second{{$k}}"> | <div class="ui tab" data-tab="second{{$k}}"> | ||||
@@ -386,11 +386,11 @@ td, th { | |||||
<input type="hidden" name="start_line" value> | <input type="hidden" name="start_line" value> | ||||
<pre id="log_file{{.VersionName}}"></pre> | <pre id="log_file{{.VersionName}}"></pre> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -400,24 +400,24 @@ td, th { | |||||
<div id="deletemodel"> | <div id="deletemodel"> | ||||
<div class="ui basic modal"> | <div class="ui basic modal"> | ||||
<div class="ui icon header"> | <div class="ui icon header"> | ||||
<i class="trash icon"></i> 删除任务 | |||||
<i class="trash icon"></i> {{.i18n.Tr "cloudbrain.delete_task"}} | |||||
</div> | </div> | ||||
<div class="content"> | <div class="content"> | ||||
<p>你确认删除该任务么?此任务一旦删除不可恢复。</p> | |||||
<p>{{.i18n.Tr "cloudbrain.task_delete_confirm"}}</p> | |||||
</div> | </div> | ||||
<div class="actions"> | <div class="actions"> | ||||
<div class="ui red basic inverted cancel button"> | <div class="ui red basic inverted cancel button"> | ||||
<i class="remove icon"></i> 取消操作 | |||||
<i class="remove icon"></i> {{.i18n.Tr "cloudbrain.operate_cancel"}} | |||||
</div> | </div> | ||||
<div class="ui green basic inverted ok button"> | <div class="ui green basic inverted ok button"> | ||||
<i class="checkmark icon"></i> 确定操作 | |||||
<i class="checkmark icon"></i> {{.i18n.Tr "cloudbrain.operate_confirm"}} | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
{{template "base/footer" .}} | {{template "base/footer" .}} | ||||
@@ -430,7 +430,7 @@ td, th { | |||||
$(document).ready(function(){ | $(document).ready(function(){ | ||||
$('.secondary.menu .item').tab(); | $('.secondary.menu .item').tab(); | ||||
}); | }); | ||||
let userName | let userName | ||||
let repoPath | let repoPath | ||||
let jobName | let jobName | ||||
@@ -454,5 +454,5 @@ td, th { | |||||
document.getElementById("mask").style.display = "none" | document.getElementById("mask").style.display = "none" | ||||
}); | }); | ||||
} | } | ||||
</script> | |||||
</script> |
@@ -147,12 +147,12 @@ | |||||
</div> | </div> | ||||
<div class="inline required field"> | <div class="inline required field"> | ||||
<label>{{.i18n.Tr "cloudbrain.task_name"}}</label> | <label>{{.i18n.Tr "cloudbrain.task_name"}}</label> | ||||
<input name="display_job_name" id="cloudbrain_job_name" placeholder="任务名称" value="{{.display_job_name}}" tabindex="3" autofocus required maxlength="255" onkeyup="this.value=this.value.replace(/[, ]/g,'')"> | |||||
<input name="display_job_name" id="cloudbrain_job_name" placeholder="input {{.i18n.Tr "cloudbrain.task_name"}}" value="{{.display_job_name}}" tabindex="3" autofocus required maxlength="255" onkeyup="this.value=this.value.replace(/[, ]/g,'')"> | |||||
</div> | </div> | ||||
<div class="inline required field"> | <div class="inline required field"> | ||||
<label>{{.i18n.Tr "cloudbrain.task_type"}}</label> | <label>{{.i18n.Tr "cloudbrain.task_type"}}</label> | ||||
<select id="cloudbrain_job_type" class="ui search dropdown" placeholder="选择任务类型" style='width:385px' name="job_type"> | |||||
<select id="cloudbrain_job_type" class="ui search dropdown" placeholder="select {{.i18n.Tr "cloudbrain.task_type"}}" style='width:385px' name="job_type"> | |||||
<option name="job_type" value="DEBUG">DEBUG</option> | <option name="job_type" value="DEBUG">DEBUG</option> | ||||
{{if .is_snn4imagenet_enabled}} | {{if .is_snn4imagenet_enabled}} | ||||
<option name="job_type" value="SNN4IMAGENET">SNN4IMAGENET</option> | <option name="job_type" value="SNN4IMAGENET">SNN4IMAGENET</option> | ||||
@@ -203,7 +203,7 @@ | |||||
<div class="inline required field"> | <div class="inline required field"> | ||||
<label>{{.i18n.Tr "cloudbrain.dataset"}}</label> | <label>{{.i18n.Tr "cloudbrain.dataset"}}</label> | ||||
<select id="cloudbrain_dataset" class="ui search dropdown" placeholder="选择数据集" style='width:385px' name="attachment" required> | |||||
<select id="cloudbrain_dataset" class="ui search dropdown" placeholder="{{.i18n.Tr "cloudbrain.select_dataset"}}" style='width:385px' name="attachment" required> | |||||
{{range .attachments}} | {{range .attachments}} | ||||
<option name="attachment" value="{{.UUID}}">{{.Attachment.Name}}</option> | <option name="attachment" value="{{.UUID}}">{{.Attachment.Name}}</option> | ||||
@@ -213,9 +213,9 @@ | |||||
<div class="inline required field"> | <div class="inline required field"> | ||||
<label>{{.i18n.Tr "cloudbrain.resource_specification"}}</label> | <label>{{.i18n.Tr "cloudbrain.resource_specification"}}</label> | ||||
<select id="cloudbrain_resource_spec" class="ui search dropdown" placeholder="选择资源规格" style='width:385px' name="resource_spec_id"> | |||||
<select id="cloudbrain_resource_spec" class="ui search dropdown" placeholder="{{.i18n.Tr "cloudbrain.select_specification"}}" style='width:385px' name="resource_spec_id"> | |||||
{{range .resource_specs}} | {{range .resource_specs}} | ||||
<option name="resource_spec_id" value="{{.Id}}">GPU数:{{.GpuNum}},CPU数:{{.CpuNum}},内存(MB):{{.MemMiB}},共享内存(MB):{{.ShareMemMiB}}</option> | |||||
<option name="resource_spec_id" value="{{.Id}}">{{$.i18n.Tr "cloudbrain.gpu_num"}}:{{.GpuNum}},{{$.i18n.Tr "cloudbrain.cpu_num"}}:{{.CpuNum}},{{$.i18n.Tr "cloudbrain.memory"}}(MB):{{.MemMiB}},{{$.i18n.Tr "cloudbrain.shared_memory"}}(MB):{{.ShareMemMiB}}</option> | |||||
{{end}} | {{end}} | ||||
</select> | </select> | ||||
</div> | </div> | ||||
@@ -208,7 +208,7 @@ | |||||
{{template "repo/header" .}} | {{template "repo/header" .}} | ||||
{{template "base/alert" .}} | {{template "base/alert" .}} | ||||
<!-- 提示框 --> | <!-- 提示框 --> | ||||
<div class="cloudbrain_debug" style="display: none;" data-debug="{{$.i18n.Tr "repo.debug"}}" data-debug-again="{{$.i18n.Tr "repo.debug_again"}}"></div> | |||||
<!-- 列表容器 --> | <!-- 列表容器 --> | ||||
<div class="ui container"> | <div class="ui container"> | ||||
@@ -242,14 +242,14 @@ | |||||
{{if eq 0 (len .Tasks)}} | {{if eq 0 (len .Tasks)}} | ||||
<div class="ui placeholder segment bgtask-none"> | <div class="ui placeholder segment bgtask-none"> | ||||
<div class="ui icon header bgtask-header-pic"></div> | <div class="ui icon header bgtask-header-pic"></div> | ||||
<div class="bgtask-content-header">未创建过调试任务</div> | |||||
<div class="bgtask-content-header">{{$.i18n.Tr "repo.debug_task_not_created"}}</div> | |||||
<div class="bgtask-content"> | <div class="bgtask-content"> | ||||
{{if $.RepoIsEmpty}} | {{if $.RepoIsEmpty}} | ||||
<div class="bgtask-content-txt">代码版本:您还没有初始化代码仓库,请先<a href="{{.RepoLink}}">创建代码版本</a>;</div> | |||||
<div class="bgtask-content-txt">{{$.i18n.Tr "repo.repo_not_initialized" .RepoLink | Safe}}</div> | |||||
{{end}} | {{end}} | ||||
<div class="bgtask-content-txt">运行时长:最长不超过4个小时,超过4个小时将自动停止;</div> | |||||
<div class="bgtask-content-txt">数据集:云脑1提供 CPU / GPU 资源,云脑2提供 Ascend NPU 资源,调试使用的数据集也需要上传到对应的环境;</div> | |||||
<div class="bgtask-content-txt">使用说明:可以参考启智AI协作平台<a href="https://git.openi.org.cn/zeizei/OpenI_Learning">小白训练营课程。</a></div> | |||||
<div class="bgtask-content-txt">{{$.i18n.Tr "repo.debug_task_running_limit"}}</div> | |||||
<div class="bgtask-content-txt">{{$.i18n.Tr "repo.dataset_desc"}}</div> | |||||
<div class="bgtask-content-txt">{{$.i18n.Tr "repo.platform_instructions" | Safe}}</div> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
{{else}} | {{else}} | ||||
@@ -458,18 +458,18 @@ | |||||
<div id="deletemodel"> | <div id="deletemodel"> | ||||
<div class="ui basic modal"> | <div class="ui basic modal"> | ||||
<div class="ui icon header"> | <div class="ui icon header"> | ||||
<i class="trash icon"></i> 删除任务 | |||||
<i class="trash icon"></i> {{.i18n.Tr "cloudbrain.delete_task"}} | |||||
</div> | </div> | ||||
<div class="content"> | <div class="content"> | ||||
<p>你确认删除该任务么?此任务一旦删除不可恢复。</p> | |||||
<p>{{.i18n.Tr "cloudbrain.task_delete_confirm"}}</p> | |||||
</div> | </div> | ||||
<div class="actions"> | <div class="actions"> | ||||
<div class="ui red basic inverted cancel button"> | <div class="ui red basic inverted cancel button"> | ||||
<i class="remove icon"></i> 取消操作 | |||||
<i class="remove icon"></i> {{.i18n.Tr "cloudbrain.operate_cancel"}} | |||||
</div> | </div> | ||||
<div class="ui green basic inverted ok button"> | <div class="ui green basic inverted ok button"> | ||||
<i class="checkmark icon"></i> 确定操作 | |||||
<i class="checkmark icon"></i> {{.i18n.Tr "cloudbrain.operate_confirm"}} | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -39,7 +39,7 @@ | |||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="column right aligned"> | <div class="column right aligned"> | ||||
{{if .Permission.CanWrite $.UnitTypeCloudBrain}} | |||||
{{if .Permission.CanWrite $.UnitTypeCloudBrain}} | |||||
<a class="ui green button" href="{{.RepoLink}}/modelarts/inference-job/create">{{$.i18n.Tr "repo.modelarts.train_job.new_infer"}}</a> | <a class="ui green button" href="{{.RepoLink}}/modelarts/inference-job/create">{{$.i18n.Tr "repo.modelarts.train_job.new_infer"}}</a> | ||||
{{else}} | {{else}} | ||||
<a class="ui disabled button" >{{$.i18n.Tr "repo.modelarts.train_job.new_infer"}}</a> | <a class="ui disabled button" >{{$.i18n.Tr "repo.modelarts.train_job.new_infer"}}</a> | ||||
@@ -49,16 +49,16 @@ | |||||
{{if eq 0 (len .Tasks)}} | {{if eq 0 (len .Tasks)}} | ||||
<div class="ui placeholder segment bgtask-none"> | <div class="ui placeholder segment bgtask-none"> | ||||
<div class="ui icon header bgtask-header-pic"></div> | <div class="ui icon header bgtask-header-pic"></div> | ||||
<div class="bgtask-content-header">未创建过推理任务</div> | |||||
<div class="bgtask-content-header">{{$.i18n.Tr "repo.inference_job_not_created"}}</div> | |||||
<div class="bgtask-content"> | <div class="bgtask-content"> | ||||
{{if $.RepoIsEmpty}} | {{if $.RepoIsEmpty}} | ||||
<div class="bgtask-content-txt">代码版本:您还没有初始化代码仓库,请先<a href="{{.RepoLink}}">创建代码版本;</a></div> | |||||
<div class="bgtask-content-txt">{{$.i18n.Tr "repo.repo_not_initialized" .RepoLink | Safe}}</div> | |||||
{{end}} | {{end}} | ||||
{{if eq 0 $.MODEL_COUNT}} | {{if eq 0 $.MODEL_COUNT}} | ||||
<div class="bgtask-content-txt">模型文件:您还没有模型文件,请先通过<a href="{{.RepoLink}}/modelarts/train-job">训练任务</a>产生并 <a href="{{.RepoLink}}/modelmanage/show_model">导出模型</a> ;</div> | |||||
<div class="bgtask-content-txt">{{$.i18n.Tr "repo.model_not_exist" .RepoLink .RepoLink | Safe}}</div> | |||||
{{end}} | {{end}} | ||||
<div class="bgtask-content-txt">数据集:云脑1提供 CPU / GPU 资源,云脑2提供 Ascend NPU 资源,调试使用的数据集也需要上传到对应的环境;</div> | |||||
<div class="bgtask-content-txt">使用说明:可以参考启智AI协作平台<a href="https://git.openi.org.cn/zeizei/OpenI_Learning">小白训练营课程。</a></div> | |||||
<div class="bgtask-content-txt">{{$.i18n.Tr "repo.dataset_desc"}}</div> | |||||
<div class="bgtask-content-txt">{{$.i18n.Tr "repo.platform_instructions" | Safe}}</div> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
{{else}} | {{else}} | ||||
@@ -88,32 +88,32 @@ | |||||
<span>{{$.i18n.Tr "repo.cloudbrain_status_runtime"}}</span> | <span>{{$.i18n.Tr "repo.cloudbrain_status_runtime"}}</span> | ||||
</div> | </div> | ||||
<!-- <div class="two wide column text center padding0"> | <!-- <div class="two wide column text center padding0"> | ||||
<span>{{$.i18n.Tr "repo.modelarts.computing_resources"}}</span> | |||||
<span>{{$.i18n.Tr "repo.modelarts.computing_resources"}}</span> | |||||
</div> --> | </div> --> | ||||
<div class="one wide column text center padding0"> | <div class="one wide column text center padding0"> | ||||
<span>{{$.i18n.Tr "repo.cloudbrain_creator"}}</span> | |||||
<span>{{$.i18n.Tr "repo.cloudbrain_creator"}}</span> | |||||
</div> | </div> | ||||
<div class="three wide column text center padding0"> | <div class="three wide column text center padding0"> | ||||
<span>{{$.i18n.Tr "repo.cloudbrain_operate"}}</span> | <span>{{$.i18n.Tr "repo.cloudbrain_operate"}}</span> | ||||
</div> | </div> | ||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
{{range .Tasks}} | {{range .Tasks}} | ||||
<div class="ui grid stackable item"> | <div class="ui grid stackable item"> | ||||
<div class="row"> | <div class="row"> | ||||
<!-- 任务名 --> | <!-- 任务名 --> | ||||
<div class="three wide column padding0"> | <div class="three wide column padding0"> | ||||
<a class="title" href="{{$.Link}}/{{.JobID}}" title="{{.DisplayJobName}}" style="font-size: 14px;"> | <a class="title" href="{{$.Link}}/{{.JobID}}" title="{{.DisplayJobName}}" style="font-size: 14px;"> | ||||
<span class="fitted" style="width: 90%;vertical-align: middle;">{{.DisplayJobName}}</span> | <span class="fitted" style="width: 90%;vertical-align: middle;">{{.DisplayJobName}}</span> | ||||
</a> | </a> | ||||
</div> | </div> | ||||
<!-- 模型版本 --> | <!-- 模型版本 --> | ||||
<!-- href="{{$.RepoLink}}/modelmanage/show_model_info?name={{.ModelName}}" --> | <!-- href="{{$.RepoLink}}/modelmanage/show_model_info?name={{.ModelName}}" --> | ||||
<div class="three wide column text center padding0"> | |||||
<a id="{{.JobName}}" class="goto_modelmanage" href="javascript:void(0);" data-variation="inverted" data-position="top center" data-content="{{$.i18n.Tr "repo.modelarts.infer_job.tooltip"}}" data-jobname={{.JobName}} data-modelname={{.ModelName}} data-version={{.ModelVersion}} data-repopath="{{$.RepoLink}}">{{.ModelName}} </a> <span style="font-size: 12px;">{{.ModelVersion}}</span> | |||||
<div class="three wide column text center padding0"> | |||||
<a id="{{.JobName}}" class="goto_modelmanage" href="javascript:void(0);" data-variation="inverted" data-position="top center" data-content="{{$.i18n.Tr "repo.modelarts.infer_job.tooltip"}}" data-jobname={{.JobName}} data-modelname={{.ModelName}} data-version={{.ModelVersion}} data-repopath="{{$.RepoLink}}">{{.ModelName}} </a> <span style="font-size: 12px;">{{.ModelVersion}}</span> | |||||
</div> | </div> | ||||
<!-- 任务状态 --> | <!-- 任务状态 --> | ||||
<div class="two wide column text center padding0" > | <div class="two wide column text center padding0" > | ||||
@@ -126,12 +126,12 @@ | |||||
<span style="font-size: 12px;" class="">{{TimeSinceUnix .Cloudbrain.CreatedUnix $.Lang}}</span> | <span style="font-size: 12px;" class="">{{TimeSinceUnix .Cloudbrain.CreatedUnix $.Lang}}</span> | ||||
</div> | </div> | ||||
<!-- 任务运行时间 --> | <!-- 任务运行时间 --> | ||||
<div class="two wide column text center padding0"> | |||||
<span style="font-size: 12px;" id="duration-{{.JobID}}">{{.TrainJobDuration}}</span> | |||||
<div class="two wide column text center padding0"> | |||||
<span style="font-size: 12px;" id="duration-{{.JobID}}">{{.TrainJobDuration}}</span> | |||||
</div> | </div> | ||||
<!-- 计算资源 --> | <!-- 计算资源 --> | ||||
<!-- <div class="two wide column text center padding0"> | <!-- <div class="two wide column text center padding0"> | ||||
<span style="font-size: 12px;">{{.ComputeResource}}</span> | |||||
<span style="font-size: 12px;">{{.ComputeResource}}</span> | |||||
</div> --> | </div> --> | ||||
<!-- 创建者 --> | <!-- 创建者 --> | ||||
<div class="one wide column text center padding0"> | <div class="one wide column text center padding0"> | ||||
@@ -205,18 +205,18 @@ | |||||
<div id="deletemodel"> | <div id="deletemodel"> | ||||
<div class="ui basic modal"> | <div class="ui basic modal"> | ||||
<div class="ui icon header"> | <div class="ui icon header"> | ||||
<i class="trash icon"></i> 删除任务 | |||||
<i class="trash icon"></i> {{.i18n.Tr "cloudbrain.delete_task"}} | |||||
</div> | </div> | ||||
<div class="content"> | <div class="content"> | ||||
<p>你确认删除该任务么?此任务一旦删除不可恢复。</p> | |||||
<p>{{.i18n.Tr "cloudbrain.task_delete_confirm"}}</p> | |||||
</div> | </div> | ||||
<div class="actions"> | <div class="actions"> | ||||
<div class="ui red basic inverted cancel button"> | <div class="ui red basic inverted cancel button"> | ||||
<i class="remove icon"></i> 取消操作 | |||||
<i class="remove icon"></i> {{.i18n.Tr "cloudbrain.operate_cancel"}} | |||||
</div> | </div> | ||||
<div class="ui green basic inverted ok button"> | <div class="ui green basic inverted ok button"> | ||||
<i class="checkmark icon"></i> 确定操作 | |||||
<i class="checkmark icon"></i> {{.i18n.Tr "cloudbrain.operate_confirm"}} | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -68,9 +68,9 @@ | |||||
<div class="required unite min_title inline field"> | <div class="required unite min_title inline field"> | ||||
<label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.job_name"}}</label> | <label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.job_name"}}</label> | ||||
<input style="width: 60%;" name="display_job_name" id="display_job_name" placeholder={{.i18n.Tr "repo.modelarts.train_job.job_name"}} value="{{.display_job_name}}" onkeyup="this.value=this.value.replace(/[, ]/g,'')" tabindex="3" autofocus required maxlength="64"> | <input style="width: 60%;" name="display_job_name" id="display_job_name" placeholder={{.i18n.Tr "repo.modelarts.train_job.job_name"}} value="{{.display_job_name}}" onkeyup="this.value=this.value.replace(/[, ]/g,'')" tabindex="3" autofocus required maxlength="64"> | ||||
<span class="tooltips" style="display: block;">请输入字母、数字、_和-,最长64个字符,且不能以中划线(-)结尾。</span> | |||||
<span class="tooltips" style="display: block;">{{.i18n.Tr "cloudbrain.job_name_rule"}}</span> | |||||
</div> | </div> | ||||
<div class="unite min_title inline field"> | <div class="unite min_title inline field"> | ||||
<label style="font-weight: normal;" for="description">{{.i18n.Tr "repo.modelarts.train_job.description"}}</label> | <label style="font-weight: normal;" for="description">{{.i18n.Tr "repo.modelarts.train_job.description"}}</label> | ||||
<textarea style="width: 80%;" id="description" name="description" rows="3" maxlength="255" placeholder={{.i18n.Tr "repo.modelarts.train_job.new_place"}} onchange="this.value=this.value.substring(0, 255)" onkeydown="this.value=this.value.substring(0, 255)" onkeyup="this.value=this.value.substring(0, 255)"></textarea> | <textarea style="width: 80%;" id="description" name="description" rows="3" maxlength="255" placeholder={{.i18n.Tr "repo.modelarts.train_job.new_place"}} onchange="this.value=this.value.substring(0, 255)" onkeydown="this.value=this.value.substring(0, 255)" onkeyup="this.value=this.value.substring(0, 255)"></textarea> | ||||
@@ -107,7 +107,7 @@ | |||||
<i class="dropdown icon"></i> | <i class="dropdown icon"></i> | ||||
<div class="menu" id="model_name_version"> | <div class="menu" id="model_name_version"> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="five wide field"> | <div class="five wide field"> | ||||
@@ -123,10 +123,10 @@ | |||||
<div class="menu" id="model_checkpoint"> | <div class="menu" id="model_checkpoint"> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<span > | <span > | ||||
<i class="question circle icon" data-content="模型文件位置存储在环境变量ckpt_url中。" data-position="top center" data-variation="inverted mini"></i> | |||||
<i class="question circle icon" data-content="{{.i18n.Tr "cloudbrain.model_file_path_rule"}}" data-position="top center" data-variation="inverted mini"></i> | |||||
</span> | </span> | ||||
</div> | </div> | ||||
<!-- AI引擎 --> | <!-- AI引擎 --> | ||||
@@ -171,17 +171,17 @@ | |||||
<!-- 数据集 --> | <!-- 数据集 --> | ||||
<div class="required unite min_title inline field"> | <div class="required unite min_title inline field"> | ||||
<label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.dataset"}}</label> | <label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.dataset"}}</label> | ||||
<select class="ui dropdown width35" id="trainjob_datasets" name="attachment" placeholder="选择数据集" required> | |||||
<select class="ui dropdown width35" id="trainjob_datasets" name="attachment" placeholder="{{.i18n.Tr "cloudbrain.select_dataset"}}" required> | |||||
{{if $.uuid}} | {{if $.uuid}} | ||||
<option name="attachment" value="{{$.uuid}}">{{$.datasetName}}</option> | <option name="attachment" value="{{$.uuid}}">{{$.datasetName}}</option> | ||||
{{end}} | {{end}} | ||||
{{range .attachments}} | {{range .attachments}} | ||||
<option value="">选择数据集</option> | |||||
<option value="">{{$.i18n.Tr "cloudbrain.select_dataset"}}</option> | |||||
<option name="attachment" value="{{.UUID}}">{{.Attachment.Name}}</option> | <option name="attachment" value="{{.UUID}}">{{.Attachment.Name}}</option> | ||||
{{end}} | {{end}} | ||||
</select> | </select> | ||||
<span> | <span> | ||||
<i class="question circle icon" data-content="数据集位置存储在环境变量data_url中。" data-position="top center" data-variation="inverted mini"></i> | |||||
<i class="question circle icon" data-content="{{.i18n.Tr "cloudbrain.dataset_path_rule"}}" data-position="top center" data-variation="inverted mini"></i> | |||||
</span> | </span> | ||||
</div> | </div> | ||||
<!-- 启动文件 --> | <!-- 启动文件 --> | ||||
@@ -195,9 +195,9 @@ | |||||
<span > | <span > | ||||
<i class="question circle icon" data-content={{.i18n.Tr "repo.modelarts.infer_job.boot_file_helper"}} data-position="top center" data-variation="inverted mini"></i> | <i class="question circle icon" data-content={{.i18n.Tr "repo.modelarts.infer_job.boot_file_helper"}} data-position="top center" data-variation="inverted mini"></i> | ||||
</span> | </span> | ||||
<a href="https://git.openi.org.cn/OpenIOSSG/MINIST_Example" target="_blank">查看样例</a> | |||||
<a href="https://git.openi.org.cn/OpenIOSSG/MINIST_Example" target="_blank">{{.i18n.Tr "cloudbrain.view_sample"}}</a> | |||||
</div> | </div> | ||||
<!-- 运行参数 --> | <!-- 运行参数 --> | ||||
<div class="inline unite min_title field"> | <div class="inline unite min_title field"> | ||||
<label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.run_parameter"}}</label> | <label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.run_parameter"}}</label> | ||||
@@ -222,7 +222,7 @@ | |||||
{{end}} | {{end}} | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="required field " style="display: none;"> | <div class="required field " style="display: none;"> | ||||
<label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.resource_pool"}}</label> | <label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.resource_pool"}}</label> | ||||
<select class="ui dropdown" id="trainjob_resource_pool" style='width:385px' name="pool_id"> | <select class="ui dropdown" id="trainjob_resource_pool" style='width:385px' name="pool_id"> | ||||
@@ -243,11 +243,11 @@ | |||||
<!-- 计算节点 --> | <!-- 计算节点 --> | ||||
<div class="inline required unite min_title field"> | <div class="inline required unite min_title field"> | ||||
<label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.amount_of_compute_node"}}</label> | <label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.amount_of_compute_node"}}</label> | ||||
<div class="ui labeled input" style="width: 5%;"> | <div class="ui labeled input" style="width: 5%;"> | ||||
<input style="border-radius: 0;text-align: center;" name="work_server_number" id="trainjob_work_server_num" tabindex="3" autofocus required maxlength="255" value="1" readonly> | <input style="border-radius: 0;text-align: center;" name="work_server_number" id="trainjob_work_server_num" tabindex="3" autofocus required maxlength="255" value="1" readonly> | ||||
</div> | </div> | ||||
<span class="tooltips" style="display: block;">推理输出路径存储在环境变量result_url中。</span> | |||||
<span class="tooltips" style="display: block;">{{.i18n.Tr "cloudbrain.inference_output_path_rule"}}</span> | |||||
</div> | </div> | ||||
<!-- 表单操作 --> | <!-- 表单操作 --> | ||||
<div class="inline unite min_title field"> | <div class="inline unite min_title field"> | ||||
@@ -255,7 +255,7 @@ | |||||
{{.i18n.Tr "repo.cloudbrain.new"}} | {{.i18n.Tr "repo.cloudbrain.new"}} | ||||
</button> | </button> | ||||
<a class="ui button" href="/">{{.i18n.Tr "repo.cloudbrain.cancel"}}</a> | <a class="ui button" href="/">{{.i18n.Tr "repo.cloudbrain.cancel"}}</a> | ||||
</div> | |||||
</div> | |||||
<!-- 模态框 --> | <!-- 模态框 --> | ||||
</form> | </form> | ||||
</div> | </div> | ||||
@@ -283,7 +283,7 @@ | |||||
$("#select_model").dropdown('set text',nameList[0]) | $("#select_model").dropdown('set text',nameList[0]) | ||||
$("#select_model").dropdown('set value',nameList[0],nameList[0]) | $("#select_model").dropdown('set value',nameList[0],nameList[0]) | ||||
} | } | ||||
$('#select_model').removeClass("loading") | $('#select_model').removeClass("loading") | ||||
}) | }) | ||||
// 根据选中的模型名称获取相应的模型版本 | // 根据选中的模型名称获取相应的模型版本 | ||||
@@ -323,7 +323,7 @@ | |||||
if(!element.IsDir && loadCheckpointFile.includes(ckptSuffix[ckptSuffix.length-1])){ | if(!element.IsDir && loadCheckpointFile.includes(ckptSuffix[ckptSuffix.length-1])){ | ||||
html += `<div class="item" data-value=${element.FileName}>${element.FileName}</div>` | html += `<div class="item" data-value=${element.FileName}>${element.FileName}</div>` | ||||
} | } | ||||
}) | }) | ||||
$('#model_checkpoint').append(html) | $('#model_checkpoint').append(html) | ||||
$("#select_model_checkpoint").removeClass("loading") | $("#select_model_checkpoint").removeClass("loading") | ||||
@@ -332,7 +332,7 @@ | |||||
$("#select_model_checkpoint").dropdown('set text',initVersionText) | $("#select_model_checkpoint").dropdown('set text',initVersionText) | ||||
$("#select_model_checkpoint").dropdown('set value',initVersionValue,initVersionText,$('#model_name_version div.item:first-child')) | $("#select_model_checkpoint").dropdown('set value',initVersionValue,initVersionText,$('#model_name_version div.item:first-child')) | ||||
}) | }) | ||||
$("input#ai_model_version").val(text) | $("input#ai_model_version").val(text) | ||||
$("input#ai_model_label").val(label) | $("input#ai_model_label").val(label) | ||||
@@ -348,15 +348,15 @@ | |||||
} | } | ||||
$('.question.circle.icon').hover(function(){ | $('.question.circle.icon').hover(function(){ | ||||
$(this).popup('show') | |||||
$(this).popup('show') | |||||
}); | }); | ||||
// 参数增加、删除、修改、保存 | // 参数增加、删除、修改、保存 | ||||
function Add_parameter(i){ | function Add_parameter(i){ | ||||
value = '<div class="two fields width84" id= "para'+ i +'">' + | value = '<div class="two fields width84" id= "para'+ i +'">' + | ||||
'<div class="field">' + | |||||
'<input type="text" name="shipping_first-name" required placeholder={{.i18n.Tr "repo.modelarts.train_job.parameter_name"}}> ' + | |||||
'</div> ' + | |||||
'<div class="field">' + | |||||
'<input type="text" name="shipping_first-name" required placeholder={{.i18n.Tr "repo.modelarts.train_job.parameter_name"}}> ' + | |||||
'</div> ' + | |||||
'<div class="field"> ' + | '<div class="field"> ' + | ||||
'<input type="text" name="shipping_last-name" required placeholder={{.i18n.Tr "repo.modelarts.train_job.parameter_value"}}>' + | '<input type="text" name="shipping_last-name" required placeholder={{.i18n.Tr "repo.modelarts.train_job.parameter_value"}}>' + | ||||
'</div>'+ | '</div>'+ | ||||
@@ -366,7 +366,7 @@ | |||||
'</span>' + | '</span>' + | ||||
'</div>' | '</div>' | ||||
$(".dynamic.field").append(value) | $(".dynamic.field").append(value) | ||||
} | |||||
} | |||||
$('#add_run_para').click(function(){ | $('#add_run_para').click(function(){ | ||||
var len = $(".dynamic.field .two.fields").length | var len = $(".dynamic.field .two.fields").length | ||||
@@ -459,7 +459,7 @@ | |||||
onSuccess: function(){ | onSuccess: function(){ | ||||
document.getElementById("mask").style.display = "block" | document.getElementById("mask").style.display = "block" | ||||
}, | }, | ||||
onFailure: function(e){ | |||||
onFailure: function(e){ | |||||
return false; | return false; | ||||
} | } | ||||
}) | }) | ||||
@@ -470,8 +470,8 @@ | |||||
} | } | ||||
} | } | ||||
$('.ui.create_train_job.green.button').click(function(e) { | $('.ui.create_train_job.green.button').click(function(e) { | ||||
send_run_para() | |||||
send_run_para() | |||||
get_name() | get_name() | ||||
validate() | validate() | ||||
}) | }) | ||||
</script> | |||||
</script> |
@@ -82,7 +82,7 @@ | |||||
vertical-align: inherit; | vertical-align: inherit; | ||||
} | } | ||||
.ti-text-form-label { | .ti-text-form-label { | ||||
padding-bottom: 20px; | padding-bottom: 20px; | ||||
padding-right: 20px; | padding-right: 20px; | ||||
color: #8a8e99; | color: #8a8e99; | ||||
@@ -152,7 +152,7 @@ td, th { | |||||
opacity: .45 !important; | opacity: .45 !important; | ||||
} | } | ||||
.pad20{ | .pad20{ | ||||
border:0px !important; | border:0px !important; | ||||
} | } | ||||
.model_file_bread{ | .model_file_bread{ | ||||
@@ -180,12 +180,12 @@ td, th { | |||||
{{with .task}} | {{with .task}} | ||||
<div class="content-pad" style="border: 1px solid #e2e2e2;margin-top: 24px;padding: 20px 60px 40px 60px;"> | <div class="content-pad" style="border: 1px solid #e2e2e2;margin-top: 24px;padding: 20px 60px 40px 60px;"> | ||||
<div class="ui pointing secondary menu" style="border-bottom: 1px solid rgba(34,36,38,.15);"> | <div class="ui pointing secondary menu" style="border-bottom: 1px solid rgba(34,36,38,.15);"> | ||||
<a class="active item" data-tab="first">{{$.i18n.Tr "repo.modelarts.train_job.config"}}</a> | <a class="active item" data-tab="first">{{$.i18n.Tr "repo.modelarts.train_job.config"}}</a> | ||||
<a class="item" data-tab="second" onclick="loadLog({{.VersionName}})">{{$.i18n.Tr "repo.modelarts.log"}}</a> | <a class="item" data-tab="second" onclick="loadLog({{.VersionName}})">{{$.i18n.Tr "repo.modelarts.log"}}</a> | ||||
<a class="item" data-tab="third" onclick="loadModelFile({{.VersionName}},'','','init')">{{$.i18n.Tr "repo.model_download"}}</a> | <a class="item" data-tab="third" onclick="loadModelFile({{.VersionName}},'','','init')">{{$.i18n.Tr "repo.model_download"}}</a> | ||||
</div> | </div> | ||||
<div class="ui tab active" data-tab="first"> | <div class="ui tab active" data-tab="first"> | ||||
<div style="padding-top: 10px;"> | <div style="padding-top: 10px;"> | ||||
<div class="tab_2_content"> | <div class="tab_2_content"> | ||||
@@ -218,7 +218,7 @@ td, th { | |||||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | <td class="ti-no-ng-animate ti-text-form-label text-width80"> | ||||
{{$.i18n.Tr "repo.modelarts.run_version"}} | {{$.i18n.Tr "repo.modelarts.run_version"}} | ||||
</td> | </td> | ||||
<td class="ti-text-form-content"> | <td class="ti-text-form-content"> | ||||
<div class="text-span text-span-w"> | <div class="text-span text-span-w"> | ||||
{{.VersionName}} | {{.VersionName}} | ||||
@@ -227,9 +227,9 @@ td, th { | |||||
</tr> --> | </tr> --> | ||||
<tr class="ti-no-ng-animate"> | <tr class="ti-no-ng-animate"> | ||||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | <td class="ti-no-ng-animate ti-text-form-label text-width80"> | ||||
{{$.i18n.Tr "repo.modelarts.train_job.start_time"}} | |||||
{{$.i18n.Tr "repo.modelarts.train_job.start_time"}} | |||||
</td> | </td> | ||||
<td class="ti-text-form-content"> | <td class="ti-text-form-content"> | ||||
<div class="text-span text-span-w"> | <div class="text-span text-span-w"> | ||||
<span style="font-size: 12px;" class="">{{TimeSinceUnix1 .CreatedUnix}}</span> | <span style="font-size: 12px;" class="">{{TimeSinceUnix1 .CreatedUnix}}</span> | ||||
@@ -238,9 +238,9 @@ td, th { | |||||
</tr> | </tr> | ||||
<tr class="ti-no-ng-animate"> | <tr class="ti-no-ng-animate"> | ||||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | <td class="ti-no-ng-animate ti-text-form-label text-width80"> | ||||
{{$.i18n.Tr "repo.modelarts.train_job.dura_time"}} | |||||
{{$.i18n.Tr "repo.modelarts.train_job.dura_time"}} | |||||
</td> | </td> | ||||
<td class="ti-text-form-content"> | <td class="ti-text-form-content"> | ||||
<div class="text-span text-span-w" id="{{.VersionName}}-duration"> | <div class="text-span text-span-w" id="{{.VersionName}}-duration"> | ||||
{{.TrainJobDuration}} | {{.TrainJobDuration}} | ||||
@@ -248,23 +248,23 @@ td, th { | |||||
</td> | </td> | ||||
</tr> | </tr> | ||||
<tr class="ti-no-ng-animate"> | <tr class="ti-no-ng-animate"> | ||||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | <td class="ti-no-ng-animate ti-text-form-label text-width80"> | ||||
{{$.i18n.Tr "repo.modelarts.train_job.AI_driver"}} | |||||
{{$.i18n.Tr "repo.modelarts.train_job.AI_driver"}} | |||||
</td> | </td> | ||||
<td class="ti-text-form-content"> | <td class="ti-text-form-content"> | ||||
<div class="text-span text-span-w"> | <div class="text-span text-span-w"> | ||||
{{.EngineName}} | {{.EngineName}} | ||||
</div> | </div> | ||||
</td> | </td> | ||||
</tr> | </tr> | ||||
<tr class="ti-no-ng-animate"> | <tr class="ti-no-ng-animate"> | ||||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | <td class="ti-no-ng-animate ti-text-form-label text-width80"> | ||||
{{$.i18n.Tr "repo.model.manage.description"}} | {{$.i18n.Tr "repo.model.manage.description"}} | ||||
</td> | </td> | ||||
<td class="ti-text-form-content"> | <td class="ti-text-form-content"> | ||||
<div class="text-span text-span-w" id="{{.VersionName}}-desc" style="width: 380px;"> | <div class="text-span text-span-w" id="{{.VersionName}}-desc" style="width: 380px;"> | ||||
{{if .Description}} | {{if .Description}} | ||||
@@ -279,7 +279,7 @@ td, th { | |||||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | <td class="ti-no-ng-animate ti-text-form-label text-width80"> | ||||
创建人 | 创建人 | ||||
</td> | </td> | ||||
<td class="ti-text-form-content"> | <td class="ti-text-form-content"> | ||||
<div class="text-span text-span-w" id="{{.VersionName}}-creator"> | <div class="text-span text-span-w" id="{{.VersionName}}-creator"> | ||||
{{$.userName}} | {{$.userName}} | ||||
@@ -288,7 +288,7 @@ td, th { | |||||
</tr> | </tr> | ||||
<tr class="ti-no-ng-animate"> | <tr class="ti-no-ng-animate"> | ||||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | <td class="ti-no-ng-animate ti-text-form-label text-width80"> | ||||
{{$.i18n.Tr "repo.modelarts.train_job.compute_node"}} | |||||
{{$.i18n.Tr "repo.modelarts.train_job.compute_node"}} | |||||
</td> | </td> | ||||
<td class="ti-text-form-content"> | <td class="ti-text-form-content"> | ||||
<div class="text-span text-span-w"> | <div class="text-span text-span-w"> | ||||
@@ -304,19 +304,19 @@ td, th { | |||||
<tbody class="ti-text-form"> | <tbody class="ti-text-form"> | ||||
<tr class="ti-no-ng-animate"> | <tr class="ti-no-ng-animate"> | ||||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | <td class="ti-no-ng-animate ti-text-form-label text-width80"> | ||||
{{$.i18n.Tr "repo.modelarts.infer_job_model"}} | |||||
{{$.i18n.Tr "repo.modelarts.infer_job_model"}} | |||||
</td> | </td> | ||||
<td class="ti-text-form-content"> | <td class="ti-text-form-content"> | ||||
<div class="text-span text-span-w"> | <div class="text-span text-span-w"> | ||||
<span>{{.ModelName}}</span> | <span>{{.ModelName}}</span> | ||||
<span style="color: #8a8e99">{{$.i18n.Tr "repo.modelarts.version"}}:</span><span>{{.ModelVersion}}</span> | <span style="color: #8a8e99">{{$.i18n.Tr "repo.modelarts.version"}}:</span><span>{{.ModelVersion}}</span> | ||||
</div> | </div> | ||||
</td> | </td> | ||||
</tr> | </tr> | ||||
<tr class="ti-no-ng-animate"> | <tr class="ti-no-ng-animate"> | ||||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | <td class="ti-no-ng-animate ti-text-form-label text-width80"> | ||||
{{$.i18n.Tr "repo.modelarts.infer_job_model_file"}} | |||||
{{$.i18n.Tr "repo.modelarts.infer_job_model_file"}} | |||||
</td> | </td> | ||||
<td class="ti-text-form-content"> | <td class="ti-text-form-content"> | ||||
<div class="text-span text-span-w"> | <div class="text-span text-span-w"> | ||||
@@ -328,10 +328,10 @@ td, th { | |||||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | <td class="ti-no-ng-animate ti-text-form-label text-width80"> | ||||
{{$.i18n.Tr "repo.modelarts.model_label"}} | {{$.i18n.Tr "repo.modelarts.model_label"}} | ||||
</td> | </td> | ||||
<td class="ti-text-form-content"> | <td class="ti-text-form-content"> | ||||
<div class="text-span text-span-w" id="{{.VersionName}}-labels"> | <div class="text-span text-span-w" id="{{.VersionName}}-labels"> | ||||
{{if .LabelName}} | {{if .LabelName}} | ||||
{{range $.labelName}} | {{range $.labelName}} | ||||
<a class="ui label" title="{{.}}">{{.}}</a> | <a class="ui label" title="{{.}}">{{.}}</a> | ||||
@@ -342,7 +342,7 @@ td, th { | |||||
</div> | </div> | ||||
</td> | </td> | ||||
</tr> | </tr> | ||||
<tr class="ti-no-ng-animate"> | <tr class="ti-no-ng-animate"> | ||||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | <td class="ti-no-ng-animate ti-text-form-label text-width80"> | ||||
{{$.i18n.Tr "repo.modelarts.code_version"}} | {{$.i18n.Tr "repo.modelarts.code_version"}} | ||||
@@ -358,7 +358,7 @@ td, th { | |||||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | <td class="ti-no-ng-animate ti-text-form-label text-width80"> | ||||
{{$.i18n.Tr "repo.modelarts.train_job.start_file"}} | {{$.i18n.Tr "repo.modelarts.train_job.start_file"}} | ||||
</td> | </td> | ||||
<td class="ti-text-form-content"> | <td class="ti-text-form-content"> | ||||
<div class="text-span text-span-w"> | <div class="text-span text-span-w"> | ||||
{{.BootFile}} | {{.BootFile}} | ||||
@@ -367,9 +367,9 @@ td, th { | |||||
</tr> | </tr> | ||||
<tr class="ti-no-ng-animate"> | <tr class="ti-no-ng-animate"> | ||||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | <td class="ti-no-ng-animate ti-text-form-label text-width80"> | ||||
{{$.i18n.Tr "repo.modelarts.infer_dataset"}} | |||||
{{$.i18n.Tr "repo.modelarts.infer_dataset"}} | |||||
</td> | </td> | ||||
<td class="ti-text-form-content"> | <td class="ti-text-form-content"> | ||||
<div class="text-span text-span-w"> | <div class="text-span text-span-w"> | ||||
{{.DatasetName}} | {{.DatasetName}} | ||||
@@ -378,9 +378,9 @@ td, th { | |||||
</tr> | </tr> | ||||
<tr class="ti-no-ng-animate"> | <tr class="ti-no-ng-animate"> | ||||
<td class="ti-no-ng-animate ti-text-form-label text-width80" > | <td class="ti-no-ng-animate ti-text-form-label text-width80" > | ||||
{{$.i18n.Tr "repo.modelarts.train_job.run_parameter"}} | |||||
{{$.i18n.Tr "repo.modelarts.train_job.run_parameter"}} | |||||
</td> | </td> | ||||
<td class="ti-text-form-content"> | <td class="ti-text-form-content"> | ||||
<div class="text-span text-span-w" title="{{.Parameters}}"> | <div class="text-span text-span-w" title="{{.Parameters}}"> | ||||
{{if .Parameters}} | {{if .Parameters}} | ||||
@@ -393,9 +393,9 @@ td, th { | |||||
</tr> | </tr> | ||||
<tr class="ti-no-ng-animate"> | <tr class="ti-no-ng-animate"> | ||||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | <td class="ti-no-ng-animate ti-text-form-label text-width80"> | ||||
{{$.i18n.Tr "repo.modelarts.train_job.standard"}} | |||||
{{$.i18n.Tr "repo.modelarts.train_job.standard"}} | |||||
</td> | </td> | ||||
<td class="ti-text-form-content"> | <td class="ti-text-form-content"> | ||||
<div class="text-span text-span-w"> | <div class="text-span text-span-w"> | ||||
{{.FlavorName}} | {{.FlavorName}} | ||||
@@ -407,10 +407,10 @@ td, th { | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="ui tab" data-tab="second"> | <div class="ui tab" data-tab="second"> | ||||
<div> | <div> | ||||
<div class="ui message message{{.VersionName}}" style="display: none;"> | <div class="ui message message{{.VersionName}}" style="display: none;"> | ||||
@@ -421,9 +421,9 @@ td, th { | |||||
<input type="hidden" name="start_line" value> | <input type="hidden" name="start_line" value> | ||||
<pre id="log_file{{.VersionName}}"></pre> | <pre id="log_file{{.VersionName}}"></pre> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="ui tab" data-tab="third"> | <div class="ui tab" data-tab="third"> | ||||
<input type="hidden" name="model{{.VersionName}}" value="-1"> | <input type="hidden" name="model{{.VersionName}}" value="-1"> | ||||
@@ -434,34 +434,34 @@ td, th { | |||||
</div> | </div> | ||||
<div id="dir_list{{.VersionName}}"> | <div id="dir_list{{.VersionName}}"> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
{{end}} | {{end}} | ||||
</div> | </div> | ||||
<!-- 确认模态框 --> | <!-- 确认模态框 --> | ||||
<div id="deletemodel"> | <div id="deletemodel"> | ||||
<div class="ui basic modal"> | <div class="ui basic modal"> | ||||
<div class="ui icon header"> | <div class="ui icon header"> | ||||
<i class="trash icon"></i> 删除任务 | |||||
<i class="trash icon"></i> {{.i18n.Tr "cloudbrain.delete_task"}} | |||||
</div> | </div> | ||||
<div class="content"> | <div class="content"> | ||||
<p>你确认删除该任务么?此任务一旦删除不可恢复。</p> | |||||
<p>{{.i18n.Tr "cloudbrain.task_delete_confirm"}}</p> | |||||
</div> | </div> | ||||
<div class="actions"> | <div class="actions"> | ||||
<div class="ui red basic inverted cancel button"> | <div class="ui red basic inverted cancel button"> | ||||
<i class="remove icon"></i> 取消操作 | |||||
<i class="remove icon"></i> {{.i18n.Tr "cloudbrain.operate_cancel"}} | |||||
</div> | </div> | ||||
<div class="ui green basic inverted ok button"> | <div class="ui green basic inverted ok button"> | ||||
<i class="checkmark icon"></i> 确定操作 | |||||
<i class="checkmark icon"></i> {{.i18n.Tr "cloudbrain.operate_confirm"}} | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -493,7 +493,7 @@ function loadLog(version_name){ | |||||
}); | }); | ||||
} | } | ||||
function logScroll(version_name) { | function logScroll(version_name) { | ||||
let container = document.querySelector(`#log${version_name}`) | let container = document.querySelector(`#log${version_name}`) | ||||
let scrollTop = container.scrollTop | let scrollTop = container.scrollTop | ||||
let scrollHeight = container.scrollHeight | let scrollHeight = container.scrollHeight | ||||
@@ -506,7 +506,7 @@ function logScroll(version_name) { | |||||
$(`.message${version_name} #header`).text('您已翻阅至日志底部') | $(`.message${version_name} #header`).text('您已翻阅至日志底部') | ||||
$(`.message${version_name}`).css('display', 'block') | $(`.message${version_name}`).css('display', 'block') | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
$(`.message${version_name}`).css('display', 'none') | |||||
$(`.message${version_name}`).css('display', 'none') | |||||
}, 1000) | }, 1000) | ||||
}else{ | }else{ | ||||
if(end_line===data.EndLine){ | if(end_line===data.EndLine){ | ||||
@@ -514,9 +514,9 @@ function logScroll(version_name) { | |||||
} | } | ||||
else{ | else{ | ||||
$(`#log${version_name} input[name=end_line]`).val(data.EndLine) | $(`#log${version_name} input[name=end_line]`).val(data.EndLine) | ||||
$(`#log${version_name}`).append('<pre>' + data.Content) | |||||
$(`#log${version_name}`).append('<pre>' + data.Content) | |||||
} | } | ||||
} | } | ||||
}).fail(function(err) { | }).fail(function(err) { | ||||
console.log(err); | console.log(err); | ||||
@@ -529,7 +529,7 @@ function logScroll(version_name) { | |||||
$(`.message${version_name} #header`).text('您已翻阅至日志顶部') | $(`.message${version_name} #header`).text('您已翻阅至日志顶部') | ||||
$(`.message${version_name}`).css('display', 'block') | $(`.message${version_name}`).css('display', 'block') | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
$(`.message${version_name}`).css('display', 'none') | |||||
$(`.message${version_name}`).css('display', 'none') | |||||
}, 1000) | }, 1000) | ||||
}else{ | }else{ | ||||
$(`#log${version_name} input[name=start_line]`).val(data.StartLine) //如果变动就改变所对应的值 | $(`#log${version_name} input[name=start_line]`).val(data.StartLine) //如果变动就改变所对应的值 | ||||
@@ -557,7 +557,7 @@ function loadModelFile(version_name,parents,filename,init){ | |||||
filename = filename || '' | filename = filename || '' | ||||
init = init || '' | init = init || '' | ||||
$.get(`/api/v1/repos/${userName}/${repoPath}/modelarts/inference-job/${jobID}/result_list?version_name=${version_name}&parentDir=${parents}`, (data) => { | $.get(`/api/v1/repos/${userName}/${repoPath}/modelarts/inference-job/${jobID}/result_list?version_name=${version_name}&parentDir=${parents}`, (data) => { | ||||
$(`#dir_list${version_name}`).empty() | |||||
$(`#dir_list${version_name}`).empty() | |||||
renderDir(data,version_name) | renderDir(data,version_name) | ||||
if(init==="init"){ | if(init==="init"){ | ||||
$(`input[name=model${version_name}]`).val("") | $(`input[name=model${version_name}]`).val("") | ||||
@@ -565,7 +565,7 @@ function loadModelFile(version_name,parents,filename,init){ | |||||
$(`#file_breadcrumb${version_name}`).empty() | $(`#file_breadcrumb${version_name}`).empty() | ||||
let htmlBread = "" | let htmlBread = "" | ||||
htmlBread += `<div class='active section'>result</div>` | htmlBread += `<div class='active section'>result</div>` | ||||
htmlBread += "<div class='divider'> / </div>" | |||||
htmlBread += "<div class='divider'> / </div>" | |||||
$(`#file_breadcrumb${version_name}`).append(htmlBread) | $(`#file_breadcrumb${version_name}`).append(htmlBread) | ||||
}else{ | }else{ | ||||
renderBrend(version_name,parents,filename,init) | renderBrend(version_name,parents,filename,init) | ||||
@@ -573,7 +573,7 @@ function loadModelFile(version_name,parents,filename,init){ | |||||
}).fail(function(err) { | }).fail(function(err) { | ||||
console.log(err,version_name); | console.log(err,version_name); | ||||
}); | }); | ||||
} | } | ||||
function renderBrend(version_name,parents,filename,init){ | function renderBrend(version_name,parents,filename,init){ | ||||
if(init=="folder"){ | if(init=="folder"){ | ||||
@@ -586,9 +586,9 @@ function renderBrend(version_name,parents,filename,init){ | |||||
}else{ | }else{ | ||||
$(`#file_breadcrumb${version_name} .active.section`).replaceWith(`<a class='section' onclick="loadModelFile('${version_name}','${parents1}','${filename1}')">${sectionName}</a>`) | $(`#file_breadcrumb${version_name} .active.section`).replaceWith(`<a class='section' onclick="loadModelFile('${version_name}','${parents1}','${filename1}')">${sectionName}</a>`) | ||||
} | } | ||||
htmlBrend += `<div class='active section'>${filename}</div>` | htmlBrend += `<div class='active section'>${filename}</div>` | ||||
htmlBrend += "<div class='divider'> / </div>" | |||||
htmlBrend += "<div class='divider'> / </div>" | |||||
$(`#file_breadcrumb${version_name}`).append(htmlBrend) | $(`#file_breadcrumb${version_name}`).append(htmlBrend) | ||||
$(`input[name=model${version_name}]`).val(parents) | $(`input[name=model${version_name}]`).val(parents) | ||||
$(`input[name=modelback${version_name}]`).val(filename) | $(`input[name=modelback${version_name}]`).val(filename) | ||||
@@ -599,7 +599,7 @@ function renderBrend(version_name,parents,filename,init){ | |||||
$(`#file_breadcrumb${version_name} a.section:contains(${filename})`).replaceWith(`<div class='active section'>${filename}</div>`) | $(`#file_breadcrumb${version_name} a.section:contains(${filename})`).replaceWith(`<div class='active section'>${filename}</div>`) | ||||
$(`#file_breadcrumb${version_name} div.section:contains(${filename})`).append("<div class='divider'> / </div>") | $(`#file_breadcrumb${version_name} div.section:contains(${filename})`).append("<div class='divider'> / </div>") | ||||
} | } | ||||
} | } | ||||
function renderDir(data,version_name){ | function renderDir(data,version_name){ | ||||
let html="" | let html="" | ||||
@@ -638,14 +638,14 @@ function renderDir(data,version_name){ | |||||
}else{ | }else{ | ||||
html += "<span class='truncate has-emoji'>"+ `${dirs_size}` + "</span>" | html += "<span class='truncate has-emoji'>"+ `${dirs_size}` + "</span>" | ||||
} | } | ||||
html += "</td>" | html += "</td>" | ||||
html += "<td class='text right age three wide'>" | html += "<td class='text right age three wide'>" | ||||
html += "<span class='truncate has-emoji'>" + data.Dirs[i].ModTime + "</span>" | html += "<span class='truncate has-emoji'>" + data.Dirs[i].ModTime + "</span>" | ||||
html += "</td>" | html += "</td>" | ||||
html += "</tr>" | html += "</tr>" | ||||
} | } | ||||
html += "</tbody>" | html += "</tbody>" | ||||
html += "</table>" | html += "</table>" | ||||
@@ -655,4 +655,4 @@ function renderDir(data,version_name){ | |||||
html += "</div>" | html += "</div>" | ||||
$(`#dir_list${version_name}`).append(html) | $(`#dir_list${version_name}`).append(html) | ||||
} | } | ||||
</script> | |||||
</script> |
@@ -30,7 +30,7 @@ | |||||
<div class="ui attached segment"> | <div class="ui attached segment"> | ||||
<!-- <br> --> | <!-- <br> --> | ||||
<div class="inline required field"> | <div class="inline required field"> | ||||
<label>计算资源</label> | |||||
<label>{{.i18n.Tr "cloudbrain.compute_resource"}}</label> | |||||
<div class="ui blue small menu compact selectcloudbrain"> | <div class="ui blue small menu compact selectcloudbrain"> | ||||
<a class="item" href="{{.RepoLink}}/cloudbrain/create"> | <a class="item" href="{{.RepoLink}}/cloudbrain/create"> | ||||
<svg class="svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16"> | <svg class="svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16"> | ||||
@@ -47,13 +47,13 @@ | |||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="inline required field"> | <div class="inline required field"> | ||||
<label>任务名称</label> | |||||
<label>{{.i18n.Tr "cloudbrain.task_name"}}</label> | |||||
<input name="display_job_name" id="cloudbrain_job_name" placeholder="任务名称" value="{{.display_job_name}}" tabindex="3" autofocus required maxlength="255" onkeyup="this.value=this.value.replace(/[, ]/g,'')"> | <input name="display_job_name" id="cloudbrain_job_name" placeholder="任务名称" value="{{.display_job_name}}" tabindex="3" autofocus required maxlength="255" onkeyup="this.value=this.value.replace(/[, ]/g,'')"> | ||||
</div> | </div> | ||||
<div class="inline required field"> | <div class="inline required field"> | ||||
<label>镜像</label> | |||||
<select id="cloudbrain_image" class="ui search dropdown" placeholder="选择镜像" style='width:385px' name="image_id"> | |||||
<label>{{.i18n.Tr "cloudbrain.mirror"}}</label> | |||||
<select id="cloudbrain_image" class="ui search dropdown" placeholder="{{.i18n.Tr "cloudbrain.choose_mirror"}}" style='width:385px' name="image_id"> | |||||
{{range .images}} | {{range .images}} | ||||
<option name="image_id" value="{{.Id}}">{{.Value}}</option> | <option name="image_id" value="{{.Id}}">{{.Value}}</option> | ||||
{{end}} | {{end}} | ||||
@@ -61,8 +61,8 @@ | |||||
</div> | </div> | ||||
<div class="inline field"> | <div class="inline field"> | ||||
<label>数据集</label> | |||||
<input type="text" list="cloudbrain_dataset" placeholder="选择数据集" name="" id="answerInput" autofocus maxlength="36"> | |||||
<label>{{.i18n.Tr "cloudbrain.dataset"}}</label> | |||||
<input type="text" list="cloudbrain_dataset" placeholder="{{.i18n.Tr "cloudbrain.select_dataset"}}" name="" id="answerInput" autofocus maxlength="36"> | |||||
<datalist id="cloudbrain_dataset" class="ui search" style='width:385px' name="attachment"> | <datalist id="cloudbrain_dataset" class="ui search" style='width:385px' name="attachment"> | ||||
{{range .attachments}} | {{range .attachments}} | ||||
<option name="attachment" data-value="{{.UUID}}">{{.Attachment.Name}}</option> | <option name="attachment" data-value="{{.UUID}}">{{.Attachment.Name}}</option> | ||||
@@ -80,7 +80,7 @@ | |||||
<input name="job_type" id="cloudbrain_job_type" value="{{.notebook_type}}" tabindex="3" disabled autofocus required maxlength="255" readonly="readonly"> | <input name="job_type" id="cloudbrain_job_type" value="{{.notebook_type}}" tabindex="3" disabled autofocus required maxlength="255" readonly="readonly"> | ||||
</div> --> | </div> --> | ||||
<div class="inline required field"> | <div class="inline required field"> | ||||
<label>规格</label> | |||||
<label>{{.i18n.Tr "cloudbrain.specification"}}</label> | |||||
<select id="cloudbrain_flavor" class="ui search dropdown" placeholder="选择规格" style='width:385px' name="flavor"> | <select id="cloudbrain_flavor" class="ui search dropdown" placeholder="选择规格" style='width:385px' name="flavor"> | ||||
{{range .flavors}} | {{range .flavors}} | ||||
<option name="flavor" value="{{.Value}}">{{.Desc}}</option> | <option name="flavor" value="{{.Value}}">{{.Desc}}</option> | ||||
@@ -93,7 +93,7 @@ | |||||
<input name="dataset_path" id="cloudbrain_dataset_path" value="{{.dataset_path}}" tabindex="3" disabled autofocus required maxlength="255" readonly="readonly"> | <input name="dataset_path" id="cloudbrain_dataset_path" value="{{.dataset_path}}" tabindex="3" disabled autofocus required maxlength="255" readonly="readonly"> | ||||
</div> --> | </div> --> | ||||
<div class="inline field"> | <div class="inline field"> | ||||
<label>描述</label> | |||||
<label>{{.i18n.Tr "cloudbrain.description"}}</label> | |||||
<input name="description" id="cloudbrain_description" tabindex="3" autofocus maxlength="255"> | <input name="description" id="cloudbrain_description" tabindex="3" autofocus maxlength="255"> | ||||
</div> | </div> | ||||
<div class="inline field"> | <div class="inline field"> | ||||
@@ -118,8 +118,8 @@ | |||||
form.onsubmit = function(e){ | form.onsubmit = function(e){ | ||||
let value_task = $("input[name='display_job_name']").val() | let value_task = $("input[name='display_job_name']").val() | ||||
let re = /^[a-z0-9][a-z0-9-_]{1,36}$/ | let re = /^[a-z0-9][a-z0-9-_]{1,36}$/ | ||||
let flag = re.test(value_task) | let flag = re.test(value_task) | ||||
if(!flag){ | if(!flag){ | ||||
@@ -128,12 +128,12 @@ | |||||
$('#messageInfo p').text(str) | $('#messageInfo p').text(str) | ||||
return false | return false | ||||
} | } | ||||
let min_value_task = value_task.toLowerCase() | let min_value_task = value_task.toLowerCase() | ||||
$("input[name='display_job_name']").attr("value",min_value_task) | $("input[name='display_job_name']").attr("value",min_value_task) | ||||
document.getElementById("mask").style.display = "block" | document.getElementById("mask").style.display = "block" | ||||
} | } | ||||
// 点击按钮后遮罩层显示 | // 点击按钮后遮罩层显示 | ||||
// function showmask() { | // function showmask() { | ||||
@@ -169,10 +169,10 @@ | |||||
for (let i=0;i<options.length;i++){ | for (let i=0;i<options.length;i++){ | ||||
var option = options[i] | var option = options[i] | ||||
if(option.innerText===inputValue){ | if(option.innerText===inputValue){ | ||||
hiddenInput.value = option.getAttribute('data-value'); | hiddenInput.value = option.getAttribute('data-value'); | ||||
break | |||||
break | |||||
} | } | ||||
} | } | ||||
}) | }) | ||||
</script> | |||||
</script> |
@@ -39,7 +39,7 @@ | |||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="column right aligned"> | <div class="column right aligned"> | ||||
{{if .Permission.CanWrite $.UnitTypeCloudBrain}} | |||||
{{if .Permission.CanWrite $.UnitTypeCloudBrain}} | |||||
<a class="ui green button" href="{{.RepoLink}}/modelarts/train-job/create">{{$.i18n.Tr "repo.modelarts.train_job.new_train"}}</a> | <a class="ui green button" href="{{.RepoLink}}/modelarts/train-job/create">{{$.i18n.Tr "repo.modelarts.train_job.new_train"}}</a> | ||||
{{else}} | {{else}} | ||||
<a class="ui disabled button" >{{$.i18n.Tr "repo.modelarts.train_job.new_train"}}</a> | <a class="ui disabled button" >{{$.i18n.Tr "repo.modelarts.train_job.new_train"}}</a> | ||||
@@ -49,13 +49,13 @@ | |||||
{{if eq 0 (len .Tasks)}} | {{if eq 0 (len .Tasks)}} | ||||
<div class="ui placeholder segment bgtask-none"> | <div class="ui placeholder segment bgtask-none"> | ||||
<div class="ui icon header bgtask-header-pic"></div> | <div class="ui icon header bgtask-header-pic"></div> | ||||
<div class="bgtask-content-header">未创建过训练任务</div> | |||||
<div class="bgtask-content-header">{{$.i18n.Tr "repo.train_task_not_created"}}</div> | |||||
<div class="bgtask-content"> | <div class="bgtask-content"> | ||||
{{if $.RepoIsEmpty}} | {{if $.RepoIsEmpty}} | ||||
<div class="bgtask-content-txt">代码版本:您还没有初始化代码仓库,请先<a href="{{.RepoLink}}">创建代码版本;</a></div> | |||||
<div class="bgtask-content-txt">{{$.i18n.Tr "repo.repo_not_initialized" .RepoLink | Safe}}</div> | |||||
{{end}} | {{end}} | ||||
<div class="bgtask-content-txt">数据集:云脑1提供 CPU / GPU 资源,云脑2提供 Ascend NPU 资源,调试使用的数据集也需要上传到对应的环境;</div> | |||||
<div class="bgtask-content-txt">使用说明:可以参考启智AI协作平台<a href="https://git.openi.org.cn/zeizei/OpenI_Learning">小白训练营课程。</a></div> | |||||
<div class="bgtask-content-txt">{{$.i18n.Tr "repo.dataset_desc"}}</div> | |||||
<div class="bgtask-content-txt">{{$.i18n.Tr "repo.platform_instructions" | Safe}}</div> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
{{else}} | {{else}} | ||||
@@ -85,31 +85,31 @@ | |||||
<span>{{$.i18n.Tr "repo.cloudbrain_status_runtime"}}</span> | <span>{{$.i18n.Tr "repo.cloudbrain_status_runtime"}}</span> | ||||
</div> | </div> | ||||
<div class="two wide column text center padding0"> | <div class="two wide column text center padding0"> | ||||
<span>{{$.i18n.Tr "repo.modelarts.computing_resources"}}</span> | |||||
<span>{{$.i18n.Tr "repo.modelarts.computing_resources"}}</span> | |||||
</div> | </div> | ||||
<div class="one wide column text center padding0"> | <div class="one wide column text center padding0"> | ||||
<span>{{$.i18n.Tr "repo.cloudbrain_creator"}}</span> | |||||
<span>{{$.i18n.Tr "repo.cloudbrain_creator"}}</span> | |||||
</div> | </div> | ||||
<div class="three wide column text center padding0"> | <div class="three wide column text center padding0"> | ||||
<span>{{$.i18n.Tr "repo.cloudbrain_operate"}}</span> | <span>{{$.i18n.Tr "repo.cloudbrain_operate"}}</span> | ||||
</div> | </div> | ||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
{{range .Tasks}} | {{range .Tasks}} | ||||
<div class="ui grid stackable item"> | <div class="ui grid stackable item"> | ||||
<div class="row"> | <div class="row"> | ||||
<!-- 任务名 --> | <!-- 任务名 --> | ||||
<div class="three wide column padding0"> | <div class="three wide column padding0"> | ||||
<a class="title" href="{{$.Link}}/{{.JobID}}" title="{{.DisplayJobName}}" style="font-size: 14px;"> | <a class="title" href="{{$.Link}}/{{.JobID}}" title="{{.DisplayJobName}}" style="font-size: 14px;"> | ||||
<span class="fitted" style="width: 90%;vertical-align: middle;">{{.DisplayJobName}}</span> | <span class="fitted" style="width: 90%;vertical-align: middle;">{{.DisplayJobName}}</span> | ||||
</a> | </a> | ||||
</div> | </div> | ||||
<!-- 版本数量 --> | <!-- 版本数量 --> | ||||
<div class="one wide column text center padding0"> | |||||
<span style="font-size: 12px;">{{.VersionCount}} </span> | |||||
<div class="one wide column text center padding0"> | |||||
<span style="font-size: 12px;">{{.VersionCount}} </span> | |||||
</div> | </div> | ||||
<!-- 任务状态 --> | <!-- 任务状态 --> | ||||
<div class="two wide column padding0" style="padding-left: 2.2rem !important;"> | <div class="two wide column padding0" style="padding-left: 2.2rem !important;"> | ||||
@@ -122,12 +122,12 @@ | |||||
<span style="font-size: 12px;" class="">{{TimeSinceUnix .Cloudbrain.CreatedUnix $.Lang}}</span> | <span style="font-size: 12px;" class="">{{TimeSinceUnix .Cloudbrain.CreatedUnix $.Lang}}</span> | ||||
</div> | </div> | ||||
<!-- 任务运行时间 --> | <!-- 任务运行时间 --> | ||||
<div class="two wide column text center padding0"> | |||||
<span style="font-size: 12px;" id="duration-{{.JobID}}">{{.TrainJobDuration}}</span> | |||||
<div class="two wide column text center padding0"> | |||||
<span style="font-size: 12px;" id="duration-{{.JobID}}">{{.TrainJobDuration}}</span> | |||||
</div> | </div> | ||||
<!-- 计算资源 --> | <!-- 计算资源 --> | ||||
<div class="two wide column text center padding0"> | <div class="two wide column text center padding0"> | ||||
<span style="font-size: 12px;">{{.ComputeResource}}</span> | |||||
<span style="font-size: 12px;">{{.ComputeResource}}</span> | |||||
</div> | </div> | ||||
<!-- 创建者 --> | <!-- 创建者 --> | ||||
<div class="one wide column text center padding0"> | <div class="one wide column text center padding0"> | ||||
@@ -188,21 +188,21 @@ | |||||
<div id="deletemodel"> | <div id="deletemodel"> | ||||
<div class="ui basic modal"> | <div class="ui basic modal"> | ||||
<div class="ui icon header"> | <div class="ui icon header"> | ||||
<i class="trash icon"></i> 删除任务 | |||||
<i class="trash icon"></i> {{.i18n.Tr "cloudbrain.delete_task"}} | |||||
</div> | </div> | ||||
<div class="content"> | <div class="content"> | ||||
<p>你确认删除该任务么?此任务一旦删除不可恢复。</p> | |||||
<p>{{.i18n.Tr "cloudbrain.task_delete_confirm"}}</p> | |||||
</div> | </div> | ||||
<div class="actions"> | <div class="actions"> | ||||
<div class="ui red basic inverted cancel button"> | <div class="ui red basic inverted cancel button"> | ||||
<i class="remove icon"></i> 取消操作 | |||||
<i class="remove icon"></i> {{.i18n.Tr "cloudbrain.operate_cancel"}} | |||||
</div> | </div> | ||||
<div class="ui green basic inverted ok button"> | <div class="ui green basic inverted ok button"> | ||||
<i class="checkmark icon"></i> 确定操作 | |||||
<i class="checkmark icon"></i> {{.i18n.Tr "cloudbrain.operate_confirm"}} | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
{{template "base/footer" .}} | |||||
{{template "base/footer" .}} |
@@ -81,9 +81,9 @@ | |||||
<div class="required unite min_title inline field"> | <div class="required unite min_title inline field"> | ||||
<label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.job_name"}}</label> | <label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.job_name"}}</label> | ||||
<input style="width: 60%;" name="display_job_name" id="display_job_name" placeholder={{.i18n.Tr "repo.modelarts.train_job.job_name"}} value="{{.display_job_name}}" tabindex="3" onkeyup="this.value=this.value.replace(/[, ]/g,'')" autofocus required maxlength="64"> | <input style="width: 60%;" name="display_job_name" id="display_job_name" placeholder={{.i18n.Tr "repo.modelarts.train_job.job_name"}} value="{{.display_job_name}}" tabindex="3" onkeyup="this.value=this.value.replace(/[, ]/g,'')" autofocus required maxlength="64"> | ||||
<span class="tooltips" style="display: block;">请输入字母、数字、_和-,最长64个字符,且不能以中划线(-)结尾。</span> | |||||
<span class="tooltips" style="display: block;">{{.i18n.Tr "cloudbrain.job_name_rule"}}</span> | |||||
</div> | </div> | ||||
<div class="unite min_title inline field"> | <div class="unite min_title inline field"> | ||||
<label style="font-weight: normal;" for="description">{{.i18n.Tr "repo.modelarts.train_job.description"}} </label> | <label style="font-weight: normal;" for="description">{{.i18n.Tr "repo.modelarts.train_job.description"}} </label> | ||||
<textarea style="width: 80%;" id="description" name="description" rows="3" maxlength="255" placeholder={{.i18n.Tr "repo.modelarts.train_job.new_place"}} onchange="this.value=this.value.substring(0, 255)" onkeydown="this.value=this.value.substring(0, 255)" onkeyup="this.value=this.value.substring(0, 255)"></textarea> | <textarea style="width: 80%;" id="description" name="description" rows="3" maxlength="255" placeholder={{.i18n.Tr "repo.modelarts.train_job.new_place"}} onchange="this.value=this.value.substring(0, 255)" onkeydown="this.value=this.value.substring(0, 255)" onkeyup="this.value=this.value.substring(0, 255)"></textarea> | ||||
@@ -91,7 +91,7 @@ | |||||
<div class="ui divider"></div> | <div class="ui divider"></div> | ||||
<h4 class="unite title ui header ">{{.i18n.Tr "repo.modelarts.train_job.parameter_setting"}}:</h4> | <h4 class="unite title ui header ">{{.i18n.Tr "repo.modelarts.train_job.parameter_setting"}}:</h4> | ||||
<div class="required unite min_title inline field"> | <div class="required unite min_title inline field"> | ||||
<label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.code_version"}}</label> | <label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.code_version"}}</label> | ||||
@@ -147,22 +147,22 @@ | |||||
<span> | <span> | ||||
<i class="question circle icon link" data-content={{.i18n.Tr "repo.modelarts.train_job.boot_file_helper"}} data-position="right center" data-variation="mini"></i> | <i class="question circle icon link" data-content={{.i18n.Tr "repo.modelarts.train_job.boot_file_helper"}} data-position="right center" data-variation="mini"></i> | ||||
</span> | </span> | ||||
<a href="https://git.openi.org.cn/OpenIOSSG/MINIST_Example" target="_blank">查看样例</a> | |||||
<a href="https://git.openi.org.cn/OpenIOSSG/MINIST_Example" target="_blank">{{.i18n.Tr "cloudbrain.view_sample"}}</a> | |||||
</div> | </div> | ||||
<div class="required unite min_title inline field"> | <div class="required unite min_title inline field"> | ||||
<label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.dataset"}}</label> | <label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.dataset"}}</label> | ||||
<select class="ui dropdown width80" id="trainjob_datasets" name="attachment" placeholder="选择数据集"> | |||||
<select class="ui dropdown width80" id="trainjob_datasets" name="attachment" placeholder="{{.i18n.Tr "cloudbrain.select_dataset"}}"> | |||||
{{if $.uuid}} | {{if $.uuid}} | ||||
<option name="attachment" value="{{$.uuid}}">{{$.datasetName}}</option> | <option name="attachment" value="{{$.uuid}}">{{$.datasetName}}</option> | ||||
{{end}} | {{end}} | ||||
{{range .attachments}} | {{range .attachments}} | ||||
<option value="">选择数据集</option> | |||||
<option value="">{{$.i18n.Tr "cloudbrain.select_dataset"}}</option> | |||||
<option name="attachment" value="{{.UUID}}">{{.Attachment.Name}}</option> | <option name="attachment" value="{{.UUID}}">{{.Attachment.Name}}</option> | ||||
{{end}} | {{end}} | ||||
</select> | </select> | ||||
<span class="tooltips">数据集位置存储在环境变量data_url中,训练输出路径存储在环境变量train_url中。</span> | |||||
<span class="tooltips">{{.i18n.Tr "cloudbrain.dataset_path_rule"}}</span> | |||||
</div> | </div> | ||||
<div class="inline unite min_title field"> | <div class="inline unite min_title field"> | ||||
<label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.run_parameter"}}</label> | <label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.run_parameter"}}</label> | ||||
<span id="add_run_para" style="margin-left: 0.5rem;cursor:pointer;color: rgba(3, 102, 214, 100);font-size: 14px;line-height: 26px;font-family: SourceHanSansSC-medium;"><i class="plus square outline icon"></i>{{.i18n.Tr "repo.modelarts.train_job.add_run_parameter"}}</span> | <span id="add_run_para" style="margin-left: 0.5rem;cursor:pointer;color: rgba(3, 102, 214, 100);font-size: 14px;line-height: 26px;font-family: SourceHanSansSC-medium;"><i class="plus square outline icon"></i>{{.i18n.Tr "repo.modelarts.train_job.add_run_parameter"}}</span> | ||||
@@ -223,24 +223,24 @@ | |||||
</div> | </div> | ||||
<div class="inline required unite min_title field"> | <div class="inline required unite min_title field"> | ||||
<label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.amount_of_compute_node"}}</label> | <label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.amount_of_compute_node"}}</label> | ||||
<div class="ui labeled input" style="width: 5%;"> | <div class="ui labeled input" style="width: 5%;"> | ||||
<input style="border-radius: 0;text-align: center;" name="work_server_number" id="trainjob_work_server_num" tabindex="3" autofocus required maxlength="255" value="1" readonly> | <input style="border-radius: 0;text-align: center;" name="work_server_number" id="trainjob_work_server_num" tabindex="3" autofocus required maxlength="255" value="1" readonly> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="inline unite min_title field"> | <div class="inline unite min_title field"> | ||||
<button class="ui create_train_job green button"> | <button class="ui create_train_job green button"> | ||||
{{.i18n.Tr "repo.cloudbrain.new"}} | {{.i18n.Tr "repo.cloudbrain.new"}} | ||||
</button> | </button> | ||||
<a class="ui button" href="/">{{.i18n.Tr "repo.cloudbrain.cancel"}}</a> | <a class="ui button" href="/">{{.i18n.Tr "repo.cloudbrain.cancel"}}</a> | ||||
</div> | </div> | ||||
<!-- 模态框 --> | <!-- 模态框 --> | ||||
</form> | </form> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -272,9 +272,9 @@ | |||||
// 参数增加、删除、修改、保存 | // 参数增加、删除、修改、保存 | ||||
function Add_parameter(i){ | function Add_parameter(i){ | ||||
value = '<div class="two fields width85" id= "para'+ i +'">' + | value = '<div class="two fields width85" id= "para'+ i +'">' + | ||||
'<div class="field">' + | |||||
'<input type="text" name="shipping_first-name" required placeholder={{.i18n.Tr "repo.modelarts.train_job.parameter_name"}}> ' + | |||||
'</div> ' + | |||||
'<div class="field">' + | |||||
'<input type="text" name="shipping_first-name" required placeholder={{.i18n.Tr "repo.modelarts.train_job.parameter_name"}}> ' + | |||||
'</div> ' + | |||||
'<div class="field"> ' + | '<div class="field"> ' + | ||||
'<input type="text" name="shipping_last-name" required placeholder={{.i18n.Tr "repo.modelarts.train_job.parameter_value"}}>' + | '<input type="text" name="shipping_last-name" required placeholder={{.i18n.Tr "repo.modelarts.train_job.parameter_value"}}>' + | ||||
'</div>'+ | '</div>'+ | ||||
@@ -284,7 +284,7 @@ | |||||
'</span>' + | '</span>' + | ||||
'</div>' | '</div>' | ||||
$(".dynamic.field").append(value) | $(".dynamic.field").append(value) | ||||
} | |||||
} | |||||
$('#add_run_para').click(function(){ | $('#add_run_para').click(function(){ | ||||
var len = $(".dynamic.field .two.fields").length | var len = $(".dynamic.field .two.fields").length | ||||
@@ -310,7 +310,7 @@ | |||||
$(this).find('input').each(function(){ | $(this).find('input').each(function(){ | ||||
parameters.push($(this).text()) | parameters.push($(this).text()) | ||||
}) | }) | ||||
}); | }); | ||||
$('.ui.parameter.modal') | $('.ui.parameter.modal') | ||||
.modal('hide'); | .modal('hide'); | ||||
@@ -353,9 +353,9 @@ | |||||
onChange: function(){ | onChange: function(){ | ||||
if ($('.ui.save.checkbox').checkbox('is checked')){ | if ($('.ui.save.checkbox').checkbox('is checked')){ | ||||
$('#save_para').removeClass("disabled") | $('#save_para').removeClass("disabled") | ||||
}else{ | }else{ | ||||
$('#save_para').addClass("disabled") | |||||
$('#save_para').addClass("disabled") | |||||
} | } | ||||
} | } | ||||
}); | }); | ||||
@@ -421,7 +421,7 @@ | |||||
// $('.ui.page.dimmer').dimmer('show') | // $('.ui.page.dimmer').dimmer('show') | ||||
document.getElementById("mask").style.display = "block" | document.getElementById("mask").style.display = "block" | ||||
}, | }, | ||||
onFailure: function(e){ | |||||
onFailure: function(e){ | |||||
return false; | return false; | ||||
} | } | ||||
}) | }) | ||||
@@ -453,6 +453,6 @@ | |||||
$('.ui.create_train_job.green.button').click(function(e) { | $('.ui.create_train_job.green.button').click(function(e) { | ||||
get_name() | get_name() | ||||
send_run_para() | send_run_para() | ||||
validate() | |||||
validate() | |||||
}) | }) | ||||
</script> | |||||
</script> |
@@ -2,11 +2,11 @@ | |||||
<div class="modelarts"> | <div class="modelarts"> | ||||
<div class="repository release modelarts train_job view container"> | <div class="repository release modelarts train_job view container"> | ||||
{{template "repo/header" .}} | {{template "repo/header" .}} | ||||
<div class="ui container"> | |||||
<div class="ui container"> | |||||
<div class="ui grid"> | <div class="ui grid"> | ||||
{{template "repo/modelarts/navbar" .}} | |||||
{{template "repo/modelarts/navbar" .}} | |||||
<!-- 右侧 --> | <!-- 右侧 --> | ||||
<div class="ui thirteen wide column"> | |||||
<div class="ui thirteen wide column"> | |||||
<div class="ui column stackable grid"> | <div class="ui column stackable grid"> | ||||
<div class="column"> | <div class="column"> | ||||
<h2>{{.i18n.Tr "repo.modelarts.train_job_para_admin"}}</h2> | <h2>{{.i18n.Tr "repo.modelarts.train_job_para_admin"}}</h2> | ||||
@@ -29,7 +29,7 @@ | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<!-- 任务展示 --> | <!-- 任务展示 --> | ||||
<div class="dataset list"> | <div class="dataset list"> | ||||
{{range .Tasks}} | {{range .Tasks}} | ||||
@@ -38,12 +38,12 @@ | |||||
<!-- 任务名 --> | <!-- 任务名 --> | ||||
<div class="five wide column"> | <div class="five wide column"> | ||||
<a class="title" href="{{$.Link}}/{{.JobID}}"> | <a class="title" href="{{$.Link}}/{{.JobID}}"> | ||||
<span class="fitted">{{.JobName}}</span> | <span class="fitted">{{.JobName}}</span> | ||||
</a> | </a> | ||||
</div> | </div> | ||||
<!-- 引擎类型--> | |||||
<!-- 引擎类型--> | |||||
<div class="four wide column job-status" id="{{.JobID}}" data-repopath="{{$.RepoRelPath}}" data-jobid="{{.JobID}}"> | <div class="four wide column job-status" id="{{.JobID}}" data-repopath="{{$.RepoRelPath}}" data-jobid="{{.JobID}}"> | ||||
{{.Status}} | {{.Status}} | ||||
</div> | </div> | ||||
@@ -59,7 +59,7 @@ | |||||
<span class="fitted">编辑</span> | <span class="fitted">编辑</span> | ||||
</a> | </a> | ||||
</div> | </div> | ||||
<!-- 删除 --> | <!-- 删除 --> | ||||
<div class="two wide column"> | <div class="two wide column"> | ||||
<div class="ui text center clipboard"> | <div class="ui text center clipboard"> | ||||
@@ -69,7 +69,7 @@ | |||||
</form> | </form> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
{{end}} {{template "base/paginate" .}} | {{end}} {{template "base/paginate" .}} | ||||
@@ -78,7 +78,7 @@ | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | |||||
</div> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -86,18 +86,18 @@ | |||||
<div id="deletemodel"> | <div id="deletemodel"> | ||||
<div class="ui basic modal"> | <div class="ui basic modal"> | ||||
<div class="ui icon header"> | <div class="ui icon header"> | ||||
<i class="trash icon"></i> 删除任务 | |||||
<i class="trash icon"></i> {{.i18n.Tr "cloudbrain.delete_task"}} | |||||
</div> | </div> | ||||
<div class="content"> | <div class="content"> | ||||
<p>你确认删除该任务么?此任务一旦删除不可恢复。</p> | |||||
<p>{{.i18n.Tr "cloudbrain.task_delete_confirm"}}</p> | |||||
</div> | </div> | ||||
<div class="actions"> | <div class="actions"> | ||||
<div class="ui red basic inverted cancel button"> | <div class="ui red basic inverted cancel button"> | ||||
<i class="remove icon"></i> 取消操作 | |||||
<i class="remove icon"></i> {{.i18n.Tr "cloudbrain.operate_cancel"}} | |||||
</div> | </div> | ||||
<div class="ui green basic inverted ok button"> | <div class="ui green basic inverted ok button"> | ||||
<i class="checkmark icon"></i> 确定操作 | |||||
<i class="checkmark icon"></i> {{.i18n.Tr "cloudbrain.operate_confirm"}} | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -105,7 +105,7 @@ | |||||
</div> | </div> | ||||
{{template "base/footer" .}} | {{template "base/footer" .}} | ||||
<script> | |||||
<script> | |||||
// 删除时用户确认 | // 删除时用户确认 | ||||
function assertDelete(obj) { | function assertDelete(obj) { | ||||
if (obj.style.color == "rgb(204, 204, 204)") { | if (obj.style.color == "rgb(204, 204, 204)") { | ||||
@@ -82,7 +82,7 @@ | |||||
vertical-align: inherit; | vertical-align: inherit; | ||||
} | } | ||||
.ti-text-form-label { | .ti-text-form-label { | ||||
padding-bottom: 20px; | padding-bottom: 20px; | ||||
padding-right: 20px; | padding-right: 20px; | ||||
color: #8a8e99; | color: #8a8e99; | ||||
@@ -152,7 +152,7 @@ td, th { | |||||
opacity: .45 !important; | opacity: .45 !important; | ||||
} | } | ||||
.pad20{ | .pad20{ | ||||
border:0px !important; | border:0px !important; | ||||
} | } | ||||
.model_file_bread{ | .model_file_bread{ | ||||
@@ -213,7 +213,7 @@ td, th { | |||||
{{else}} | {{else}} | ||||
<a class="ti-action-menu-item disabled" id="{{.VersionName}}-stop" onclick="stopVersion({{.VersionName}})">{{$.i18n.Tr "repo.stop"}}</a> | <a class="ti-action-menu-item disabled" id="{{.VersionName}}-stop" onclick="stopVersion({{.VersionName}})">{{$.i18n.Tr "repo.stop"}}</a> | ||||
{{end}} | {{end}} | ||||
{{if .CanDel}} | {{if .CanDel}} | ||||
<a class="ti-action-menu-item" onclick="deleteVersion({{.VersionName}})" style="color: #FF4D4F;">{{$.i18n.Tr "repo.delete"}}</a> | <a class="ti-action-menu-item" onclick="deleteVersion({{.VersionName}})" style="color: #FF4D4F;">{{$.i18n.Tr "repo.delete"}}</a> | ||||
@@ -222,8 +222,8 @@ td, th { | |||||
{{end}} | {{end}} | ||||
</div> | </div> | ||||
<div class="ac-display-inblock title_text acc-margin-bottom"> | <div class="ac-display-inblock title_text acc-margin-bottom"> | ||||
<span class="cti-mgRight-sm">{{TimeSinceUnix1 .Cloudbrain.CreatedUnix}}</span> | |||||
<span class="cti-mgRight-sm">{{TimeSinceUnix1 .Cloudbrain.CreatedUnix}}</span> | |||||
<span class="cti-mgRight-sm"> {{$.i18n.Tr "repo.modelarts.current_version"}}:{{.VersionName}}</span> | <span class="cti-mgRight-sm"> {{$.i18n.Tr "repo.modelarts.current_version"}}:{{.VersionName}}</span> | ||||
<span class="cti-mgRight-sm"> {{$.i18n.Tr "repo.modelarts.parent_version"}}:{{.PreVersionName}}</span> | <span class="cti-mgRight-sm"> {{$.i18n.Tr "repo.modelarts.parent_version"}}:{{.PreVersionName}}</span> | ||||
<span class="cti-mgRight-sm">{{$.i18n.Tr "repo.modelarts.status"}}: | <span class="cti-mgRight-sm">{{$.i18n.Tr "repo.modelarts.status"}}: | ||||
@@ -242,7 +242,7 @@ td, th { | |||||
<div class="{{if eq $k 0}}active{{end}} content"> | <div class="{{if eq $k 0}}active{{end}} content"> | ||||
<div class="content-pad"> | <div class="content-pad"> | ||||
<div class="ui pointing secondary menu" style="border-bottom: 1px solid rgba(34,36,38,.15);"> | <div class="ui pointing secondary menu" style="border-bottom: 1px solid rgba(34,36,38,.15);"> | ||||
<a class="active item" data-tab="first{{$k}}">{{$.i18n.Tr "repo.modelarts.train_job.config"}}</a> | <a class="active item" data-tab="first{{$k}}">{{$.i18n.Tr "repo.modelarts.train_job.config"}}</a> | ||||
<a class="item" data-tab="second{{$k}}" onclick="loadLog({{.VersionName}})">{{$.i18n.Tr "repo.modelarts.log"}}</a> | <a class="item" data-tab="second{{$k}}" onclick="loadLog({{.VersionName}})">{{$.i18n.Tr "repo.modelarts.log"}}</a> | ||||
<a class="item" data-tab="third{{$k}}" onclick="loadModelFile({{.VersionName}},'','','init')">{{$.i18n.Tr "repo.model_download"}}</a> | <a class="item" data-tab="third{{$k}}" onclick="loadModelFile({{.VersionName}},'','','init')">{{$.i18n.Tr "repo.model_download"}}</a> | ||||
@@ -279,7 +279,7 @@ td, th { | |||||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | <td class="ti-no-ng-animate ti-text-form-label text-width80"> | ||||
{{$.i18n.Tr "repo.modelarts.run_version"}} | {{$.i18n.Tr "repo.modelarts.run_version"}} | ||||
</td> | </td> | ||||
<td class="ti-text-form-content"> | <td class="ti-text-form-content"> | ||||
<div class="text-span text-span-w"> | <div class="text-span text-span-w"> | ||||
{{.VersionName}} | {{.VersionName}} | ||||
@@ -288,9 +288,9 @@ td, th { | |||||
</tr> | </tr> | ||||
<tr class="ti-no-ng-animate"> | <tr class="ti-no-ng-animate"> | ||||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | <td class="ti-no-ng-animate ti-text-form-label text-width80"> | ||||
{{$.i18n.Tr "repo.modelarts.train_job.start_time"}} | |||||
{{$.i18n.Tr "repo.modelarts.train_job.start_time"}} | |||||
</td> | </td> | ||||
<td class="ti-text-form-content"> | <td class="ti-text-form-content"> | ||||
<div class="text-span text-span-w"> | <div class="text-span text-span-w"> | ||||
<span style="font-size: 12px;" class="">{{TimeSinceUnix1 .Cloudbrain.CreatedUnix}}</span> | <span style="font-size: 12px;" class="">{{TimeSinceUnix1 .Cloudbrain.CreatedUnix}}</span> | ||||
@@ -299,9 +299,9 @@ td, th { | |||||
</tr> | </tr> | ||||
<tr class="ti-no-ng-animate"> | <tr class="ti-no-ng-animate"> | ||||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | <td class="ti-no-ng-animate ti-text-form-label text-width80"> | ||||
{{$.i18n.Tr "repo.modelarts.train_job.dura_time"}} | |||||
{{$.i18n.Tr "repo.modelarts.train_job.dura_time"}} | |||||
</td> | </td> | ||||
<td class="ti-text-form-content"> | <td class="ti-text-form-content"> | ||||
<div class="text-span text-span-w" id="{{.VersionName}}-duration"> | <div class="text-span text-span-w" id="{{.VersionName}}-duration"> | ||||
{{.TrainJobDuration}} | {{.TrainJobDuration}} | ||||
@@ -310,9 +310,9 @@ td, th { | |||||
</tr> | </tr> | ||||
<tr class="ti-no-ng-animate"> | <tr class="ti-no-ng-animate"> | ||||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | <td class="ti-no-ng-animate ti-text-form-label text-width80"> | ||||
{{$.i18n.Tr "repo.modelarts.train_job.standard"}} | |||||
{{$.i18n.Tr "repo.modelarts.train_job.standard"}} | |||||
</td> | </td> | ||||
<td class="ti-text-form-content"> | <td class="ti-text-form-content"> | ||||
<div class="text-span text-span-w"> | <div class="text-span text-span-w"> | ||||
{{.FlavorName}} | {{.FlavorName}} | ||||
@@ -321,7 +321,7 @@ td, th { | |||||
</tr> | </tr> | ||||
<tr class="ti-no-ng-animate"> | <tr class="ti-no-ng-animate"> | ||||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | <td class="ti-no-ng-animate ti-text-form-label text-width80"> | ||||
{{$.i18n.Tr "repo.modelarts.train_job.compute_node"}} | |||||
{{$.i18n.Tr "repo.modelarts.train_job.compute_node"}} | |||||
</td> | </td> | ||||
<td class="ti-text-form-content"> | <td class="ti-text-form-content"> | ||||
<div class="text-span text-span-w"> | <div class="text-span text-span-w"> | ||||
@@ -337,7 +337,7 @@ td, th { | |||||
<tbody class="ti-text-form"> | <tbody class="ti-text-form"> | ||||
<tr class="ti-no-ng-animate"> | <tr class="ti-no-ng-animate"> | ||||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | <td class="ti-no-ng-animate ti-text-form-label text-width80"> | ||||
{{$.i18n.Tr "repo.modelarts.train_job.AI_driver"}} | |||||
{{$.i18n.Tr "repo.modelarts.train_job.AI_driver"}} | |||||
</td> | </td> | ||||
<td class="ti-text-form-content"> | <td class="ti-text-form-content"> | ||||
<div class="text-span text-span-w"> | <div class="text-span text-span-w"> | ||||
@@ -349,7 +349,7 @@ td, th { | |||||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | <td class="ti-no-ng-animate ti-text-form-label text-width80"> | ||||
{{$.i18n.Tr "repo.modelarts.code_version"}} | {{$.i18n.Tr "repo.modelarts.code_version"}} | ||||
</td> | </td> | ||||
<td class="ti-text-form-content"> | <td class="ti-text-form-content"> | ||||
<div class="text-span text-span-w"> | <div class="text-span text-span-w"> | ||||
{{.BranchName}} | {{.BranchName}} | ||||
@@ -360,7 +360,7 @@ td, th { | |||||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | <td class="ti-no-ng-animate ti-text-form-label text-width80"> | ||||
{{$.i18n.Tr "repo.modelarts.train_job.start_file"}} | {{$.i18n.Tr "repo.modelarts.train_job.start_file"}} | ||||
</td> | </td> | ||||
<td class="ti-text-form-content"> | <td class="ti-text-form-content"> | ||||
<div class="text-span text-span-w"> | <div class="text-span text-span-w"> | ||||
{{.BootFile}} | {{.BootFile}} | ||||
@@ -369,9 +369,9 @@ td, th { | |||||
</tr> | </tr> | ||||
<tr class="ti-no-ng-animate"> | <tr class="ti-no-ng-animate"> | ||||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | <td class="ti-no-ng-animate ti-text-form-label text-width80"> | ||||
{{$.i18n.Tr "repo.modelarts.train_job.train_dataset"}} | |||||
{{$.i18n.Tr "repo.modelarts.train_job.train_dataset"}} | |||||
</td> | </td> | ||||
<td class="ti-text-form-content"> | <td class="ti-text-form-content"> | ||||
<div class="text-span text-span-w"> | <div class="text-span text-span-w"> | ||||
{{.DatasetName}} | {{.DatasetName}} | ||||
@@ -380,9 +380,9 @@ td, th { | |||||
</tr> | </tr> | ||||
<tr class="ti-no-ng-animate"> | <tr class="ti-no-ng-animate"> | ||||
<td class="ti-no-ng-animate ti-text-form-label text-width80" > | <td class="ti-no-ng-animate ti-text-form-label text-width80" > | ||||
{{$.i18n.Tr "repo.modelarts.train_job.run_parameter"}} | |||||
{{$.i18n.Tr "repo.modelarts.train_job.run_parameter"}} | |||||
</td> | </td> | ||||
<td class="ti-text-form-content"> | <td class="ti-text-form-content"> | ||||
<div class="text-span text-span-w" title="{{.Parameters}}"> | <div class="text-span text-span-w" title="{{.Parameters}}"> | ||||
{{.Parameters}} | {{.Parameters}} | ||||
@@ -392,9 +392,9 @@ td, th { | |||||
</tr> | </tr> | ||||
<tr class="ti-no-ng-animate"> | <tr class="ti-no-ng-animate"> | ||||
<td class="ti-no-ng-animate ti-text-form-label text-width80"> | <td class="ti-no-ng-animate ti-text-form-label text-width80"> | ||||
{{$.i18n.Tr "repo.modelarts.train_job.description"}} | |||||
{{$.i18n.Tr "repo.modelarts.train_job.description"}} | |||||
</td> | </td> | ||||
<td class="ti-text-form-content"> | <td class="ti-text-form-content"> | ||||
<div class="text-span text-span-w" title="{{.Cloudbrain.Description}}"> | <div class="text-span text-span-w" title="{{.Cloudbrain.Description}}"> | ||||
{{.Cloudbrain.Description}} | {{.Cloudbrain.Description}} | ||||
@@ -406,7 +406,7 @@ td, th { | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="ui tab" data-tab="second{{$k}}"> | <div class="ui tab" data-tab="second{{$k}}"> | ||||
@@ -419,9 +419,9 @@ td, th { | |||||
<input type="hidden" name="start_line" value> | <input type="hidden" name="start_line" value> | ||||
<pre id="log_file{{.VersionName}}"></pre> | <pre id="log_file{{.VersionName}}"></pre> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="ui tab" data-tab="third{{$k}}"> | <div class="ui tab" data-tab="third{{$k}}"> | ||||
<input type="hidden" name="model{{.VersionName}}" value="-1"> | <input type="hidden" name="model{{.VersionName}}" value="-1"> | ||||
@@ -432,7 +432,7 @@ td, th { | |||||
</div> | </div> | ||||
<div id="dir_list{{.VersionName}}"> | <div id="dir_list{{.VersionName}}"> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -445,18 +445,18 @@ td, th { | |||||
<div id="deletemodel"> | <div id="deletemodel"> | ||||
<div class="ui basic modal"> | <div class="ui basic modal"> | ||||
<div class="ui icon header"> | <div class="ui icon header"> | ||||
<i class="trash icon"></i> 删除任务 | |||||
<i class="trash icon"></i> {{.i18n.Tr "cloudbrain.delete_task"}} | |||||
</div> | </div> | ||||
<div class="content"> | <div class="content"> | ||||
<p>你确认删除该任务么?此任务一旦删除不可恢复。</p> | |||||
<p>{{.i18n.Tr "cloudbrain.task_delete_confirm"}}</p> | |||||
</div> | </div> | ||||
<div class="actions"> | <div class="actions"> | ||||
<div class="ui red basic inverted cancel button"> | <div class="ui red basic inverted cancel button"> | ||||
<i class="remove icon"></i> 取消操作 | |||||
<i class="remove icon"></i> {{.i18n.Tr "cloudbrain.operate_cancel"}} | |||||
</div> | </div> | ||||
<div class="ui green basic inverted ok button"> | <div class="ui green basic inverted ok button"> | ||||
<i class="checkmark icon"></i> 确定操作 | |||||
<i class="checkmark icon"></i> {{.i18n.Tr "cloudbrain.operate_confirm"}} | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -474,19 +474,19 @@ td, th { | |||||
{{$.CsrfTokenHtml}} | {{$.CsrfTokenHtml}} | ||||
<input type="hidden" name="trainTaskCreate" value="true"> | <input type="hidden" name="trainTaskCreate" value="true"> | ||||
<div class="two inline fields "> | |||||
<div class="two inline fields "> | |||||
<div class="required ten wide field"> | <div class="required ten wide field"> | ||||
<label style="margin-left: -23px;">选择训练任务</label> | <label style="margin-left: -23px;">选择训练任务</label> | ||||
<input type="hidden" class="width83" id="JobId" name="JobId" readonly required> | <input type="hidden" class="width83" id="JobId" name="JobId" readonly required> | ||||
<input class="width83" id="JobName" readonly required> | <input class="width83" id="JobName" readonly required> | ||||
</div> | </div> | ||||
<div class="required six widde field"> | <div class="required six widde field"> | ||||
<label>版本</label> | <label>版本</label> | ||||
<input class="width70" id="VersionName" name="VersionName" readonly required> | <input class="width70" id="VersionName" name="VersionName" readonly required> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="required inline field" id="modelname"> | <div class="required inline field" id="modelname"> | ||||
<label>模型名称</label> | <label>模型名称</label> | ||||
<input style="width: 45%;" id="name" name="Name" required maxlength="25" onkeyup="this.value=this.value.replace(/[, ]/g,'')"> | <input style="width: 45%;" id="name" name="Name" required maxlength="25" onkeyup="this.value=this.value.replace(/[, ]/g,'')"> | ||||
@@ -503,7 +503,7 @@ td, th { | |||||
<label for="description">模型描述</label> | <label for="description">模型描述</label> | ||||
<textarea style="width: 83%;margin-left: 7px;" id="Description" name="Description" rows="3" maxlength="255" placeholder='{{.i18n.Tr "repo.modelarts.train_job.new_place"}}' onchange="this.value=this.value.substring(0, 255)" onkeydown="this.value=this.value.substring(0, 255)" onkeyup="this.value=this.value.substring(0, 256)"></textarea> | <textarea style="width: 83%;margin-left: 7px;" id="Description" name="Description" rows="3" maxlength="255" placeholder='{{.i18n.Tr "repo.modelarts.train_job.new_place"}}' onchange="this.value=this.value.substring(0, 255)" onkeydown="this.value=this.value.substring(0, 255)" onkeyup="this.value=this.value.substring(0, 256)"></textarea> | ||||
</div> | </div> | ||||
<div class="inline field" style="margin-left: 75px;"> | <div class="inline field" style="margin-left: 75px;"> | ||||
<button onclick="createModel()" type="button" class="ui create_train_job green button" style="position: absolute;"> | <button onclick="createModel()" type="button" class="ui create_train_job green button" style="position: absolute;"> | ||||
{{.i18n.Tr "repo.model.manage.sava_model"}} | {{.i18n.Tr "repo.model.manage.sava_model"}} | ||||
@@ -514,8 +514,8 @@ td, th { | |||||
<button class="ui button cancel" >{{.i18n.Tr "repo.cloudbrain.cancel"}}</button> | <button class="ui button cancel" >{{.i18n.Tr "repo.cloudbrain.cancel"}}</button> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -529,7 +529,7 @@ td, th { | |||||
$(document).ready(function(){ | $(document).ready(function(){ | ||||
$('.secondary.menu .item').tab(); | $('.secondary.menu .item').tab(); | ||||
}); | }); | ||||
let userName | let userName | ||||
let repoPath | let repoPath | ||||
let jobID | let jobID | ||||
@@ -562,7 +562,7 @@ td, th { | |||||
$('input[name="JobId"]').val(obj.JobID) | $('input[name="JobId"]').val(obj.JobID) | ||||
$('input[name="VersionName"]').val(obj.VersionName).addClass('model_disabled') | $('input[name="VersionName"]').val(obj.VersionName).addClass('model_disabled') | ||||
$('.ui.dimmer').css({"background-color":"rgb(136, 136, 136,0.7)"}) | $('.ui.dimmer').css({"background-color":"rgb(136, 136, 136,0.7)"}) | ||||
createModelName() | |||||
createModelName() | |||||
}, | }, | ||||
onHide:function(){ | onHide:function(){ | ||||
document.getElementById("formId").reset(); | document.getElementById("formId").reset(); | ||||
@@ -595,7 +595,7 @@ td, th { | |||||
$("#mask").css({"display":"none","z-index":"1"}) | $("#mask").css({"display":"none","z-index":"1"}) | ||||
} | } | ||||
}) | }) | ||||
} | } | ||||
function createModelName(){ | function createModelName(){ | ||||
let repoName = location.pathname.split('/')[2] | let repoName = location.pathname.split('/')[2] | ||||
@@ -627,9 +627,9 @@ td, th { | |||||
// return | // return | ||||
// } | // } | ||||
let status = $(`#${versionname}-status-span`).text() | let status = $(`#${versionname}-status-span`).text() | ||||
if(['IMAGE_FAILED','SUBMIT_FAILED','DELETE_FAILED','KILLED','COMPLETED','FAILED','CANCELED','LOST','START_FAILED'].includes(status)){ | if(['IMAGE_FAILED','SUBMIT_FAILED','DELETE_FAILED','KILLED','COMPLETED','FAILED','CANCELED','LOST','START_FAILED'].includes(status)){ | ||||
return | |||||
return | |||||
} | } | ||||
let stopArray=["KILLED","FAILED","START_FAILED","KILLING","COMPLETED"] | let stopArray=["KILLED","FAILED","START_FAILED","KILLING","COMPLETED"] | ||||
$.get(`/api/v1/repos/${repoPath}/modelarts/train-job/${jobID}?version_name=${versionname}`, (data) => { | $.get(`/api/v1/repos/${repoPath}/modelarts/train-job/${jobID}?version_name=${versionname}`, (data) => { | ||||
@@ -682,7 +682,7 @@ td, th { | |||||
}else{ | }else{ | ||||
$('#accordion'+version_name).remove() | $('#accordion'+version_name).remove() | ||||
} | } | ||||
}).fail(function(err) { | }).fail(function(err) { | ||||
console.log(err); | console.log(err); | ||||
}); | }); | ||||
@@ -695,7 +695,7 @@ td, th { | |||||
} | } | ||||
}) | }) | ||||
.modal('show') | .modal('show') | ||||
} | } | ||||
function stopVersion(version_name){ | function stopVersion(version_name){ | ||||
stopBubbling(arguments.callee.caller.arguments[0]) | stopBubbling(arguments.callee.caller.arguments[0]) | ||||
@@ -705,7 +705,7 @@ td, th { | |||||
refreshStatus(version_name) | refreshStatus(version_name) | ||||
} | } | ||||
}).fail(function(err) { | }).fail(function(err) { | ||||
console.log(err); | |||||
console.log(err); | |||||
}); | }); | ||||
} | } | ||||
function loadLog(version_name){ | function loadLog(version_name){ | ||||
@@ -722,7 +722,7 @@ td, th { | |||||
filename = filename || '' | filename = filename || '' | ||||
init = init || '' | init = init || '' | ||||
$.get(`/api/v1/repos/${userName}/${repoPath}/modelarts/train-job/${jobID}/model_list?version_name=${version_name}&parentDir=${parents}`, (data) => { | $.get(`/api/v1/repos/${userName}/${repoPath}/modelarts/train-job/${jobID}/model_list?version_name=${version_name}&parentDir=${parents}`, (data) => { | ||||
$(`#dir_list${version_name}`).empty() | |||||
$(`#dir_list${version_name}`).empty() | |||||
renderDir(data,version_name) | renderDir(data,version_name) | ||||
if(init==="init"){ | if(init==="init"){ | ||||
$(`input[name=model${version_name}]`).val("") | $(`input[name=model${version_name}]`).val("") | ||||
@@ -730,7 +730,7 @@ td, th { | |||||
$(`#file_breadcrumb${version_name}`).empty() | $(`#file_breadcrumb${version_name}`).empty() | ||||
let htmlBread = "" | let htmlBread = "" | ||||
htmlBread += `<div class='active section'>${version_name}</div>` | htmlBread += `<div class='active section'>${version_name}</div>` | ||||
htmlBread += "<div class='divider'> / </div>" | |||||
htmlBread += "<div class='divider'> / </div>" | |||||
$(`#file_breadcrumb${version_name}`).append(htmlBread) | $(`#file_breadcrumb${version_name}`).append(htmlBread) | ||||
}else{ | }else{ | ||||
renderBrend(version_name,parents,filename,init) | renderBrend(version_name,parents,filename,init) | ||||
@@ -738,7 +738,7 @@ td, th { | |||||
}).fail(function(err) { | }).fail(function(err) { | ||||
console.log(err,version_name); | console.log(err,version_name); | ||||
}); | }); | ||||
} | } | ||||
function renderBrend(version_name,parents,filename,init){ | function renderBrend(version_name,parents,filename,init){ | ||||
if(init=="folder"){ | if(init=="folder"){ | ||||
@@ -751,9 +751,9 @@ td, th { | |||||
}else{ | }else{ | ||||
$(`#file_breadcrumb${version_name} .active.section`).replaceWith(`<a class='section' onclick="loadModelFile('${version_name}','${parents1}','${filename1}')">${sectionName}</a>`) | $(`#file_breadcrumb${version_name} .active.section`).replaceWith(`<a class='section' onclick="loadModelFile('${version_name}','${parents1}','${filename1}')">${sectionName}</a>`) | ||||
} | } | ||||
htmlBrend += `<div class='active section'>${filename}</div>` | htmlBrend += `<div class='active section'>${filename}</div>` | ||||
htmlBrend += "<div class='divider'> / </div>" | |||||
htmlBrend += "<div class='divider'> / </div>" | |||||
$(`#file_breadcrumb${version_name}`).append(htmlBrend) | $(`#file_breadcrumb${version_name}`).append(htmlBrend) | ||||
$(`input[name=model${version_name}]`).val(parents) | $(`input[name=model${version_name}]`).val(parents) | ||||
$(`input[name=modelback${version_name}]`).val(filename) | $(`input[name=modelback${version_name}]`).val(filename) | ||||
@@ -764,7 +764,7 @@ td, th { | |||||
$(`#file_breadcrumb${version_name} a.section:contains(${filename})`).replaceWith(`<div class='active section'>${filename}</div>`) | $(`#file_breadcrumb${version_name} a.section:contains(${filename})`).replaceWith(`<div class='active section'>${filename}</div>`) | ||||
$(`#file_breadcrumb${version_name} div.section:contains(${filename})`).append("<div class='divider'> / </div>") | $(`#file_breadcrumb${version_name} div.section:contains(${filename})`).append("<div class='divider'> / </div>") | ||||
} | } | ||||
} | } | ||||
function renderDir(data,version_name){ | function renderDir(data,version_name){ | ||||
let html="" | let html="" | ||||
@@ -803,14 +803,14 @@ td, th { | |||||
}else{ | }else{ | ||||
html += "<span class='truncate has-emoji'>"+ `${dirs_size}` + "</span>" | html += "<span class='truncate has-emoji'>"+ `${dirs_size}` + "</span>" | ||||
} | } | ||||
html += "</td>" | html += "</td>" | ||||
html += "<td class='text right age three wide'>" | html += "<td class='text right age three wide'>" | ||||
html += "<span class='truncate has-emoji'>" + data.Dirs[i].ModTime + "</span>" | html += "<span class='truncate has-emoji'>" + data.Dirs[i].ModTime + "</span>" | ||||
html += "</td>" | html += "</td>" | ||||
html += "</tr>" | html += "</tr>" | ||||
} | } | ||||
html += "</tbody>" | html += "</tbody>" | ||||
html += "</table>" | html += "</table>" | ||||
@@ -820,9 +820,9 @@ td, th { | |||||
html += "</div>" | html += "</div>" | ||||
$(`#dir_list${version_name}`).append(html) | $(`#dir_list${version_name}`).append(html) | ||||
} | } | ||||
function logScroll(version_name) { | function logScroll(version_name) { | ||||
let container = document.querySelector(`#log${version_name}`) | let container = document.querySelector(`#log${version_name}`) | ||||
let scrollTop = container.scrollTop | let scrollTop = container.scrollTop | ||||
let scrollHeight = container.scrollHeight | let scrollHeight = container.scrollHeight | ||||
@@ -835,7 +835,7 @@ td, th { | |||||
$(`.message${version_name} #header`).text('您已翻阅至日志底部') | $(`.message${version_name} #header`).text('您已翻阅至日志底部') | ||||
$(`.message${version_name}`).css('display', 'block') | $(`.message${version_name}`).css('display', 'block') | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
$(`.message${version_name}`).css('display', 'none') | |||||
$(`.message${version_name}`).css('display', 'none') | |||||
}, 1000) | }, 1000) | ||||
}else{ | }else{ | ||||
if(end_line===data.EndLine){ | if(end_line===data.EndLine){ | ||||
@@ -843,9 +843,9 @@ td, th { | |||||
} | } | ||||
else{ | else{ | ||||
$(`#log${version_name} input[name=end_line]`).val(data.EndLine) | $(`#log${version_name} input[name=end_line]`).val(data.EndLine) | ||||
$(`#log${version_name}`).append('<pre>' + data.Content) | |||||
$(`#log${version_name}`).append('<pre>' + data.Content) | |||||
} | } | ||||
} | } | ||||
}).fail(function(err) { | }).fail(function(err) { | ||||
console.log(err); | console.log(err); | ||||
@@ -858,7 +858,7 @@ td, th { | |||||
$(`.message${version_name} #header`).text('您已翻阅至日志顶部') | $(`.message${version_name} #header`).text('您已翻阅至日志顶部') | ||||
$(`.message${version_name}`).css('display', 'block') | $(`.message${version_name}`).css('display', 'block') | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
$(`.message${version_name}`).css('display', 'none') | |||||
$(`.message${version_name}`).css('display', 'none') | |||||
}, 1000) | }, 1000) | ||||
}else{ | }else{ | ||||
$(`#log${version_name} input[name=start_line]`).val(data.StartLine) //如果变动就改变所对应的值 | $(`#log${version_name} input[name=start_line]`).val(data.StartLine) //如果变动就改变所对应的值 | ||||
@@ -869,4 +869,4 @@ td, th { | |||||
}); | }); | ||||
} | } | ||||
} | } | ||||
</script> | |||||
</script> |
@@ -97,7 +97,7 @@ | |||||
<input id="parents_version" style="width: 60%;" value="" tabindex="3" disabled > | <input id="parents_version" style="width: 60%;" value="" tabindex="3" disabled > | ||||
{{end}} | {{end}} | ||||
</div> | </div> | ||||
<div class="unite min_title inline field"> | <div class="unite min_title inline field"> | ||||
<label style="font-weight: normal;" for="description">{{.i18n.Tr "repo.modelarts.train_job.description"}} </label> | <label style="font-weight: normal;" for="description">{{.i18n.Tr "repo.modelarts.train_job.description"}} </label> | ||||
<textarea style="width: 80%;" id="description" value="{{.description}}" name="description" rows="3" maxlength="255" placeholder={{.i18n.Tr "repo.modelarts.train_job.new_place"}} onchange="this.value=this.value.substring(0, 255)" onkeydown="this.value=this.value.substring(0, 255)" onkeyup="this.value=this.value.substring(0, 256)">{{.description}}</textarea> | <textarea style="width: 80%;" id="description" value="{{.description}}" name="description" rows="3" maxlength="255" placeholder={{.i18n.Tr "repo.modelarts.train_job.new_place"}} onchange="this.value=this.value.substring(0, 255)" onkeydown="this.value=this.value.substring(0, 255)" onkeyup="this.value=this.value.substring(0, 256)">{{.description}}</textarea> | ||||
@@ -105,7 +105,7 @@ | |||||
<div class="ui divider"></div> | <div class="ui divider"></div> | ||||
<h4 class="unite title ui header ">{{.i18n.Tr "repo.modelarts.train_job.parameter_setting"}}:</h4> | <h4 class="unite title ui header ">{{.i18n.Tr "repo.modelarts.train_job.parameter_setting"}}:</h4> | ||||
<div class="required unite min_title inline field"> | <div class="required unite min_title inline field"> | ||||
<label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.code_version"}}</label> | <label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.code_version"}}</label> | ||||
@@ -119,7 +119,7 @@ | |||||
{{end}} | {{end}} | ||||
{{end}} | {{end}} | ||||
</select> | </select> | ||||
</div> | </div> | ||||
@@ -160,24 +160,24 @@ | |||||
<span> | <span> | ||||
<i class="question circle icon link" data-content={{.i18n.Tr "repo.modelarts.train_job.boot_file_helper"}} data-position="right center" data-variation="mini"></i> | <i class="question circle icon link" data-content={{.i18n.Tr "repo.modelarts.train_job.boot_file_helper"}} data-position="right center" data-variation="mini"></i> | ||||
</span> | </span> | ||||
<a href="https://git.openi.org.cn/OpenIOSSG/MINIST_Example" target="_blank">查看样例</a> | |||||
<a href="https://git.openi.org.cn/OpenIOSSG/MINIST_Example" target="_blank">{{.i18n.Tr "cloudbrain.view_sample"}}</a> | |||||
</div> | </div> | ||||
<div class="required unite min_title inline field"> | <div class="required unite min_title inline field"> | ||||
<label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.dataset"}}</label> | <label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.dataset"}}</label> | ||||
<select class="ui dropdown width80" id="trainjob_datasets" name="attachment" placeholder="选择数据集"> | |||||
<select class="ui dropdown width80" id="trainjob_datasets" name="attachment" placeholder="{{.i18n.Tr "cloudbrain.select_dataset"}}"> | |||||
{{if .dataset_name}} | {{if .dataset_name}} | ||||
<option name="attachment" value="{{.uuid}}">{{.dataset_name}}</option> | <option name="attachment" value="{{.uuid}}">{{.dataset_name}}</option> | ||||
{{end}} | {{end}} | ||||
{{range .attachments}} | {{range .attachments}} | ||||
<option value="">选择数据集</option> | |||||
<option value="">{{$.i18n.Tr "cloudbrain.select_dataset"}}</option> | |||||
{{if ne $.uuid .UUID}} | {{if ne $.uuid .UUID}} | ||||
<option name="attachment" value="{{.UUID}}">{{.Attachment.Name}}</option> | <option name="attachment" value="{{.UUID}}">{{.Attachment.Name}}</option> | ||||
{{end}} | {{end}} | ||||
{{end}} | {{end}} | ||||
</select> | </select> | ||||
<span class="tooltips">数据集位置存储在环境变量data_url中,训练输出路径存储在环境变量train_url中。</span> | |||||
<span class="tooltips">{{.i18n.Tr "cloudbrain.dataset_path_rule"}}</span> | |||||
</div> | </div> | ||||
<div class="inline unite min_title field"> | <div class="inline unite min_title field"> | ||||
<label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.run_parameter"}}</label> | <label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.run_parameter"}}</label> | ||||
<span id="add_run_para" style="margin-left: 0.5rem;cursor:pointer;color: rgba(3, 102, 214, 100);font-size: 14px;line-height: 26px;font-family: SourceHanSansSC-medium;"><i class="plus square outline icon"></i>{{.i18n.Tr "repo.modelarts.train_job.add_run_parameter"}}</span> | <span id="add_run_para" style="margin-left: 0.5rem;cursor:pointer;color: rgba(3, 102, 214, 100);font-size: 14px;line-height: 26px;font-family: SourceHanSansSC-medium;"><i class="plus square outline icon"></i>{{.i18n.Tr "repo.modelarts.train_job.add_run_parameter"}}</span> | ||||
@@ -243,24 +243,24 @@ | |||||
</div> | </div> | ||||
<div class="inline required unite min_title field"> | <div class="inline required unite min_title field"> | ||||
<label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.amount_of_compute_node"}}</label> | <label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.amount_of_compute_node"}}</label> | ||||
<div class="ui labeled input" style="width: 5%;"> | <div class="ui labeled input" style="width: 5%;"> | ||||
<input style="border-radius: 0;text-align: center;" name="work_server_number" id="trainjob_work_server_num" tabindex="3" autofocus required maxlength="255" value="{{.work_server_number}}" readonly> | <input style="border-radius: 0;text-align: center;" name="work_server_number" id="trainjob_work_server_num" tabindex="3" autofocus required maxlength="255" value="{{.work_server_number}}" readonly> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="inline unite min_title field"> | <div class="inline unite min_title field"> | ||||
<button class="ui create_train_job green button"> | <button class="ui create_train_job green button"> | ||||
{{.i18n.Tr "repo.cloudbrain.new"}} | {{.i18n.Tr "repo.cloudbrain.new"}} | ||||
</button> | </button> | ||||
<a class="ui button" href="/">{{.i18n.Tr "repo.cloudbrain.cancel"}}</a> | <a class="ui button" href="/">{{.i18n.Tr "repo.cloudbrain.cancel"}}</a> | ||||
</div> | </div> | ||||
<!-- 模态框 --> | <!-- 模态框 --> | ||||
</form> | </form> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -298,9 +298,9 @@ | |||||
// 参数增加、删除、修改、保存 | // 参数增加、删除、修改、保存 | ||||
function Add_parameter(i){ | function Add_parameter(i){ | ||||
value = '<div class="two fields width85" id= "para'+ i +'">' + | value = '<div class="two fields width85" id= "para'+ i +'">' + | ||||
'<div class="field">' + | |||||
'<input type="text" name="shipping_first-name" required placeholder={{.i18n.Tr "repo.modelarts.train_job.parameter_name"}}> ' + | |||||
'</div> ' + | |||||
'<div class="field">' + | |||||
'<input type="text" name="shipping_first-name" required placeholder={{.i18n.Tr "repo.modelarts.train_job.parameter_name"}}> ' + | |||||
'</div> ' + | |||||
'<div class="field"> ' + | '<div class="field"> ' + | ||||
'<input type="text" name="shipping_last-name" required placeholder={{.i18n.Tr "repo.modelarts.train_job.parameter_value"}}>' + | '<input type="text" name="shipping_last-name" required placeholder={{.i18n.Tr "repo.modelarts.train_job.parameter_value"}}>' + | ||||
'</div>'+ | '</div>'+ | ||||
@@ -310,7 +310,7 @@ | |||||
'</span>' + | '</span>' + | ||||
'</div>' | '</div>' | ||||
$(".dynamic.field").append(value) | $(".dynamic.field").append(value) | ||||
} | |||||
} | |||||
$('#add_run_para').click(function(){ | $('#add_run_para').click(function(){ | ||||
var len = $(".dynamic.field .two.fields").length | var len = $(".dynamic.field .two.fields").length | ||||
@@ -336,7 +336,7 @@ | |||||
$(this).find('input').each(function(){ | $(this).find('input').each(function(){ | ||||
parameters.push($(this).text()) | parameters.push($(this).text()) | ||||
}) | }) | ||||
}); | }); | ||||
$('.ui.parameter.modal') | $('.ui.parameter.modal') | ||||
.modal('hide'); | .modal('hide'); | ||||
@@ -379,9 +379,9 @@ | |||||
onChange: function(){ | onChange: function(){ | ||||
if ($('.ui.save.checkbox').checkbox('is checked')){ | if ($('.ui.save.checkbox').checkbox('is checked')){ | ||||
$('#save_para').removeClass("disabled") | $('#save_para').removeClass("disabled") | ||||
}else{ | }else{ | ||||
$('#save_para').addClass("disabled") | |||||
$('#save_para').addClass("disabled") | |||||
} | } | ||||
} | } | ||||
}); | }); | ||||
@@ -535,7 +535,7 @@ | |||||
// $('.ui.page.dimmer').dimmer('show') | // $('.ui.page.dimmer').dimmer('show') | ||||
document.getElementById("mask").style.display = "block" | document.getElementById("mask").style.display = "block" | ||||
}, | }, | ||||
onFailure: function(e){ | |||||
onFailure: function(e){ | |||||
return false; | return false; | ||||
} | } | ||||
}) | }) | ||||
@@ -569,6 +569,6 @@ | |||||
$('.ui.create_train_job.green.button').click(function(e) { | $('.ui.create_train_job.green.button').click(function(e) { | ||||
get_name() | get_name() | ||||
send_run_para() | send_run_para() | ||||
validate() | |||||
validate() | |||||
}) | }) | ||||
</script> | |||||
</script> |
@@ -38,7 +38,7 @@ | |||||
<div class="bgtask-content-txt">训练任务:您还没创建过训练任务,请先创建<a href="{{.RepoLink}}/modelarts/train-job">训练任务</a>。</div> | <div class="bgtask-content-txt">训练任务:您还没创建过训练任务,请先创建<a href="{{.RepoLink}}/modelarts/train-job">训练任务</a>。</div> | ||||
{{end}} | {{end}} | ||||
<div class="bgtask-content-txt">使用说明:可以参考启智AI协作平台<a href="https://git.openi.org.cn/zeizei/OpenI_Learning">小白训练营课程。</a></div> | <div class="bgtask-content-txt">使用说明:可以参考启智AI协作平台<a href="https://git.openi.org.cn/zeizei/OpenI_Learning">小白训练营课程。</a></div> | ||||
</div> | </div> | ||||
<div style="display: none;"> | <div style="display: none;"> | ||||
<div id="model_list"></div> | <div id="model_list"></div> | ||||
@@ -79,10 +79,10 @@ | |||||
</div> | </div> | ||||
<div class="actions"> | <div class="actions"> | ||||
<div class="ui red basic inverted cancel button"> | <div class="ui red basic inverted cancel button"> | ||||
<i class="remove icon"></i> 取消操作 | |||||
<i class="remove icon"></i> {{.i18n.Tr "cloudbrain.operate_cancel"}} | |||||
</div> | </div> | ||||
<div class="ui green basic inverted ok button"> | <div class="ui green basic inverted ok button"> | ||||
<i class="checkmark icon"></i> 确定操作 | |||||
<i class="checkmark icon"></i> {{.i18n.Tr "cloudbrain.operate_confirm"}} | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -99,7 +99,7 @@ | |||||
<!-- <p>asdasdasd</p> --> | <!-- <p>asdasdasd</p> --> | ||||
</div> | </div> | ||||
<input type="hidden" name="_csrf" value=""> | <input type="hidden" name="_csrf" value=""> | ||||
<div class="two inline fields "> | |||||
<div class="two inline fields "> | |||||
<div class="required ten wide field"> | <div class="required ten wide field"> | ||||
<label style="margin-left: -23px;">选择训练任务</label> | <label style="margin-left: -23px;">选择训练任务</label> | ||||
<div class="ui dropdown selection search width83 loading" id="choice_model"> | <div class="ui dropdown selection search width83 loading" id="choice_model"> | ||||
@@ -117,7 +117,7 @@ | |||||
<div class="default text">选择版本</div> | <div class="default text">选择版本</div> | ||||
<i class="dropdown icon"></i> | <i class="dropdown icon"></i> | ||||
<div class="menu" id="job-version"> | <div class="menu" id="job-version"> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -149,8 +149,8 @@ | |||||
<button class="ui button cancel" >{{.i18n.Tr "repo.cloudbrain.cancel"}}</button> | <button class="ui button cancel" >{{.i18n.Tr "repo.cloudbrain.cancel"}}</button> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -179,7 +179,7 @@ | |||||
$("#job-name").empty() | $("#job-name").empty() | ||||
createModelName() | createModelName() | ||||
loadTrainList() | loadTrainList() | ||||
}, | }, | ||||
onHide:function(){ | onHide:function(){ | ||||
document.getElementById("formId").reset(); | document.getElementById("formId").reset(); | ||||
@@ -188,7 +188,7 @@ | |||||
$('.ui.dimmer').css({"background-color":""}) | $('.ui.dimmer').css({"background-color":""}) | ||||
$('.ui.error.message').text() | $('.ui.error.message').text() | ||||
$('.ui.error.message').css('display','none') | $('.ui.error.message').css('display','none') | ||||
} | } | ||||
}) | }) | ||||
.modal('show') | .modal('show') | ||||
@@ -233,7 +233,7 @@ | |||||
$('#choice_model .default.text').text(data[0].DisplayJobName) | $('#choice_model .default.text').text(data[0].DisplayJobName) | ||||
$('#choice_model input[name="JobId"]').val(data[0].JobID) | $('#choice_model input[name="JobId"]').val(data[0].JobID) | ||||
loadTrainVersion() | loadTrainVersion() | ||||
}) | }) | ||||
} | } | ||||
function loadTrainVersion(value){ | function loadTrainVersion(value){ | ||||
@@ -251,7 +251,7 @@ | |||||
$('#choice_version .default.text').text(data[0].VersionName) | $('#choice_version .default.text').text(data[0].VersionName) | ||||
$('#choice_version input[name="VersionName"]').val(data[0].VersionName) | $('#choice_version input[name="VersionName"]').val(data[0].VersionName) | ||||
} | } | ||||
}) | }) | ||||
} | } | ||||
</script> | </script> | ||||
@@ -148,6 +148,31 @@ | |||||
prop="contributor" | prop="contributor" | ||||
label="贡献者数" | label="贡献者数" | ||||
align="center"> | align="center"> | ||||
</el-table-column> | |||||
<el-table-column | |||||
prop="isMirror" | |||||
label="派生" | |||||
align="center"> | |||||
<template slot-scope="scope"> | |||||
{{scope.row.isMirror|changeType}} | |||||
</template> | |||||
</el-table-column> | |||||
<el-table-column | |||||
prop="isFork" | |||||
label="镜像" | |||||
align="center"> | |||||
<template slot-scope="scope"> | |||||
{{scope.row.isFork|changeType}} | |||||
</template> | |||||
</el-table-column> | |||||
<el-table-column | |||||
prop="createUnix" | |||||
label="项目创建时间" | |||||
width="120px" | |||||
align="center"> | |||||
<template slot-scope="scope"> | |||||
{{scope.row.createUnix|transformTimestamp}} | |||||
</template> | |||||
</el-table-column> | </el-table-column> | ||||
</el-table> | </el-table> | ||||
</div> | </div> | ||||
@@ -1140,6 +1165,17 @@ | |||||
return " <a href=\" mailto:" + value.email + "class=\"circular ui button\">" +value.user+ "</a>" | return " <a href=\" mailto:" + value.email + "class=\"circular ui button\">" +value.user+ "</a>" | ||||
} | } | ||||
}, | |||||
transformTimestamp(timestamp){ | |||||
let a = new Date(timestamp*1000); | |||||
const date = new Date(a); | |||||
const Y = date.getFullYear() + '/'; | |||||
const M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '/'; | |||||
const D = (date.getDate() < 10 ? '0'+date.getDate() : date.getDate()) + ' '; | |||||
const h = (date.getHours() < 10 ? '0'+date.getHours() : date.getHours()) + ':'; | |||||
const m = (date.getMinutes() <10 ? '0'+date.getMinutes() : date.getMinutes()); | |||||
const dateString = Y + M + D + h + m ;//+ s; | |||||
return dateString; | |||||
}, | }, | ||||
}, | }, | ||||
@@ -1,4 +1,6 @@ | |||||
export default async function initCloudrain() { | export default async function initCloudrain() { | ||||
let debug_button = $('.cloudbrain_debug').data('debug') | |||||
let debug_again_button = $('.cloudbrain_debug').data('debug-again') | |||||
let timeid = window.setInterval(loadJobStatus, 15000); | let timeid = window.setInterval(loadJobStatus, 15000); | ||||
$(document).ready(loadJobStatus); | $(document).ready(loadJobStatus); | ||||
function loadJobStatus() { | function loadJobStatus() { | ||||
@@ -24,7 +26,7 @@ export default async function initCloudrain() { | |||||
finalState.includes(status) && $('#' + ID + '-stop').removeClass('blue').addClass('disabled') | finalState.includes(status) && $('#' + ID + '-stop').removeClass('blue').addClass('disabled') | ||||
} | } | ||||
if(status==="RUNNING"){ | if(status==="RUNNING"){ | ||||
$('#ai-debug-'+ID).removeClass('disabled').addClass('blue').text('调试').css("margin","0 1rem") | |||||
$('#ai-debug-'+ID).removeClass('disabled').addClass('blue').text(debug_button).css("margin","0 1rem") | |||||
$('#model-image-'+ID).removeClass('disabled').addClass('blue') | $('#model-image-'+ID).removeClass('disabled').addClass('blue') | ||||
} | } | ||||
if(status!=="RUNNING"){ | if(status!=="RUNNING"){ | ||||
@@ -36,7 +38,7 @@ export default async function initCloudrain() { | |||||
$('#ai-debug-'+ID).removeClass('blue').addClass('disabled') | $('#ai-debug-'+ID).removeClass('blue').addClass('disabled') | ||||
} | } | ||||
if(['STOPPED','FAILED','START_FAILED','CREATE_FAILED','SUCCEEDED'].includes(status)){ | if(['STOPPED','FAILED','START_FAILED','CREATE_FAILED','SUCCEEDED'].includes(status)){ | ||||
$('#ai-debug-'+ID).removeClass('disabled').addClass('blue').text('再次调试').css("margin","0") | |||||
$('#ai-debug-'+ID).removeClass('disabled').addClass('blue').text(debug_again_button).css("margin","0") | |||||
} | } | ||||
if(["RUNNING","WAITING"].includes(status)){ | if(["RUNNING","WAITING"].includes(status)){ | ||||
$('#ai-stop-'+ID).removeClass('disabled').addClass('blue') | $('#ai-stop-'+ID).removeClass('disabled').addClass('blue') | ||||
@@ -114,7 +116,7 @@ export default async function initCloudrain() { | |||||
$('#' + ID+'-icon').removeClass().addClass(res.status) | $('#' + ID+'-icon').removeClass().addClass(res.status) | ||||
$('#' + ID+ '-text').text(res.status) | $('#' + ID+ '-text').text(res.status) | ||||
if(res.status==="STOPPED"){ | if(res.status==="STOPPED"){ | ||||
$('#ai-debug-'+ID).removeClass('disabled').addClass('blue').text("再次调试").css("margin","0") | |||||
$('#ai-debug-'+ID).removeClass('disabled').addClass('blue').text(debug_again_button).css("margin","0") | |||||
$('#ai-image-'+ID).removeClass('blue').addClass('disabled') | $('#ai-image-'+ID).removeClass('blue').addClass('disabled') | ||||
$('#ai-model-debug-'+ID).removeClass('blue').addClass('disabled') | $('#ai-model-debug-'+ID).removeClass('blue').addClass('disabled') | ||||
$('#ai-delete-'+ID).removeClass('disabled').addClass('blue') | $('#ai-delete-'+ID).removeClass('disabled').addClass('blue') | ||||
@@ -214,7 +216,7 @@ export default async function initCloudrain() { | |||||
$('#' + ID+ '-text').text(res.status) | $('#' + ID+ '-text').text(res.status) | ||||
$('#ai-debug-'+ID).removeClass('blue').addClass('disabled') | $('#ai-debug-'+ID).removeClass('blue').addClass('disabled') | ||||
$('#ai-delete-'+ID).removeClass('blue').addClass('disabled') | $('#ai-delete-'+ID).removeClass('blue').addClass('disabled') | ||||
$('#ai-debug-'+ID).text("调试").css("margin","0 1rem") | |||||
$('#ai-debug-'+ID).text(debug_button).css("margin","0 1rem") | |||||
} | } | ||||
}else{ | }else{ | ||||
$('.alert').html(res.error_msg).removeClass('alert-success').addClass('alert-danger').show().delay(2000).fadeOut(); | $('.alert').html(res.error_msg).removeClass('alert-success').addClass('alert-danger').show().delay(2000).fadeOut(); | ||||