FengZiYjun
f26f11608b
* 更新教程,放在在./tutorial
* remove unused codes in metrics.py
* add tests for DataSet
* add tests for FieldArray
* add tests for metrics.py
* fix predictor, add tests for predictor
* fix bucket sampler, add tests for bucket sampler
7 years ago
yh
7c261faf19
Merge branch 'trainer' of github.com:FengZiYjun/fastNLP into trainer
7 years ago
yh
87e5d44b01
。
7 years ago
yunfan
52b1b18a76
fix bugs in vocab
7 years ago
yh
79ae38738f
conflict solved
7 years ago
yh
62c63f159a
test loss
7 years ago
FengZiYjun
27833d06ae
FieldArray only check type when is_input or is_target is set.
7 years ago
FengZiYjun
9acdb54fc8
优化loss在missing和duplicate时报错的信息:返回loss初始化约定接受的key
7 years ago
yh
abe5ec7261
Merge branch 'trainer' of github.com:FengZiYjun/fastNLP into trainer
# Conflicts:
# test/core/test_trainer.py
7 years ago
yh
a1a41c2d8b
1. unused报错运行错误修复
2. loss中修复一个错误
3. metric中fast_param调整
7 years ago
FengZiYjun
4b099bb0dd
* add tqdm in requirements.txt
* fix FieldArray type check bugs
7 years ago
FengZiYjun
661780b975
Improve FieldArray. Support nested list and a list of np.array
7 years ago
yh
1fb1df4a31
1. metric修改fast_param
2. trainer中update_every改为print_every, 因为update_every可能引起optimizer update的误解
3. fieldarray content支持使用np.ndarray初始化
7 years ago
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.
7 years ago
yh
beb55f5288
* change trainer iterating into tqdm
7 years ago
yunfan
ad3c5b6ef0
add magic iter in dataset
7 years ago
FengZiYjun
513876d5db
Updates:
* fix losses的_fast_param_map的bug
* Trainer添加sampelr初始化参数,并调整参数顺序
* refine codes
7 years ago
FengZiYjun
6f58ec34b4
Updates:
* DataSet修改__repr__,优化print(datset)的输出
* Instance修改__repr__,优化print的输出
* Optimizer优化传参提示
* Trainer去除kwargs参数
* losses.py加个参数
* 对应test code的修改
7 years ago
FengZiYjun
f62060339e
All tests pass. Ready to merge.
* 更新Loss的接口形参跟metric保持一致
* 添加对几种loss的测试
* embed_loader采用维度独立的方法采样
* 对应测试代码的修改
7 years ago
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
7 years ago
yh
b2e09b745e
Merge branch 'trainer' of github.com:FengZiYjun/fastNLP into trainer
7 years ago
yh
d19850b397
* add _fast_call_evaluate mechanism in MetricBase
7 years ago
FengZiYjun
11c82ab2e7
跑通test_trainer.py,联调结束,准备发布
7 years ago
FengZiYjun
201f5109d6
Updates:
* improve Loss initialization interface
* improve test codes for trainer
7 years ago
yh
8dd73a9205
Merge branch 'trainer' of github.com:FengZiYjun/fastNLP into trainer
7 years ago
yh
234ceb6fa3
fix bug in MetricBase
7 years ago
FengZiYjun
125c2718e4
Update
* fix bug in DataSet.split
* fix bugs in FieldArray, to allow content as a list
* fix bug in losses check
* ...
7 years ago
yh
c2d2137500
bug fix in MetricAccuracy
7 years ago
yh
8d7d2b428c
initial test for AccuracyMetric
7 years ago
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)
7 years ago
xuyige
ba7b17661c
Merge branch 'trainer' of https://github.com/FengZiYjun/fastNLP into check
7 years ago
xuyige
6d36190be4
update LossBase class
7 years ago
FengZiYjun
8a7077fed2
更新Optimizer:
optimizer.SGD(lr=xxx);如果没有传入parameters,则在trainer中帮他加入parameter
7 years ago
FengZiYjun
6427e85e8f
升级Vocab:
* 增量添加单词到词典中
* lazy update: 当用到词典的时候才重新build
* 当新添加的词导致词典大小超出限制时,打印一个warning
Update Vocabulary:
* More words can be added after the building.
* Lazy update: rebuild automatically when vocab is used.
* print warning when max size is reached
7 years ago
FengZiYjun
07e227aa4d
add interface of Loss
7 years ago
FengZiYjun
6839bb91cc
Add auto type detection/conversion in FieldArray
* In init, detect content type to be Python int, float, or str.
* In append(), check type consistence.
* In init & append(), int will be cast into float if they occur together.
* Map Python type into numpy dtype
* Raise error if type detection fails.
7 years ago
FengZiYjun
da901ed5b0
* DataSet __getitem__ returns copy of Instance
* refine interface of set_target & set_input
* rename DataSet.Instance into DataSet.DataSetIter
* remove unused methods in DataSet.DataSetIter
* remove __setattr__ in DataSet; It is dangerous.
* comment adjustment
7 years ago
yunfan
26a4324342
fix test
7 years ago
yunfan
04206f8099
Merge branch 'master' into dataset-res
7 years ago
FengZiYjun
3d66975091
* refine code comments
* refine code style
* set up unit tests for Batch, DataSet, FieldArray
* remove a lot of out-of-date unit tests, to get testing passed
7 years ago
FengZiYjun
837bef47dc
* add unit tests for instance, vocabulary
* remove and fix other unit tests
* add more code comments
7 years ago
FengZiYjun
090f7aef5b
* fixing unit tests
7 years ago
FengZiYjun
e9d7074ba1
* delete readme_example.py because it is oooooooout of date.
* rename preprocess.py into utils.py, because nothing about preprocess in it
* anything in loader/ and saver/ is moved directly into io/
* corresponding unit tests are moved to /test/io
* delete fastnlp.py, because we have new and better APIs
* rename Biaffine_parser/run_test.py to Biaffine_parser/main.py; Otherwise, test will fail.
* A looooooooooot of ancient codes to be refined...........
7 years ago
yunfan
82f4351540
add index to word processor
7 years ago
FFTYYY
07fb61efdc
Update test_loss
7 years ago
FFTYYY
2cd2dae251
update loss
7 years ago
FengZiYjun
325157b53f
add tests
7 years ago
FengZiYjun
5133fe67b4
add character field
7 years ago
yunfan
baac29cfa0
fix tests
7 years ago
yunfan
a4c9786ca4
update dataset & loader
7 years ago