Git Product home page Git Product logo

diora's People

Contributors

mrdrozdov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

diora's Issues

Error when predicting from NLI

I get the following error, when parsing the multiNLI development split:

Traceback (most recent call last):
  File "/home/lukas/diora/diora/pytorch/diora/scripts/parse.py", line 241, in <module>
    run(options)
  File "/home/lukas/diora/diora/pytorch/diora/scripts/parse.py", line 231, in run
    file_writer.update(batch_map, trees)
  File "/home/lukas/diora/diora/pytorch/diora/scripts/parse.py", line 156, in update
    file_order = batch_map['file_order'][ii]
KeyError: 'file_order'

I am using the following command:

python pytorch/diora/scripts/parse.py \
    --retain_file_order \
    --batch_size 10 \
    --data_type nli \
    --elmo_cache_dir ./cache \
    --load_model_path ./diora-checkpoints/mlp-softmax/model.pt \
    --model_flags ./diora-checkpoints/mlp-softmax/flags.json \
    --experiment_path ./log/redone/model_periodic.pt \
    --validation_path ./data/multinli_1.0/multinli_1.0_dev_matched.jsonl \
    --validation_filter_length -1

It works without errors when omitting the --retain_file_order flag. But then I get the following error when running EVALB:

Traceback (most recent call last):
  File "/home/lukas/diora/diora/pytorch/diora/scripts/evalb.py", line 177, in <module>
    main(args)
  File "/home/lukas/diora/diora/pytorch/diora/scripts/evalb.py", line 110, in main
    nltk_tree = nltk.Tree.fromstring(line)
  File "/home/lukas/diora/venv/lib/python3.10/site-packages/nltk/tree/tree.py", line 680, in fromstring
    cls._parse_error(s, match, open_b)
  File "/home/lukas/diora/venv/lib/python3.10/site-packages/nltk/tree/tree.py", line 731, in _parse_error
    raise ValueError(msg)
ValueError: Tree.read(): expected '(' but got 'gold_label'
            at index 0.
                "gold_label..."
                 ^

with command

 python pytorch/diora/scripts/evalb.py     
    --evalb ./EVALB
    --evalb_config ./EVALB/diora.prm
    --out ./log/redone
    --pred ./log/redone/parse.jsonl
    --gold ./data/multinli_1.0/multinli_1.0_dev_matched.txt

How do I recreate the results from table 2 in the paper?

Inconsistency Found in Reconstruction loss

Hi, in paper its been suggested that Authors had done their experiments on the reconstruction loss on all nodes of the tree but in their code base they did an agreement at word level only with the elmo embeddings. Can you please look into it once.

Scripts for binarizing WSJ

Hi, could you make public the scripts to binarize WSJ? I want to make sure I use the same gold trees you used. Thanks a lot!

About the method of using ELMo.

Hi,
I think ELMo can provide us context-sensitive embeddings of the words in a sentence.
During the reading of code, I find you use an insensitive ELMo.
Why are you use this implementation? Is it because running ELMo on every sentence is very time-consuming? Have you tried the context-sensitive implementation?

How to reproduce the result for WSJ?

Hi,

Thanks for the inspiring work and the well written code!

The instruction in README is very clear, but it's for the NLI dataset. I wonder how can I reproduce the result for WSJ in the paper?

It seems that in order to train on WSJ, I need to prepare WSJ in space-delimited format, e.g.

not surprisingly , he sometimes bites .
and so it was on gray friday .

But I am not sure how can I provide the corresponding parse trees for these sentences?

If possible, can you also provide the parameters to reproduce the WSJ result in the paper?

Questions about experiments related to mlp and softmax

Hi, Thank you for your awesome paper and related codes.

I am trying to reproduce the experiments in your paper but have some trouble.
In the train.py, the parser excludes mlp and softmax.
parser.add_argument('--arch', default='treelstm', choices=('treelstm',)) parser.add_argument('--reconstruct_mode', default='margin', choices=('margin',))
Even if I add those parameters, when I run the training hyperparams like below,

python -m torch.distributed.launch --nproc_per_node=$NGPUS diora/scripts/train.py \ --arch mlp-shared \ --batch_size 128 \ --data_type nli \ --elmo_cache_dir /home/hongry/data/elmo \ --emb elmo \ --hidden_dim 400 \ --k_neg 100 \ --log_every_batch 100 \ --lr 2e-3 \ --normalize unit \ --reconstruct_mode softmax --save_after 1000 --train_filter_length 20 \--train_path /home/hongry/data/allnli.jsonl --cuda --multigpu

error occurred like below,

Failed with shape: torch.Size([64, 6]) AttributeError: 'NoneType' object has no attribute 'view'

I am quite confused about this error and look forward to your help. Thank you!

Inplace operation: error

For the line 212 in diora/net/diora.py, you defined a function named inside_fill_chart, it fill the latest h,c,s to the chart. This is actually an inplace operation (you directly modified values of elements in the matrix). However, the matrix, chart.inside_h, chart_inside_c and chart.inside_s are all used for gradient back propagation. I wonder which pytorch version you used. Since the version >=0.4.0 does not allow such operation.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.