From be5595fc5f40f7d281f9318ff26095c0d15ed5da Mon Sep 17 00:00:00 2001 From: LYH-YF Date: Thu, 14 Oct 2021 22:22:48 +0800 Subject: [PATCH] mwptoolkit v0.0.5 --- .gitignore | 8 + PYPI.md | 1 + README.md | 2 + docs/_static/cmd.html | 5 +- docs/conf.py | 2 +- mwptoolkit/config/__init__.py | 3 +- mwptoolkit/data/__init__.py | 3 +- mwptoolkit/data/dataloader/__init__.py | 10 +- .../dataloader/multi_equation_dataloader.py | 9 +- .../data/dataloader/pretrain_dataloader.py | 12 +- .../dataloader/single_equation_dataloader.py | 9 +- mwptoolkit/data/dataset/__init__.py | 10 +- mwptoolkit/evaluate/__init__.py | 4 +- mwptoolkit/evaluate/equ_solver.py | 241 -- mwptoolkit/evaluate/evaluator.py | 104 +- mwptoolkit/loss/__init__.py | 10 +- mwptoolkit/model/Graph2Tree/__init__.py | 5 +- mwptoolkit/model/PreTrain/__init__.py | 6 +- mwptoolkit/model/Seq2Seq/__init__.py | 12 +- mwptoolkit/model/Seq2Seq/mathen.py | 2 +- mwptoolkit/model/Seq2Tree/__init__.py | 8 +- mwptoolkit/model/Seq2Tree/sausolver.py | 756 ++++- mwptoolkit/model/__init__.py | 2 +- mwptoolkit/module/Decoder/tree_decoder.py | 152 +- mwptoolkit/module/Layer/tree_layers.py | 36 +- mwptoolkit/trainer/supervised_trainer.py | 269 +- mwptoolkit/trainer/template_trainer.py | 3 +- mwptoolkit/trainer/trainer.py | 2739 ----------------- setup.py | 2 +- 29 files changed, 1289 insertions(+), 3136 deletions(-) delete mode 100644 mwptoolkit/evaluate/equ_solver.py delete mode 100644 mwptoolkit/trainer/trainer.py diff --git a/.gitignore b/.gitignore index 174d1e2..eb3c63a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,7 @@ /.vscode +/.idea +/mwptoolkit.egg-info +/dist __pycache__ /dataset/math23k/partition.py /dataset/ape200k/process.py @@ -6,12 +9,17 @@ __pycache__ /dataset/mawps/MAWPS_.json /dataset/hmwp/process.py /dataset/math23k/graph2tree_deprel_info.json +/dataset/alg514/stat_equations.py preprocess.py pos_info.json pos_info_.json span_level_deprel_tree_info.json deprel_tree_info.json *.pth +.pypirc +make.bat +Makefile +run_setup.sh /pretrain/gpt2_cn /pretrain/gpt2_en *.log diff --git a/PYPI.md b/PYPI.md index c5d3301..80986c9 100644 --- a/PYPI.md +++ b/PYPI.md @@ -8,4 +8,5 @@ MWPToolkit is a PyTorch-based toolkit for Math Word Problem(MWP) solving. It is * **Highly modularized framework**. MWP toolkit is designed with highly reused modules and provides convenient interfaces for users. Specifically, data preprocessor, data loader, encoder, decoder and evaluator form the running procedure. Each module could be developed and extended independently. ## News +* **Fix some bugs.** diff --git a/README.md b/README.md index 49311d8..e8ae563 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,8 @@ Our framework has the following architecture. You could utilize our toolkit to e ## News +* **Fix some bugs.** + ## Characteristics * **Unification and Modularization**. We decouple solvers with different model architectures into highly modularized, reusable components and integrate them in a unified framework, which includes data, model, evaluation modules. It is convenient for you to study MWPs at a conceptual level and compare different models fairly. diff --git a/docs/_static/cmd.html b/docs/_static/cmd.html index 9a25c1c..dffea40 100644 --- a/docs/_static/cmd.html +++ b/docs/_static/cmd.html @@ -7,7 +7,7 @@ - mwptoolkit.config.configuration — MWPToolkit 0.0.4 documentation + command line — MWPToolkit 0.0.5 documentation @@ -73,7 +73,7 @@ cmd_line = cmd_line+"--dataset="+dataset+" "; var single_dataset=new Array("math23k","asdiv-a","mawps-single","mawps_asdiv-a_svamp"); - var multi_dataset=new Array("draw","mawps","hmwp"); + var multi_dataset=new Array("draw","mawps","hmwp","alg514"); if (single_dataset.includes(dataset)){ cmd_line = cmd_line+"--task_type="+"single_equation "; } @@ -316,6 +316,7 @@

command line +