/README.md
Markdown | 22 lines | 18 code | 4 blank | 0 comment | 0 complexity | 7a7407fa08e50284cea5ae3d60304b98 MD5 | raw file
- ## Requirements
- - Python 3
- - gurobi optimizer (academic license can be requested)
- - gurobipy (follow gurobi instructions, can be installed from package)
- - `pip3 install -r requirements.txt`
- ## Documentation: [Coming-Soon](https://gitlab.com/purdueNlp/DRaiL/-/wikis/home)
- ## Running a simple example
- State and Agreement prediction on gun control debates (using bert-tiny)
- - Add your DRaiL directory to `PYTHONPATH`
- - `cd` to `examples/4forms`
- - Local learning: `python3 run_debates_4forums.py --dir data/ --config config/config_bert_tiny.json --rule rules/rule_guncontrol.dr --savedir [dir-to-save-models] --bert_tiny -m local -f feats -n neuro --issue gun_control --logging_config ../../logging_conf.json --gpu_index [index-of-gpu:defaults to 0]`
- - Global learning: `python3 run_debates_4forums.py --dir data/ --config config/config_bert_tiny.json --rule rules/rule_guncontrol.dr --savedir [dir-to-save-models] --bert_tiny -m global --loss hinge --lrate 2e-5 -f examples/4forums/ -n examples/4forums/ --issue gun_control --logging_config ../../logging_conf.json --gpu_index [index-of-gpu:defaults to 0]`
- ## Quick tips
- - If you are using soft rules (NNet rules) that have unknown predicates
- on the left hand side, you have to use `hinge_latent` loss instead of
- `hinge` (even if you have supervision for that predicate), and you
- have to generate features for the unknown predicate (otherwise all
- groundings will have the same input at learning time)