Commit 63ec8d74 authored by Cao Duc Anh's avatar Cao Duc Anh

add training tutorial in readme

parent 2c7869af
...@@ -31,6 +31,27 @@ ViHOS chứa 26.476 khoảng thời gian được chú thích bởi con người ...@@ -31,6 +31,27 @@ ViHOS chứa 26.476 khoảng thời gian được chú thích bởi con người
} }
``` ```
## Hướng dẫn huấn luyện model
1. Chuẩn bị dữ liệu dạng csv gồm 2 cột "text" và "label". Upload các file tài liệu lên MinIO (cổng 9091 máy chạy docker compose) bucket "data-annotated".
2. Gọi API training:
```
curl --location '10.3.2.100:8000/start-training' \
--header 'Content-Type: application/json' \
--data '{
"pretrain": ""
}'
```
Cấu hình mặc định trong file config.yml:
```
training:
epoch: 200
batch_size: 8
load_data_worker: 2
k_fold: 5
test_ratio: 0.1
```
3. Theo dõi thông số quá trình huấn luyện tại màn hình tensorboard: http://0.0.0.0:6006/
## Hướng dẫn triển khai với registry vivas ## Hướng dẫn triển khai với registry vivas
Yêu cầu cấu hình tối thiểu: Yêu cầu cấu hình tối thiểu:
- CPU intel core i5 - CPU intel core i5
......
...@@ -23,7 +23,7 @@ phobert_base: ...@@ -23,7 +23,7 @@ phobert_base:
max_token_length: 256 max_token_length: 256
training: training:
epoch: 100 epoch: 200
batch_size: 8 batch_size: 8
load_data_worker: 2 load_data_worker: 2
k_fold: 5 k_fold: 5
......
...@@ -2,7 +2,7 @@ version: '3.9' ...@@ -2,7 +2,7 @@ version: '3.9'
# Settings and configurations that are common for containers # Settings and configurations that are common for containers
x-nlpcore-common: &nlpcore-common x-nlpcore-common: &nlpcore-common
image: vn-text-moderation:latest image: registry.vivas.vn/vietnam_text_moderation/vn-text-moderation:latest
restart: always restart: always
env_file: env_file:
- env_file/minio.env - env_file/minio.env
...@@ -26,7 +26,7 @@ services: ...@@ -26,7 +26,7 @@ services:
- env_file/minio.env - env_file/minio.env
ports: ports:
- "9090:9000" - "9090:9000"
- "9091:9001" - "9091:9001" #UI
volumes: volumes:
- ./minio_data:/data - ./minio_data:/data
command: server --console-address ":9001" /data command: server --console-address ":9001" /data
...@@ -50,7 +50,7 @@ services: ...@@ -50,7 +50,7 @@ services:
- 8080:8080 - 8080:8080
nlpdata: nlpdata:
image: vn-text-moderation-data image: registry.vivas.vn/vietnam_text_moderation/vn-text-moderation-data
restart: always restart: always
env_file: env_file:
- env_file/sql.env - env_file/sql.env
......
This diff is collapsed.
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