Commit 2d2e7714 authored by hepj987's avatar hepj987
Browse files

调整算法类别

parent b65b9e0e
...@@ -68,24 +68,49 @@ squad-v1.1 eval脚本:[evaluate-v1.1.py](https://github.com/allenai/bi-att-flo ...@@ -68,24 +68,49 @@ squad-v1.1 eval脚本:[evaluate-v1.1.py](https://github.com/allenai/bi-att-flo
推荐使用docker方式运行,提供[光源](https://www.sourcefind.cn/#/main-page)镜像,可以dockerpull拉取 推荐使用docker方式运行,提供[光源](https://www.sourcefind.cn/#/main-page)镜像,可以dockerpull拉取
### Docker(方式一)
``` ```
docker pull image.sourcefind.cn:5000/dcu/admin/base/tensorflow:2.7.0-centos7.6-dtk-22.10.1-py37-latest docker pull image.sourcefind.cn:5000/dcu/admin/base/tensorflow:2.7.0-centos7.6-dtk-22.10.1-py37-latest
docker run -dit --network=host --name=bert_tensorflow --privileged --device=/dev/kfd --device=/dev/dri --ipc=host --shm-size=16G --group-add video --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -u root --ulimit stack=-1:-1 --ulimit memlock=-1:-1 image.sourcefind.cn:5000/dcu/admin/base/tensorflow:2.7.0-centos7.6-dtk-22.10.1-py37-latest docker run -dit --network=host --name=bert_tensorflow --privileged --device=/dev/kfd --device=/dev/dri --ipc=host --shm-size=16G --group-add video --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -u root --ulimit stack=-1:-1 --ulimit memlock=-1:-1 image.sourcefind.cn:5000/dcu/admin/base/tensorflow:2.7.0-centos7.6-dtk-22.10.1-py37-latest
docker exec -it bert_tensorflow /bin/bash docker exec -it bert_tensorflow /bin/bash
pip install -r requirements.txt
``` ```
安装过程可能顶掉DCU版本的tensorflow,可以到[开发者社区](https://cancon.hpccube.com:65024/4/main/tensorflow/dtk22.10)下载DCU版本对应包 ### Dockerfile(方式二)
```
docker build -t bert:latest .
docker run -dit --network=host --name=bert_tensorflow --privileged --device=/dev/kfd --device=/dev/dri --ipc=host --shm-size=16G --group-add video --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -u root --ulimit stack=-1:-1 --ulimit memlock=-1:-1 bert:latest
docker exec -it bert_tensorflow /bin/bash
pip install -r requirements.txt
```
### Conda(方式三)
```
conda create -n bert_tensorflow python=3.7
pip install -r requirements.txt
``` ```
pip install requirements.txt
遇到AttributeError: module 'typing' has no attribute '_ClassVar'则是由于新版本的python更换属性名导致的 安装过程可能顶掉DCU版本的tensorflow,可以到[开发者社区](https://cancon.hpccube.com:65024/4/main/tensorflow/dtk22.10)下载DCU版本对应包
[tensorflow2.7](https://cancon.hpccube.com:65024/directlink/4/tensorflow/dtk22.10/tensorflow-2.7.0+git67f0ade9.dtk2210-cp37-cp37m-manylinux2014_x86_64.whl)
[DTK22.10.1](https://cancon.hpccube.com:65024/directlink/1/DTK-22.10.1/CentOS7.6/DTK-22.10.1-CentOS7.6-x86_64.tar.gz)
### python版本兼容
```
搭建环境时会遇到AttributeError: module 'typing' has no attribute '_ClassVar'则是由于新版本的python更换属性名导致的
修改python3.7/site-packages/dataclasses.py 550行 修改python3.7/site-packages/dataclasses.py 550行
return type(a_type) is typing._ClassVar return type(a_type) is typing._ClassVar
改为 改为
return type(a_type) is typing.ClassVar return type(a_type) is typing.ClassVar
``` ```
## 训练 ## 训练
### 数据转化-MNLI ### 数据转化-MNLI
...@@ -248,11 +273,11 @@ sh bert_squad_gpus.sh ...@@ -248,11 +273,11 @@ sh bert_squad_gpus.sh
## 算法类别 ## 算法类别
`自然语言处理` `对话问答,文本分类`
## 热点应用行业 ## 热点应用行业
`互联网,智能聊天` `互联网`
# 源码仓库及问题反馈 # 源码仓库及问题反馈
......
...@@ -5,6 +5,6 @@ modelName=bert_tensorflow ...@@ -5,6 +5,6 @@ modelName=bert_tensorflow
# 模型描述 # 模型描述
modelDescription=bert是一种预训练的语言表征模型。 modelDescription=bert是一种预训练的语言表征模型。
# 应用场景 # 应用场景
appScenario=训练,互联网,智能聊天 appScenario=训练,互联网,对话问答,文本分类
# 框架类型 # 框架类型
frameType=tensorflow frameType=tensorflow
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment