Commit Graph

667 Commits

Author SHA1 Message Date
yh
79ae38738f conflict solved 2018-12-04 16:23:33 +08:00
yh
62c63f159a test loss 2018-12-04 16:22:41 +08:00
FengZiYjun
27833d06ae FieldArray only check type when is_input or is_target is set. 2018-12-04 16:13:30 +08:00
yunfan
5edd9de841 fix bugs 2018-12-04 15:54:53 +08:00
FengZiYjun
9acdb54fc8 优化loss在missing和duplicate时报错的信息:返回loss初始化约定接受的key 2018-12-04 14:18:08 +08:00
yh
abe5ec7261 Merge branch 'trainer' of github.com:FengZiYjun/fastNLP into trainer
# Conflicts:
#	test/core/test_trainer.py
2018-12-04 13:00:34 +08:00
yh
a1a41c2d8b 1. unused报错运行错误修复
2. loss中修复一个错误
3. metric中fast_param调整
2018-12-04 12:58:56 +08:00
FengZiYjun
4b099bb0dd * add tqdm in requirements.txt
* fix FieldArray type check bugs
2018-12-04 11:16:24 +08:00
FengZiYjun
661780b975 Improve FieldArray. Support nested list and a list of np.array 2018-12-04 10:54:21 +08:00
yh
1fb1df4a31 1. metric修改fast_param
2. trainer中update_every改为print_every, 因为update_every可能引起optimizer update的误解
3. fieldarray content支持使用np.ndarray初始化
2018-12-04 10:43:40 +08:00
yh
785c41ded5 Merge branch 'trainer' of github.com:FengZiYjun/fastNLP into trainer
# Conflicts:
#	fastNLP/core/dataset.py
#	fastNLP/core/trainer.py
#	test/core/test_trainer.py

Trainer support print_train and tqdm train.
2018-12-04 00:47:47 +08:00
yh
beb55f5288 * change trainer iterating into tqdm 2018-12-03 22:53:14 +08:00
yunfan
1421b7dfba add this feature totally for yh 2018-12-03 22:48:02 +08:00
yunfan
ad3c5b6ef0 add magic iter in dataset 2018-12-03 21:54:22 +08:00
FengZiYjun
513876d5db Updates:
* fix losses的_fast_param_map的bug
* Trainer添加sampelr初始化参数,并调整参数顺序
* refine codes
2018-12-03 20:50:51 +08:00
yunfan
9c8ec45742 Merge branch 'trainer' of https://github.com/FengZiYjun/fastNLP into dataset 2018-12-03 20:05:54 +08:00
yunfan
131e1ccd3b add _fast_param_map 2018-12-03 20:04:14 +08:00
FengZiYjun
6f58ec34b4 Updates:
* DataSet修改__repr__,优化print(datset)的输出
* Instance修改__repr__,优化print的输出
* Optimizer优化传参提示
* Trainer去除kwargs参数
* losses.py加个参数
* 对应test code的修改
2018-12-03 19:53:34 +08:00
FengZiYjun
f62060339e All tests pass. Ready to merge.
* 更新Loss的接口形参跟metric保持一致
* 添加对几种loss的测试
* embed_loader采用维度独立的方法采样
* 对应测试代码的修改
2018-12-03 12:37:33 +08:00
yh
9e3fd0fe4c Merge branch 'trainer' of github.com:FengZiYjun/fastNLP into trainer 2018-12-03 12:13:05 +08:00
yh
77f8ac77da 对trainer中check code的报错信息进行了增强;将tester中的output修改为pred_dict 2018-12-03 12:12:48 +08:00
FengZiYjun
cc440b5ed6 All tests pass.
* 更新测试代码,跑通所有测试,覆盖率65%
* refine代码规范和某些注释
* fix tester self.use_cuda未赋值先使用的bug
* 添加tutorial样例数据——tutorial_sample_dataset.csv
* 【unsolved】embed_loader在计算np.cov时遇到segmentation fault
2018-12-03 11:12:56 +08:00
yh
d4af19ec1f Merge branch 'trainer' of github.com:FengZiYjun/fastNLP into trainer 2018-12-03 09:50:26 +08:00
yh
88949ba1da 修改dataset.py的apply signature; batch当中增加num_batches属性; tester的format_eval_results修改; metric增加fast_evaluate_call机制 2018-12-03 09:50:16 +08:00
FengZiYjun
5824b7f4c7 跑通tutorial,修复一些bugs:
* dataset检查slice开始位置,确保结果不为空
* fieldarray检查content不为空
* optimizer接受的model params是一个generator,不能赋值
* code style refine
2018-12-03 00:09:23 +08:00
yh
b2e09b745e Merge branch 'trainer' of github.com:FengZiYjun/fastNLP into trainer 2018-12-02 23:27:49 +08:00
yh
d19850b397 * add _fast_call_evaluate mechanism in MetricBase 2018-12-02 23:27:40 +08:00
FengZiYjun
11c82ab2e7 跑通test_trainer.py,联调结束,准备发布 2018-12-02 20:07:50 +08:00
FengZiYjun
201f5109d6 Updates:
* improve Loss initialization interface
* improve test codes for trainer
2018-12-02 19:45:25 +08:00
yh
8dd73a9205 Merge branch 'trainer' of github.com:FengZiYjun/fastNLP into trainer 2018-12-02 16:39:35 +08:00
yh
234ceb6fa3 fix bug in MetricBase 2018-12-02 16:39:28 +08:00
FengZiYjun
125c2718e4 Update
* fix bug in DataSet.split
* fix bugs in FieldArray, to allow content as a list
* fix bug in losses check
* ...
2018-12-02 16:38:38 +08:00
yh
c2d2137500 bug fix in MetricAccuracy 2018-12-02 15:19:05 +08:00
yh
8d7d2b428c initial test for AccuracyMetric 2018-12-02 14:57:11 +08:00
yh
50f1c28b74 metric bug fix 2018-12-02 14:29:11 +08:00
yh
a90a62ab9b metric bug fix 2018-12-02 14:28:44 +08:00
yh
a05ffd31cd trainer增加对evaluate结果的check 2018-12-02 12:55:15 +08:00
yh
f76851b982 Merge branch 'trainer' of github.com:FengZiYjun/fastNLP into trainer 2018-12-02 12:52:48 +08:00
FengZiYjun
d74901e037 Trainer Update:
* 添加初始化注释
* 从_better_eval_result中抽取check metrics的逻辑到_check_eval_results函数
2018-12-02 11:36:35 +08:00
FengZiYjun
fb5215ae73 fix bug in Trainer about metric_key
更新Optimizer: 多种初始化方法
1. SGD()
2. SGD(0.01)
3. SGD(lr=0.01)
4. SGD(lr=0.01, momentum=0.9)
5. SGD(model.parameters(), lr=0.1, momentum=0.9)
2018-12-02 11:00:29 +08:00
yh
84024aaaa4 _prepare_metric函数增加检查evaluate与get_metric方法 2018-12-02 10:36:20 +08:00
yh
bd94dd2c7f metrics中实现AccuracyMetric, 并将metric的计算方式由一把计算修改为batch by batch 2018-12-02 10:30:25 +08:00
yh
f24fca1b21 change the calculation of metric to batch by batch. The older design is to concat all data before calculation. 2018-12-02 09:21:08 +08:00
yh
1b961f136c conflict in trainer solved 2018-12-01 23:47:08 +08:00
yh
3daa889bb0 LossInForward update 2018-12-01 23:44:07 +08:00
yh
3a4a729314 trainer and tester change check_code 2018-12-01 23:43:24 +08:00
xuyige
ba7b17661c Merge branch 'trainer' of https://github.com/FengZiYjun/fastNLP into check 2018-12-01 22:45:03 +08:00
xuyige
6d36190be4 update LossBase class 2018-12-01 22:44:24 +08:00
FengZiYjun
8a7077fed2 更新Optimizer:
optimizer.SGD(lr=xxx);如果没有传入parameters,则在trainer中帮他加入parameter
2018-12-01 22:21:57 +08:00
FengZiYjun
08375d51b0 Merge remote-tracking branch 'FengZiYjun/trainer' into trainer
# Conflicts:
#	fastNLP/core/trainer.py
2018-12-01 21:04:08 +08:00