Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make error for nt-parser-gen-attention-gated-stack-only #17

Open
jennhu opened this issue Apr 28, 2019 · 0 comments
Open

make error for nt-parser-gen-attention-gated-stack-only #17

jennhu opened this issue Apr 28, 2019 · 0 comments

Comments

@jennhu
Copy link

jennhu commented Apr 28, 2019

I'm trying to build the ablated parser by editing nt-parser/CMakeLists.txt, as it states in the README. My nt-parser/CMakeLists.txt file now looks like this:

PROJECT(dynet:nt-parser)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)

ADD_EXECUTABLE(nt-parser nt-parser.cc eval.cc oracle.cc pretrained.cc)
target_link_libraries(nt-parser dynet ${Boost_LIBRARIES} z)

ADD_EXECUTABLE(nt-parser-gen nt-parser-gen.cc oracle.cc pretrained.cc)
target_link_libraries(nt-parser-gen dynet ${Boost_LIBRARIES} z)

ADD_EXECUTABLE(nt-parser-gen-attention-gated-stack-only nt-parser-gen-attention-gated-stack-only.cc oracle.cc pretrained.cc)
target_link_libraries(nt-parser-gen-attention-gated-stack-only dynet ${Boost_LIBRARIES} z)

However, when I run make -j2, I get the following error (omitting lines related to nt-parser and nt-parser-gen):

[ 97%] Building CXX object nt-parser/CMakeFiles/nt-parser-gen-attention-gated-stack-only.dir/nt-parser-gen-attention-gated-stack-only.cc.o
In file included from /usr/include/c++/4.8.2/cassert:43:0,
                 from /om/group/cpl/language-models/rnng-incremental/dependencies/boost_1_68_0/boost/iostreams/filter/bzip2.hpp:18,
                 from /om/group/cpl/language-models/rnng-incremental/nt-parser/compressed-fstream.h:10,
                 from /om/group/cpl/language-models/rnng-incremental/nt-parser/nt-parser-gen-attention-gated-stack-only.cc:31:
/om/group/cpl/language-models/rnng-incremental/nt-parser/nt-parser-gen-attention-gated-stack-only.cc: In member function std::vector<unsigned int> ParserBuilder::log_prob_parser(cnn::ComputationGraph*, const parser::Sentence&, const std::vector<int>&, double*, bool)’:
/om/group/cpl/language-models/rnng-incremental/nt-parser/nt-parser-gen-attention-gated-stack-only.cc:444:82: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         assert (forward.size() == backward.size() && forward.size() == (nchildren));
                                                                                  ^
/om/group/cpl/language-models/rnng-incremental/nt-parser/nt-parser-gen-attention-gated-stack-only.cc:455:128: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         assert (concatenated.size() == forward.size() && forward.size() == backward.size() && concatenated.size() == (nchildren));
                                                                                                                                ^
/om/group/cpl/language-models/rnng-incremental/nt-parser/nt-parser-gen-attention-gated-stack-only.cc:474:47: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         assert (at_vector.size() == (nchildren));
                                               ^
/om/group/cpl/language-models/rnng-incremental/nt-parser/nt-parser-gen-attention-gated-stack-only.cc:233:16: warning: variable ‘A’ set but not used [-Wunused-but-set-variable]
     Expression A = parameter(*hg, p_A);
                ^
/om/group/cpl/language-models/rnng-incremental/nt-parser/nt-parser-gen-attention-gated-stack-only.cc:234:16: warning: variable ‘T’ set but not used [-Wunused-but-set-variable]
     Expression T = parameter(*hg, p_T);
                ^
/om/group/cpl/language-models/rnng-incremental/nt-parser/nt-parser-gen-attention-gated-stack-only.cc: In function ‘int main(int, char**)’:
/om/group/cpl/language-models/rnng-incremental/nt-parser/nt-parser-gen-attention-gated-stack-only.cc:588:74: error: no matching function for call to ‘parser::TopDownOracleGen::TopDownOracleGen(cnn::Dict*, cnn::Dict*, cnn::Dict*, cnn::Dict*)’
   parser::TopDownOracleGen corpus(&termdict, &adict, &posdict, &ntermdict);
                                                                          ^
/om/group/cpl/language-models/rnng-incremental/nt-parser/nt-parser-gen-attention-gated-stack-only.cc:588:74: note: candidates are:
In file included from /om/group/cpl/language-models/rnng-incremental/nt-parser/nt-parser-gen-attention-gated-stack-only.cc:29:0:
/om/group/cpl/language-models/rnng-incremental/nt-parser/oracle.h:59:3: note: parser::TopDownOracleGen::TopDownOracleGen(dynet::Dict*, dynet::Dict*, dynet::Dict*, dynet::Dict*)
   TopDownOracleGen(dynet::Dict* termdict, dynet::Dict* adict, dynet::Dict* pdict, dynet::Dict* nontermdict) :
   ^
/om/group/cpl/language-models/rnng-incremental/nt-parser/oracle.h:59:3: note:   no known conversion for argument 1 from ‘cnn::Dict*’ to ‘dynet::Dict*’
/om/group/cpl/language-models/rnng-incremental/nt-parser/oracle.h:57:7: note: parser::TopDownOracleGen::TopDownOracleGen(const parser::TopDownOracleGen&)
 class TopDownOracleGen : public Oracle {
       ^
/om/group/cpl/language-models/rnng-incremental/nt-parser/oracle.h:57:7: note:   candidate expects 1 argument, 4 provided
/om/group/cpl/language-models/rnng-incremental/nt-parser/oracle.h:57:7: note: parser::TopDownOracleGen::TopDownOracleGen(parser::TopDownOracleGen&&)
/om/group/cpl/language-models/rnng-incremental/nt-parser/oracle.h:57:7: note:   candidate expects 1 argument, 4 provided
/om/group/cpl/language-models/rnng-incremental/nt-parser/nt-parser-gen-attention-gated-stack-only.cc:589:78: error: no matching function for call to ‘parser::TopDownOracleGen::TopDownOracleGen(cnn::Dict*, cnn::Dict*, cnn::Dict*, cnn::Dict*)’
   parser::TopDownOracleGen dev_corpus(&termdict, &adict, &posdict, &ntermdict);
                                                                              ^
/om/group/cpl/language-models/rnng-incremental/nt-parser/nt-parser-gen-attention-gated-stack-only.cc:589:78: note: candidates are:
In file included from /om/group/cpl/language-models/rnng-incremental/nt-parser/nt-parser-gen-attention-gated-stack-only.cc:29:0:
/om/group/cpl/language-models/rnng-incremental/nt-parser/oracle.h:59:3: note: parser::TopDownOracleGen::TopDownOracleGen(dynet::Dict*, dynet::Dict*, dynet::Dict*, dynet::Dict*)
   TopDownOracleGen(dynet::Dict* termdict, dynet::Dict* adict, dynet::Dict* pdict, dynet::Dict* nontermdict) :
   ^
/om/group/cpl/language-models/rnng-incremental/nt-parser/oracle.h:59:3: note:   no known conversion for argument 1 from ‘cnn::Dict*’ to ‘dynet::Dict*’
/om/group/cpl/language-models/rnng-incremental/nt-parser/oracle.h:57:7: note: parser::TopDownOracleGen::TopDownOracleGen(const parser::TopDownOracleGen&)
 class TopDownOracleGen : public Oracle {
       ^
/om/group/cpl/language-models/rnng-incremental/nt-parser/oracle.h:57:7: note:   candidate expects 1 argument, 4 provided
/om/group/cpl/language-models/rnng-incremental/nt-parser/oracle.h:57:7: note: parser::TopDownOracleGen::TopDownOracleGen(parser::TopDownOracleGen&&)
/om/group/cpl/language-models/rnng-incremental/nt-parser/oracle.h:57:7: note:   candidate expects 1 argument, 4 provided
/om/group/cpl/language-models/rnng-incremental/nt-parser/nt-parser-gen-attention-gated-stack-only.cc:590:80: error: no matching function for call to ‘parser::TopDownOracleGen2::TopDownOracleGen2(cnn::Dict*, cnn::Dict*, cnn::Dict*, cnn::Dict*)’
   parser::TopDownOracleGen2 test_corpus(&termdict, &adict, &posdict, &ntermdict);
                                                                                ^
/om/group/cpl/language-models/rnng-incremental/nt-parser/nt-parser-gen-attention-gated-stack-only.cc:590:80: note: candidates are:
In file included from /om/group/cpl/language-models/rnng-incremental/nt-parser/nt-parser-gen-attention-gated-stack-only.cc:29:0:
/om/group/cpl/language-models/rnng-incremental/nt-parser/oracle.h:68:3: note: parser::TopDownOracleGen2::TopDownOracleGen2(dynet::Dict*, dynet::Dict*, dynet::Dict*, dynet::Dict*)
   TopDownOracleGen2(dynet::Dict* termdict, dynet::Dict* adict, dynet::Dict* pdict, dynet::Dict* nontermdict) :
   ^
/om/group/cpl/language-models/rnng-incremental/nt-parser/oracle.h:68:3: note:   no known conversion for argument 1 from ‘cnn::Dict*’ to ‘dynet::Dict*’
/om/group/cpl/language-models/rnng-incremental/nt-parser/oracle.h:66:7: note: parser::TopDownOracleGen2::TopDownOracleGen2(const parser::TopDownOracleGen2&)
 class TopDownOracleGen2 : public Oracle {
       ^
/om/group/cpl/language-models/rnng-incremental/nt-parser/oracle.h:66:7: note:   candidate expects 1 argument, 4 provided
/om/group/cpl/language-models/rnng-incremental/nt-parser/oracle.h:66:7: note: parser::TopDownOracleGen2::TopDownOracleGen2(parser::TopDownOracleGen2&&)
/om/group/cpl/language-models/rnng-incremental/nt-parser/oracle.h:66:7: note:   candidate expects 1 argument, 4 provided
/om/group/cpl/language-models/rnng-incremental/nt-parser/nt-parser-gen-attention-gated-stack-only.cc:594:87: error: cannot convert ‘cnn::Dict*’ to ‘dynet::Dict*’ for argument ‘2’ to ‘void parser::ReadEmbeddings_word2vec(const string&, dynet::Dict*, std::unordered_map<unsigned int, std::vector<float> >*)’
     parser::ReadEmbeddings_word2vec(conf["words"].as<string>(), &termdict, &pretrained);
                                                                                       ^
/om/group/cpl/language-models/rnng-incremental/nt-parser/nt-parser-gen-attention-gated-stack-only.cc:723:19: warning: unused variable ‘lp’ [-Wunused-variable]
            double lp = 0;
                   ^
make[2]: *** [nt-parser/CMakeFiles/nt-parser-gen-attention-gated-stack-only.dir/nt-parser-gen-attention-gated-stack-only.cc.o] Error 1
make[1]: *** [nt-parser/CMakeFiles/nt-parser-gen-attention-gated-stack-only.dir/all] Error 2
make: *** [all] Error 2

I was able to successfully build and run nt-parser and nt-parser-gen before adding the ablated parser. For reference, I'm using cmake version 2.8.12 and Boost version 1.68.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant