diff --git a/models/dataset.go b/models/dataset.go
index 7f049f068..a0f6ba2aa 100755
--- a/models/dataset.go
+++ b/models/dataset.go
@@ -88,7 +88,7 @@ func (datasets DatasetList) loadAttributes(e Engine) error {
if err := e.
Where("id > 0").
In("id", keysInt64(set)).
- Cols("id", "owner_id", "owner_name", "lower_name", "name", "description", "alias", "lower_alias","is_private").
+ Cols("id", "owner_id", "owner_name", "lower_name", "name", "description", "alias", "lower_alias", "is_private").
Find(&repos); err != nil {
return fmt.Errorf("find repos: %v", err)
}
@@ -121,12 +121,12 @@ func (datasets DatasetList) loadAttachmentAttributes(opts *SearchDatasetOptions)
if attachment.DatasetID == datasets[i].ID {
if opts.StarByMe {
- permission,ok := permissionMap[datasets[i].ID];
+ permission, ok := permissionMap[datasets[i].ID]
if !ok {
permission = false
datasets[i].Repo.GetOwner()
- if datasets[i].Repo.Owner.IsOrganization() {
+ if datasets[i].Repo.Owner.IsOrganization() {
if datasets[i].Repo.Owner.IsUserPartOfOrg(opts.User.ID) {
log.Info("user is member of org.")
permission = true
@@ -140,10 +140,10 @@ func (datasets DatasetList) loadAttachmentAttributes(opts *SearchDatasetOptions)
}
}
- permissionMap[datasets[i].ID]=permission
+ permissionMap[datasets[i].ID] = permission
}
- if permission{
+ if permission {
datasets[i].Attachments = append(datasets[i].Attachments, attachment)
} else if !attachment.IsPrivate {
datasets[i].Attachments = append(datasets[i].Attachments, attachment)
@@ -159,8 +159,8 @@ func (datasets DatasetList) loadAttachmentAttributes(opts *SearchDatasetOptions)
}
for i := range datasets {
- if datasets[i].Attachments==nil{
- datasets[i].Attachments=[]*Attachment{}
+ if datasets[i].Attachments == nil {
+ datasets[i].Attachments = []*Attachment{}
}
datasets[i].Repo.Owner = nil
}
@@ -585,3 +585,13 @@ func GetTeamDatasetIdsByUserID(userID int64) []int64 {
Cols("dataset.id").Find(&datasets)
return datasets
}
+
+func UpdateDatasetCreateUser(ID int64, user *User) error {
+ _, err := x.Where("id = ?", ID).Cols("user_id").Update(&Dataset{
+ UserID: user.ID,
+ })
+ if err != nil {
+ return err
+ }
+ return nil
+}
diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini
index 5c8016326..306556daf 100755
--- a/options/locale/locale_en-US.ini
+++ b/options/locale/locale_en-US.ini
@@ -253,13 +253,15 @@ page_dev_env_desc2_desc=Associate the model with the code version, you can adjus
page_dev_env_desc3_title=Once Configuration, Multiple Reuse
page_dev_env_desc3_desc=Provide execution environment sharing, Once Configuration, Multiple Reuse. Lower the threshold of model development, and avoid spending repetitive time configuring complex environments.
page_dev_yunlao=OpenI AI Collaboration Platform
-page_dev_yunlao_desc1=OpenI AI collaboration platform has cooperated with Pengcheng cloud brain and China computing power network (c ² Net) can be used to complete AI development tasks by using the rich computing resources of Pengcheng cloud brain and China computing network.
+page_dev_yunlao_desc1=OpenI AI collaboration platform has cooperated with Pengcheng cloud brain and China computing power network (C²NET) can be used to complete AI development tasks by using the rich computing resources of Pengcheng cloud brain and China computing network.
page_dev_yunlao_desc2=Pengcheng CloudBrain's existing AI computing power is 100p FLOPS@FP16 (billions of half precision floating-point calculations per second), the main hardware infrastructure consists of GPU servers equipped with NVIDIA Tesla V100 and A100, and Atlas 900 AI clusters equipped with Kunpeng and shengteng processors.
-page_dev_yunlao_desc3=China computing power network (c ² Net) phase I can realize high-speed network interconnection between different artificial intelligence computing centers, and realize reasonable scheduling of computing power and flexible allocation of resources. At present, 11 intelligent computing centers have been connected, and the total scale of computing power is 1924p OPS@FP16 。 Qizhi AI collaboration platform has been connected to Pengcheng Cloud Computing Institute, Chengdu Intelligent Computing Center, Zhongyuan Intelligent Computing Center, Hefei brain and other nodes.
+page_dev_yunlao_desc3=China computing power network (C²NET) phase I can realize high-speed network interconnection between different artificial intelligence computing centers, and realize reasonable scheduling of computing power and flexible allocation of resources. At present, 11 intelligent computing centers have been connected, and the total scale of computing power is 1924p OPS@FP16. OpenI AI collaboration platform has been connected to Pengcheng Cloud Computing Institute, Chengdu Intelligent Computing Center, Zhongyuan Intelligent Computing Center, Hefei brain and other nodes.
page_dev_yunlao_desc4=Developers can freely select the corresponding computing resources according to the use needs, and can test the adaptability, performance, stability, etc. of the model in different hardware environments.
page_dev_yunlao_desc5=If your model requires more computing resources, you can also apply for it separately.
page_dev_yunlao_apply=Apply Separately
-
+c2net_title=C²NET
+c2net_desc=The artificial intelligence computing power network promotion alliance has access to 11 intelligent computing centers, with a total scale of 1924p.
+c2net_center=Center
search=Search
search_repo=Repository
search_dataset=DataSet
@@ -822,6 +824,8 @@ title_format_err=Name can only contain number,letter,'-','_' or '.', and can be
description = Description
description_format_err=Description's length can be up to %s characters long.
create_dataset = Create Dataset
+download_url=Download Url
+download_oper=Operation
create_dataset_fail=Failed to create dataset.
query_dataset_fail=Failed to query dataset.
edit_attachment_fail=Failed to update description.
@@ -3094,7 +3098,7 @@ resource_cluster = Resource Cluster
resource_cluster_openi = OpenI Resource Cluster
resource_cluster_c2net = China Computing NET
resource_cluster_openi_simple = OpenI
-resource_cluster_c2net_simple = Computing NET
+resource_cluster_c2net_simple = C²NET
compute_resource = Computing resources
task_name = Task name
task_type = Task type
diff --git a/options/locale/locale_zh-CN.ini b/options/locale/locale_zh-CN.ini
index 80c5d347e..06a1f3639 100755
--- a/options/locale/locale_zh-CN.ini
+++ b/options/locale/locale_zh-CN.ini
@@ -261,7 +261,9 @@ page_dev_yunlao_desc3=中国算力网(C²NET)一期可实现不同人工智
page_dev_yunlao_desc4=开发者可以根据使用需求,自由选择相应计算资源,可以测试模型在不同硬件环境下的适配能力、性能、稳定性等。
page_dev_yunlao_desc5=如果您的模型需要更多的计算资源,也可以单独申请。
page_dev_yunlao_apply=单独申请
-
+c2net_title=智算网络
+c2net_desc=人工智能算力网络推进联盟已接入11家智算中心,算力总规模1924P
+c2net_center=中心
search=搜索
search_repo=项目
search_dataset=数据集
@@ -830,7 +832,8 @@ create_dataset=创建数据集
create_dataset_fail=创建数据集失败。
query_dataset_fail=查询数据集失败。
edit_attachment_fail=修改描述失败。
-
+download_url=数据集下载地址
+download_oper=操作
show_dataset=数据集
edit_dataset=编辑数据集
update_dataset=更新数据集
diff --git a/routers/repo/setting.go b/routers/repo/setting.go
index fed89513a..b6297677a 100644
--- a/routers/repo/setting.go
+++ b/routers/repo/setting.go
@@ -464,6 +464,16 @@ func SettingsPost(ctx *context.Context, form auth.RepoSettingForm) {
}
return
}
+ dataset, err := models.GetDatasetByRepo(repo)
+ if err == nil {
+ if dataset != nil {
+ models.UpdateDatasetCreateUser(dataset.ID, newOwner)
+ } else {
+ log.Info("not found the dataset")
+ }
+ } else {
+ log.Info("error=" + err.Error())
+ }
log.Trace("Repository transferred: %s/%s -> %s", ctx.Repo.Owner.Name, repo.Name, newOwner)
ctx.Flash.Success(ctx.Tr("repo.settings.transfer_succeed"))
diff --git a/templates/home.tmpl b/templates/home.tmpl
index 8de647d75..c7485a214 100755
--- a/templates/home.tmpl
+++ b/templates/home.tmpl
@@ -89,8 +89,8 @@