Git Product home page Git Product logo

e3's Introduction

  • ๐Ÿ‘‹ Hi, Iโ€™m @vzhong. I am an Assistant Professor at the University of Waterloo.
  • ๐Ÿ“ซ Find me at https://victorzhong.com

e3's People

Contributors

vzhong 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

Watchers

 avatar  avatar  avatar  avatar

e3's Issues

No module named 'embeddings'

Hi, I'm running the non-docker setup.
When I tried to run
python -c "import embeddings as e; e.GloveEmbedding()"
I got
ModuleNotFoundError: No module named 'embeddings'

Can you help me with that?

Difference between Equation 14 in paper and its implementation

In equation 14 of E3 paper, the summary vector C is computed based on the extracted spans (summation from s_i to e_i of each span).

However, the implementation here considers all tokens for the summary vector C:

e3/model/entail.py

Lines 59 to 61 in 0c6b771

inp_attn_score = self.inp_attn_scorer(self.dropout(out['bert_enc'])).squeeze(2) - (1-out['input_mask'].float()).mul(1e20)
inp_attn = F.softmax(inp_attn_score, dim=1).unsqueeze(2).expand_as(out['bert_enc']).mul(self.dropout(out['bert_enc'])).sum(1)
out['clf_scores'] = self.class_clf(self.dropout(inp_attn))

Permission denied when running train_sharc.py via Docker

With both Dockerfile and wrap.sh unchanged, I was able to run docker/wrap.sh python preprocess_sharc.py
but encountered PermissionError: [Errno 13] Permission denied: '/opt/code/save/default-entail/train.log' when running NV_GPU=0 docker/wrap.sh python train_sharc.py
I think this was caused by the access permission to /opt/, is there any workaround?

preprocess_sharc.py: func filter_answer() and get_bullets() may not work as expected

When I run preprocess_sharc.py, I find that filter_answer never filter out any token:

e3/preprocess_sharc.py

Lines 48 to 49 in f9b5d1e

def filter_answer(answer):
return detokenize([a for a in answer if a['orig'] not in MATCH_IGNORE])

Also, get_bullets will always return a empty list:

e3/preprocess_sharc.py

Lines 107 to 118 in f9b5d1e

def get_bullets(context):
indices = [i for i, c in enumerate(context) if c == '*']
pairs = list(zip(indices, indices[1:] + [len(context)]))
cleaned = []
for s, e in pairs:
while not context[e-1].strip():
e -= 1
while not context[s].strip() or context[s] == '*':
s += 1
if e - s > 2 and e - 2 < 45:
cleaned.append((s, e-1))
return cleaned

I suspect the possible reason could be revtok.tokenize will return a tokenized list with added spaces like Hello, which make token['orig'] fail to match tokens in MATCH_IGNORE and *.

Replicate results

Hi Vector,
I have some problems on replicating experimental results. Because my turing GPU does not support CUDA8, I only tried training from scratch and loading your trained models. But both methods cannot replicate results on dev set.

Dev set Micro Macro B1 B4
E3 paper 68.02 73.36 67.14 53.67
train from scratch 66.43 72.53 57.88 41.37
binary model in docker 66.43 72.53 57.1 40.68

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.