Code Monkey home page Code Monkey logo

lang2logic's People

Contributors

donglixp 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lang2logic's Issues

any suggestions on re-implementation in PyTorch?

Hi Dong,

Thanks so much for this wonderful paper and code. I was planning to re-implement this in PyTorch for doing more related work based on your paper. I was wondering if you have some suggestions, or if you were doing so already?

Best,
Bill

./run.sh problem

thanks for sharing your coding!
i've tried to use torch7 from github to run the programming, but still got error just like others. And then i tried to download the package by your GDrive, but it cannot be correctly installed to my ubuntu.
the details are following:
image
image
if you know how to handle these questions,please tell me.
thank you very much !

about pretrain.t7

thanks for sharing your paper and coding !
but i don't know where's pretrain.t7 from. are they all same for atis,jobs and geo? we want to apply your model on other dataset but failed...

About replacing ClassNLLCriterion.cu

Hi,

 Thanks for sharing this project, it is quite interesting ! 

I am new to Torch

Currently I follow the setup steps in the Readme.md
I got one issue: about replacing ClassNLLCriterion.cu

The previous commands are done
[Done] git clone https://github.com/torch/distro.git ~/torch --recursive
[Done] cd ~/torch; bash install-deps;

But after I want to replace
Replace ~/torch/extra/cunn/lib/THCUNN/ClassNLLCriterion.cu with the one in the ./install folder.

there is only one file "install.log" inside the install folder
I didn't see the ClassNLLCriterion.cu you mention ?
(Did I got something wrong before this step)

I continued running the ./install.sh, got the error message as below

Prefix set to /home/chaoying/torch/install
Installing Lua version: LUAJIT21
Inconsistency detected by ld.so: dl-version.c: 224: _dl_check_map_versions: Assertion `needed != ((void *)0)' failed!

Could you help me about this issue :)
Thank you very much

Compatibility with newer versions of cuda

If we are going to use the old torch version
https://drive.google.com/file/d/0B8yp1gOBCztycW42eDNNaExWSlU/view?usp=sharing
Somepeople may have experienced problems when compiling with newer versions of CUDA as CUDA 9 deprecates arquitecture sm_20.

In order to compile it for newer versions of cuda some adjustements must be done in the files:
torch/extra/cutorch/cmake/FindCudaArch.cmake
torch/extra/cunn/cmake/FindCudaArch.cmake
torch/extra/cunnx/cmake/FindCudaArch.cmake
torch/extra/cucmake/FindCudaArch.cmake

At the begining of the file there is the line:

SET(KNOWN_GPU_ARCHITECTURES "2.0 2.1(2.0) 3.0 3.5 5.0")

if we are going to use CUDA >= 9 we need to remove 2.0 2.1(2.0)

and we need to add our architecture, for gtx sm_61 it would be 6.1

I personally added it in the IF (CUDA_VERSION VERSION_GREATER "6.5") part

error when trying run experiments

I thank you for your code. It is a great work. I have a question. when i want to run experiments (./run.sh seq2seq [jobsqueries|atis|geoqueries] lstm commands), i receive an error.This is a description for the error . I put the new ClassNLLCriterion.cu file but it had not solve the problem.

`warning: '?.split' will not override existing symbol

loading vocabulary file: /people/bendebba/neural_network/lang2logic-master/seq2seq/jobqueries/data/vocab.q.txt	

oading vocabulary file: /people/bendebba/neural_network/lang2logic-master/seq2seq/jobqueries/data/vocab.f.txt	

loading text file...	

saving /people/bendebba/neural_network/lang2logic-master/seq2seq/jobqueries/data/map.t7	

saving /people/bendebba/neural_network/lang2logic-master/seq2seq/jobqueries/data/train.t7	

loading text file...	

saving /people/bendebba/neural_network/lang2logic-master/seq2seq/jobqueries/data/test.t7	

warning: '?.split' will not override existing symbol

using CUDA on GPU 0...	

Creating encoder	

Creating decoder	

number of parameters in the model: 396801	

loading data: train	

Starting training.	

/people/bendebba/torch/extra/cunn/lib/THCUNN/ClassNLLCriterion.cu:57: void cunn_ClassNLLCriterion_updateOutput_kernel(Dtype *, Dtype *, Dtype *, long *, Dtype *, int, int, int, int, long) [with Dtype = float, Acctype = float]: block: [0,0,0], thread: [0,0,0] Assertion `t >= 0 && t < n_classes` failed.

THCudaCheck FAIL file=/people/bendebba/torch/extra/cutorch/lib/THC/generic/THCStorage.c line=32 error=59 : device-side assert triggered

/people/bendebba/torch/bin/luajit: cuda runtime error (59) : device-side assert triggered at /people/bendebba/torch/extra/cutorch/lib/THC/generic/THCStorage.c:32

stack traceback:

	[C]: at 0x7f7322922d50

	[C]: in function '__index'

	...le/bendebba/torch/share/lua/5.1/nn/ClassNLLCriterion.lua:50: in function 'forward'
lstm/main.lua:211: in function 'opfunc'

	/people/bendebba/torch/share/lua/5.1/optim/rmsprop.lua:35: in function 'rmsprop'
lstm/main.lua:322: in function 'main'

	lstm/main.lua:373: in main chunk

[C]: in function 'dofile'

	...ple/bendebba/torch/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk

[C]: at 0x00405d50

warning: '?.split' will not override existing symbol

using CUDA on GPU 0...	

/people/bendebba/torch/bin/luajit: cannot open </people/bendebba/neural_network/lang2logic-master/seq2seq/jobqueries/dump_lstm/model.t7> in mode r  at /people/bendebba/torch/pkg/torch/lib/TH/THDiskFile.c:670

stack traceback:

	[C]: at 0x7f3788dba080

	[C]: in function 'DiskFile'

	/people/bendebba/torch/share/lua/5.1/torch/File.lua:405: in function 'load'

	lstm/sample.lua:168: in main chunk

	[C]: in function 'dofile'

	...ple/bendebba/torch/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk

	[C]: at 0x00405d50` 

Thank you

Modifying ClassNLLCriterion.cu

Replacing ClassNLLCriterion.cu in ~/torch/extra/cunn/lib/THCUNN/ throws up errors :

/u/<user>/torch/extra/cunn/lib/THCUNN/ClassNLLCriterion.cu(126): error: identifier "THCRealTensor_checkGPU" is undefined

/u/<user>/torch/extra/cunn/lib/THCUNN/ClassNLLCriterion.cu(130): error: identifier "THCRealTensor_checkGPU" is undefined

/u/<user>/torch/extra/cunn/lib/THCUNN/ClassNLLCriterion.cu(198): error: identifier "THCRealTensor_checkGPU" is undefined

/u/<user>/torch/extra/cunn/lib/THCUNN/ClassNLLCriterion.cu(203): error: identifier "THCRealTensor_checkGPU" is undefined

4 errors detected in the compilation of "/tmp/tmpxft_0000621d_00000000-7_ClassNLLCriterion.cpp1.ii".
CMake Error at THCUNN_generated_ClassNLLCriterion.cu.o.cmake:267 (message):
  Error generating file
  /u/<user>/torch/extra/cunn/build/lib/THCUNN/CMakeFiles/THCUNN.dir//./THCUNN_generated_ClassNLLCriterion.cu.o

How to obtain source code?

Dear Sir or Madam,

I would like to reproduce the results from your paper "Language to Logical Form with Neural Attention" which links here, but there is no source code in this repository. Could you tell me how to obtain it?

Thank you very much in advance.

Best wishes,
Joe

Recompiled Torch 7 but still cannot reproduce results

Hi,

I recompiled torch 7 as specified in the README but still cannot reproduce the results.

If any one has successively re-trained the model would you please share your experience? Are there any hyperparameter settings I should change?

It looks like there is a bug, many of my error pattern looks like this:
X XX X XX XX XX X X XXX X
X XX X XX XX XX X locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 locid1 )

I replaced the actual words in the data with "X". The model is initially doing correct prediction but then failed. This shouldn't be a decoding error for I can reproduce the results with the pre-trained model.

Thanks.

./run.sh seq2seq jobqueries lstm problem

warning: '?.split' will not override existing symbol
loading vocabulary file: /home/oanat/lang2logic/seq2seq/jobqueries/data/vocab.q.txt
loading vocabulary file: /home/oanat/lang2logic/seq2seq/jobqueries/data/vocab.f.txt
loading text file...
saving /home/oanat/lang2logic/seq2seq/jobqueries/data/map.t7
saving /home/oanat/lang2logic/seq2seq/jobqueries/data/train.t7
loading text file...
saving /home/oanat/lang2logic/seq2seq/jobqueries/data/test.t7
warning: '?.split' will not override existing symbol
using CUDA on GPU 0...
Creating encoder
Creating decoder
number of parameters in the model: 396801
loading data: train
Starting training.
/home/oanat/torch/extra/cunn/lib/THCUNN/ClassNLLCriterion.cu:57: void cunn_ClassNLLCriterion_updateOutput_kernel(Dtype *, Dtype *, Dtype *, long *, Dtype *, int, int, int, int, long) [with Dtype = float, Acctype = float]: block: [0,0,0], thread: [0,0,0] Assertion t >= 0 && t < n_classes failed.
THCudaCheck FAIL file=/home/oanat/torch/extra/cutorch/lib/THC/generic/THCStorage.c line=32 error=59 : device-side assert triggered
/home/oanat/torch/install/bin/luajit: cuda runtime error (59) : device-side assert triggered at /home/oanat/torch/extra/cutorch/lib/THC/generic/THCStorage.c:32
stack traceback:
[C]: at 0x7f4dca7647d0
[C]: in function '__index'
...nat/torch/install/share/lua/5.1/nn/ClassNLLCriterion.lua:50: in function 'forward'
lstm/main.lua:211: in function 'opfunc'
/home/oanat/torch/install/share/lua/5.1/optim/rmsprop.lua:35: in function 'rmsprop'
lstm/main.lua:322: in function 'main'
lstm/main.lua:373: in main chunk
[C]: in function 'dofile'
...anat/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
[C]: at 0x00406670
warning: '?.split' will not override existing symbol
using CUDA on GPU 0...
/home/oanat/torch/install/bin/luajit: cannot open </home/oanat/lang2logic/seq2seq/jobqueries/dump_lstm/model.t7> in mode r at /home/oanat/torch/pkg/torch/lib/TH/THDiskFile.c:670
stack traceback:
[C]: at 0x7fa0e1c44350
[C]: in function 'DiskFile'
/home/oanat/torch/install/share/lua/5.1/torch/File.lua:405: in function 'load'
lstm/sample.lua:168: in main chunk
[C]: in function 'dofile'
...anat/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
[C]: at 0x00406670

IFTTT dataset

The link does not include the IFTTT dataset used in paper. Please provide this also.

Thank you.

Nvidia-Dockers

hey all!

I created a nvidia-docker working. I can't really test it on other enviroments because I don't really have the anything else, sorry for that. If anyone has any problems please comment it.

https://hub.docker.com/r/tarmabal/lang2logic/

It works on my Debian sid with CUDA 9.1 and a gtx 1050.

I wanted to imitate the most I could the test enviroment so:
The dockers is a CentOS7 (https://hub.docker.com/r/nvidia/cuda/) with already configured cuda (8.0-cudnn5-devel-centos7)
I installed my self the modified torch and make it work with my gtx1050 as explained in #12
Pulled the repository and downloaded the data.

it should run out of the box with the example commands in this repo

I've replaced the 'ClassNLLCriterion.cu' to the right place, but it's still wrong, details are as follows:

/home/autonlp/torch/extra/cunn/lib/THCUNN/ClassNLLCriterion.cu:57: void cunn_ClassNLLCriterion_updateOutput_kernel(Dtype *, Dtype *, Dtype *, long *, Dtype *, int, int, int, int, long) [with Dtype = float, Acctype = float]: block: [0,0,0], thread: [0,0,0] Assertion t >= 0 && t < n_classes failed.
THCudaCheck FAIL file=/home/autonlp/torch/extra/cutorch/lib/THC/generic/THCStorage.c line=32 error=59 : device-side assert triggered
/home/autonlp/torch/install/bin/luajit: cuda runtime error (59) : device-side assert triggered at /home/autonlp/torch/extra/cutorch/lib/THC/generic/THCStorage.c:32
stack traceback:
[C]: at 0x7ff0f81c2c10
[C]: in function '__index'
...nlp/torch/install/share/lua/5.1/nn/ClassNLLCriterion.lua:50: in function 'forward'
attention/main.lua:221: in function 'opfunc'
/home/autonlp/torch/install/share/lua/5.1/optim/rmsprop.lua:35: in function 'rmsprop'
attention/main.lua:347: in function 'main'
attention/main.lua:399: in main chunk
[C]: in function 'dofile'
...onlp/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
[C]: at 0x004064f0

~/torch/extra/cunn/lib/THCUNN/ClassNLLCriterion.cu

  • Replacing the ClassNLLCriterion.cu with the method from README caused the failure installation of torch7 . I guess whether the version of torch7 cannot be consistent with the lang2logic's ClassNLLCriterion.cu.

  • I also install torch 7 without replacing the ClassNLLCriterion.cu. although torch7 install successfully, there are some error happened displayed below when I run the code with "./run.sh seq2seq jobqueries lstm".
    Starting training. /root/torch/extra/cunn/lib/THCUNN/ClassNLLCriterion.cu:52: void cunn_ClassNLLCriterion_updateOutput_kernel(Dtype *, Dtype *, Dtype *, long *, Dtype *, int, int, int, int) [with Dtype = float, Acctype = float]: block: [0,0,0], thread: [0,0,0] Assertion t >= 0 && t < n_classesfailed. THCudaCheck FAIL file=/root/torch/extra/cutorch/lib/THC/generic/THCStorage.c line=32 error=59 : device-side assert triggered /root/torch/install/bin/luajit: cuda runtime error (59) : device-side assert triggered at /root/torch/extra/cutorch/lib/THC/generic/THCStorage.c:32 stack traceback: [C]: at 0x7f78f5466530 [C]: in function '__index' /root/torch/install/share/lua/5.1/nn/ClassNLLCriterion.lua:52: in function 'forward' lstm/main.lua:211: in function 'opfunc' /root/torch/install/share/lua/5.1/optim/rmsprop.lua:35: in function 'rmsprop' lstm/main.lua:322: in function 'main' lstm/main.lua:373: in main chunk [C]: in function 'dofile' /root/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk [C]: at 0x00405e40 warning: '?.split' will not override existing symbol using CUDA on GPU 0... /root/torch/install/bin/luajit: cannot open </mnt/disk_data_ssd/wanglei/lang2logic/seq2seq/jobqueries/dump_lstm/model.t7> in mode r at /root/torch/pkg/torch/lib/TH/THDiskFile.c:670 stack traceback: [C]: at 0x7ff352a3e0e0 [C]: in function 'DiskFile' /root/torch/install/share/lua/5.1/torch/File.lua:405: in function 'load' lstm/sample.lua:168: in main chunk [C]: in function 'dofile' /root/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk [C]: at 0x00405e40

Make it work with newer versions of torch

I know torch has change and it would be really nice to adapt the code and the file ClassNLLCriterion.cu according to the newer versions of the torch.

I tried to modify the file on torch myself but I was getting index errors, maybe a little help would be nice.

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.