Commit Graph

639 Commits

Author SHA1 Message Date
FengZiYjun
887fc9281f update callbacks:
* rename callback methods. Use fastai's notation.
* add a new callback method - on_valid_begin
2019-01-25 21:43:24 +08:00
xuyige
e0d6a259ae skip training while n_epoch in trainer is not greater than 0 2019-01-23 17:09:28 +08:00
xuyige
d4b4ffa28b add testing tutorial 2019-01-23 14:56:25 +08:00
yunfan
9474ab4b34 remove device in batch 2019-01-21 22:28:31 +08:00
yunfan
c02980e006 Merge branch 'yyff' into dev 2019-01-21 14:55:53 +08:00
yunfan
a37de4344d add batch device 2019-01-21 14:55:32 +08:00
yunfan
e93c6f0053 Merge branch 'dev' of https://github.com/choosewhatulike/fastNLP-private into dev 2019-01-21 14:52:24 +08:00
yh
47ec69ea96 trainer根据syf的多进程batch进行修改 2019-01-21 14:44:31 +08:00
FengZiYjun
f3cb812554 将tesorboardX处理为callback, 从trainer移除tensorboardX相关代码 2019-01-20 16:37:58 +08:00
yunfan
03f49c8264 - batch with multiprocessing 2019-01-19 19:44:32 +08:00
FengZiYjun
b14dd58828 Update POS API 2019-01-19 18:48:57 +08:00
FengZiYjun
62ea4f7fed 添加LR finder,用第一个epoch找最佳lr,从第二个epoch开始训练 2019-01-19 18:40:43 +08:00
yunfan
a7f3701bdf - revert batch 2019-01-19 16:26:39 +08:00
yunfan
de856fb8eb update reproduction 2019-01-19 16:22:01 +08:00
yunfan
eb55856c78 - fix parser train 2019-01-19 16:07:10 +08:00
FengZiYjun
ab953b43ab * 重构POS API,改成接受word作为输入
* 添加两类Callback
* 完善Trainer对error的捕捉
2019-01-19 15:23:07 +08:00
yh_cc
d9ac334409 减少batch中不断创建多进程的开销 2019-01-18 23:33:19 +08:00
yh_cc
2e3ef52a7d 将batch增强为多进程batch 2019-01-18 23:02:15 +08:00
FengZiYjun
864c2238f8 添加FieldArray对list of np.array的支持 2019-01-17 22:42:40 +08:00
FengZiYjun
b93ca9bb30 * FieldArray添加对list of np.array的支持
* 添加测试:FieldArray的初始化
2019-01-17 15:39:13 +08:00
FengZiYjun
e4f997d52a refactor type system in FieldArray:
* 重构dtype的检测代码,在FieldArray的初始化和append两处,达到更好的代码复用
* 类型检测的责任完全落在FieldArray,DataSet与之配合
测试:
* 整理dtype相关的测试代码
* 给所有tutorial添加测试
其他:
* 完善一个完整的Conll dataset loader
* 升级POS tag model训练脚本
2019-01-17 12:25:37 +08:00
yh
73dd35dabf Merge branch 'dev' of github.com:choosewhatulike/fastNLP-private into dev 2019-01-15 22:23:35 +08:00
yh
3e33a23042 修改Padder的测试用例 2019-01-15 22:23:19 +08:00
yh
8091a734ee 1. 将pad的功能从FieldArray中剥离出来,使用Padder完成各种padding操作。
2. FieldArray默认使用AutoPadder, AutoPadder的行为与之前不使用padder是一致的的
3. 为了解决二维padding的问题,引入了EngChar2dPadder用于对character进行padding
4. 增加一份padding的tutorial。
2019-01-15 22:21:55 +08:00
FengZiYjun
d80d944e40 * 添加callbacks:EarlyStopCallback
* 将dataset.py中的assert改为raise error
* 给trainer添加try-except,捕捉EarlyStopError
* 优化trainer代码
* 给callbacks添加测试
2019-01-15 17:50:00 +08:00
yh
1f50b01ffa conflict solved 2019-01-15 15:16:20 +08:00
yh
6a0a1ed4ad train增加注释;attention增加注释;新增transformer分词 2019-01-15 14:58:43 +08:00
FengZiYjun
1fdaf236d2 Updates:
* 改名: chinese_word_segment ---> Chinese_word_segmentation
* 改名: pos_tag_model ---> POS_tagging
* 添加4个对Batch的测试
* 删除无用的chinese_word_segment/run.py
2019-01-15 14:56:01 +08:00
FengZiYjun
c4ba75d160 code optimization
* move used readers from reproduction to io/dataset_loader.py
(API shall not call anything from reproduction/)
2019-01-15 14:30:37 +08:00
ChenXin
a6dbbe9812 remove the gpu_id info when saving 2019-01-15 11:45:02 +08:00
yunfan
2e9e6c6c20 - fix trainer with validate_every > 0
- refine & fix Transformer Encoder
- refine & speed up biaffine parser
2019-01-14 19:13:52 +08:00
FengZiYjun
094a566155 add syntactic parsing API 2019-01-13 11:49:38 +08:00
FengZiYjun
8df5bce938 fastNLP V0.3 2019-01-12 19:15:20 +08:00
FengZiYjun
eca0c6f8c4 Prepare for release.
* pass all tests
* prepare CWS & POS API
* update tutorials
* add README.md in tutorials/ & api/
2019-01-12 19:00:06 +08:00
yunfan
62a7556a04 Merge remote-tracking branch 'private/dev' into dev
# Conflicts:
#	fastNLP/api/api.py
#	fastNLP/modules/encoder/variational_rnn.py
2019-01-12 11:26:32 +08:00
yunfan
ba28702e68 update Biaffine Parser, Variational RNN
add parser API
2019-01-12 11:22:09 +08:00
FengZiYjun
7eb02f1762 update code comments in CRF 2019-01-11 20:59:42 +08:00
FengZiYjun
751fe2768e Merge branch 'master' of https://github.com/fastnlp/fastNLP into current branch
# Conflicts solved:
#	fastNLP/io/dataset_loader.py
#	fastNLP/io/embed_loader.py
#	fastNLP/modules/aggregator/attention.py
#	fastNLP/modules/decoder/CRF.py
2019-01-11 20:44:26 +08:00
FengZiYjun
c0b67a2bc9 fix tests 2019-01-11 20:24:35 +08:00
FengZiYjun
806364b5be * update travis config
* update README
2019-01-11 20:14:18 +08:00
yh
a1fe24c49d Merge branch 'dev' of github.com:choosewhatulike/fastNLP-private into dev 2019-01-11 19:55:54 +08:00
yh
145125feb4 支持CWS的高级api“ 2019-01-11 19:55:38 +08:00
FengZiYjun
c8e6497fe6 * 调整测试代码,通过全部测试
* 合并callback和trainer的更新
* CWS API的更新
2019-01-11 19:47:07 +08:00
yh
400552971c 1. callback中增加GradientClip; 2.Trainer中取消_print_train()和_tqdm_train(),全部并入了_train() 2019-01-11 19:09:01 +08:00
FengZiYjun
e8ea6ea322 improved callbacks & trainer code structure 2019-01-11 18:14:58 +08:00
FengZiYjun
59c9b894b1 Merge branch 'dev' of https://github.com/choosewhatulike/fastNLP-private into callbacks 2019-01-11 14:43:54 +08:00
FengZiYjun
a7274c667c update callbacks in Trainer 2019-01-11 14:43:06 +08:00
xuyige
12356b4cdf Merge branch 'dev' of https://github.com/choosewhatulike/fastNLP-private into dev 2019-01-10 18:05:11 +08:00
xuyige
409e25e1d6 update fastnlp_advanced_tutorial 2019-01-10 18:04:53 +08:00
Coet
ef82c1f100
Merge pull request #121 from FengZiYjun/doc-fixing
[Doc] Improve Documentation (2)
2019-01-10 12:50:46 +08:00