Browse Source

fix-3262

tags/v1.22.12.2^2
Gitea 2 years ago
parent
commit
49e821d89e
5 changed files with 7 additions and 4 deletions
  1. +1
    -1
      models/cloudbrain.go
  2. +1
    -1
      modules/setting/setting.go
  3. +1
    -1
      options/locale/locale_zh-CN.ini
  4. +1
    -1
      routers/repo/cloudbrain.go
  5. +3
    -0
      routers/repo/dataset.go

+ 1
- 1
models/cloudbrain.go View File

@@ -2480,7 +2480,7 @@ func GetDatasetInfo(uuidStr string, grampusType ...string) (map[string]DatasetIn
DataLocalPath: dataLocalPath,
Name: fileName,
FullName: attach.Name,
Size: int(attach.Size / (1024 * 1024 * 1024)), //GB
Size: int(attach.Size),
}
if i == 0 {
datasetNames = attach.Name


+ 1
- 1
modules/setting/setting.go View File

@@ -1480,7 +1480,7 @@ func NewContext() {
MaxDatasetNum = sec.Key("MAX_DATASET_NUM").MustInt(5)
CullIdleTimeout = sec.Key("CULL_IDLE_TIMEOUT").MustString("900")
CullInterval = sec.Key("CULL_INTERVAL").MustString("60")
DebugDatasetSize = sec.Key("DEBUG_DATASET_SIZE").MustInt(15)
DebugDatasetSize = sec.Key("DEBUG_DATASET_SIZE").MustInt(20 * 1024 * 1024 * 1024)

sec = Cfg.Section("benchmark")
IsBenchmarkEnabled = sec.Key("ENABLED").MustBool(false)


+ 1
- 1
options/locale/locale_zh-CN.ini View File

@@ -3304,7 +3304,7 @@ Stopped_failed=任务停止失败,请稍后再试。
Stopped_success_update_status_fail=任务停止成功,状态及运行时间更新失败。
load_code_failed=代码加载失败,请确认选择了正确的分支。

error.debug_datasetsize = 数据集大小超过限制(15GB)
error.debug_datasetsize = 数据集大小超过限制(20GB)
error.dataset_select = 数据集选择错误:数量超过限制或者有同名数据集
new_train_gpu_tooltips = 训练脚本存储在 <strong style="color:#010101">%s</strong> 中,数据集存储在 <strong style="color:#010101">%s</strong> 中,预训练模型存放在运行参数 <strong style="color:#010101">%s</strong> 中,训练输出请存储在 <strong style="color:#010101">%s</strong> 中以供后续下载。
new_train_npu_tooltips = 训练脚本存储在 <strong style="color:#010101">%s</strong> 中,预训练模型存放在运行参数 <strong style="color:#010101">%s</strong> 中,训练输出请存储在 <strong style="color:#010101">%s</strong> 中以供后续下载。


+ 1
- 1
routers/repo/cloudbrain.go View File

@@ -297,7 +297,7 @@ func cloudBrainCreate(ctx *context.Context, form auth.CreateCloudBrainForm) {
for _, infos := range datasetInfos {
if infos.Size > int(setting.DebugDatasetSize) {
log.Info("datasize exceed limit, the size of dataset(GB)::", infos.Size)
log.Error("The DatasetSize exceeds the limit (%d)", int(setting.DebugDatasetSize))
log.Error("The DatasetSize exceeds the limit (%d)", int(setting.DebugDatasetSize / (1024*1024*1024))) // GB
cloudBrainNewDataPrepare(ctx, jobType)
ctx.RenderWithErr(ctx.Tr("cloudbrain.error.debug_datasetsize"), tpl, &form)
return


+ 3
- 0
routers/repo/dataset.go View File

@@ -373,6 +373,7 @@ func datasetMultiple(ctx *context.Context, opts *models.SearchDatasetOptions) {
}

data, err := json.Marshal(datasets)
log.Info("datakey", string(data))
if err != nil {
log.Error("json.Marshal failed:", err.Error())
ctx.JSON(200, map[string]string{
@@ -521,6 +522,8 @@ func GetDatasetStatus(ctx *context.Context) {
return
}

log.Info(fmt.Sprint(attachment.DecompressState))
ctx.JSON(200, map[string]string{
"result_code": "0",
"UUID": UUID,


Loading…
Cancel
Save