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

compilation errors with latest version of dynet. #67

Open
sairahul opened this issue May 5, 2019 · 0 comments
Open

compilation errors with latest version of dynet. #67

sairahul opened this issue May 5, 2019 · 0 comments

Comments

@sairahul
Copy link

sairahul commented May 5, 2019

Hi,

I tried compiling the pnp with latest version of the dynet. Looks like the latest version is incompatable with pnp. The function signatures are not matching. (https://dynet.readthedocs.io/en/latest/optimizers.html) Whats the recommended version of dynet ?

[error] /Users/pulikunt/lib/pnp/src/main/scala/org/allenai/dqa/labeling/LabelingDqaCli.scala:123:55: too many arguments (3) for constructor SimpleSGDTrainer: (m: edu.cmu.dynet.ParameterCollection, learningRate: Float)edu.cmu.dynet.SimpleSGDTrainer
[error] val sgd = new SimpleSGDTrainer(model.model, 0.1f, 0.01f)
[error] ^
[error] /Users/pulikunt/lib/pnp/src/main/scala/org/allenai/dqa/matching/MatchingModel.scala:506:11: value addObject is not a member of edu.cmu.dynet.ModelSaver
[error] saver.addObject(config)
[error] ^
[error] /Users/pulikunt/lib/pnp/src/main/scala/org/allenai/dqa/matching/MatchingModel.scala:507:11: value addLstmBuilder is not a member of edu.cmu.dynet.ModelSaver
[error] saver.addLstmBuilder(forwardBuilder)
[error] ^
[error] /Users/pulikunt/lib/pnp/src/main/scala/org/allenai/dqa/matching/MatchingModel.scala:508:11: value addLstmBuilder is not a member of edu.cmu.dynet.ModelSaver
[error] saver.addLstmBuilder(backwardBuilder)
[error] ^
[error] /Users/pulikunt/lib/pnp/src/main/scala/org/allenai/dqa/matching/MatchingModel.scala:509:11: value addLstmBuilder is not a member of edu.cmu.dynet.ModelSaver
[error] saver.addLstmBuilder(contextBuilder)
[error] ^
[error] /Users/pulikunt/lib/pnp/src/main/scala/org/allenai/dqa/matching/MatchingModel.scala:510:11: value addLstmBuilder is not a member of edu.cmu.dynet.ModelSaver
[error] saver.addLstmBuilder(pointerNetInputBuilder)
[error] ^
[error] /Users/pulikunt/lib/pnp/src/main/scala/org/allenai/dqa/matching/MatchingModel.scala:511:11: value addLstmBuilder is not a member of edu.cmu.dynet.ModelSaver
[error] saver.addLstmBuilder(pointerNetOutputBuilder)
[error] ^
[error] /Users/pulikunt/lib/pnp/src/main/scala/org/allenai/dqa/matching/MatchingModel.scala:512:11: value addObject is not a member of edu.cmu.dynet.ModelSaver
[error] saver.addObject(labelDict)
[error] ^
[error] /Users/pulikunt/lib/pnp/src/main/scala/org/allenai/pnp/PnpModel.scala:15:16: not found: type Model
[error] val model: Model, var locallyNormalized: Boolean) {
[error] ^
[error] /Users/pulikunt/lib/pnp/src/main/scala/org/allenai/dqa/matching/MatchingModel.scala:689:25: value loadObject is not a member of edu.cmu.dynet.ModelLoader
[error] val config = loader.loadObject(classOf[MatchingModelConfig])
[error] ^
[error] /Users/pulikunt/lib/pnp/src/main/scala/org/allenai/dqa/matching/MatchingModel.scala:691:30: value loadLstmBuilder is not a member of edu.cmu.dynet.ModelLoader
[error] val forwardLstm = loader.loadLstmBuilder()
[error] ^
[error] /Users/pulikunt/lib/pnp/src/main/scala/org/allenai/dqa/matching/MatchingModel.scala:692:31: value loadLstmBuilder is not a member of edu.cmu.dynet.ModelLoader
[error] val backwardLstm = loader.loadLstmBuilder()
[error] ^
[error] /Users/pulikunt/lib/pnp/src/main/scala/org/allenai/dqa/matching/MatchingModel.scala:693:36: value loadLstmBuilder is not a member of edu.cmu.dynet.ModelLoader
[error] val contextualBuilder = loader.loadLstmBuilder()
[error] ^
[error] /Users/pulikunt/lib/pnp/src/main/scala/org/allenai/dqa/matching/MatchingModel.scala:694:41: value loadLstmBuilder is not a member of edu.cmu.dynet.ModelLoader
[error] val pointerNetInputBuilder = loader.loadLstmBuilder()
[error] ^
[error] /Users/pulikunt/lib/pnp/src/main/scala/org/allenai/dqa/matching/MatchingModel.scala:695:42: value loadLstmBuilder is not a member of edu.cmu.dynet.ModelLoader
[error] val pointerNetOutputBuilder = loader.loadLstmBuilder()
[error] ^
[error] /Users/pulikunt/lib/pnp/src/main/scala/org/allenai/dqa/matching/MatchingModel.scala:697:28: value loadObject is not a member of edu.cmu.dynet.ModelLoader
[error] val labelDict = loader.loadObject(classOf[IndexedList[String]])
[error] ^
[error] /Users/pulikunt/lib/pnp/src/main/scala/org/allenai/dqa/matching/TrainMatchingCli.scala:192:65: too many arguments (3) for constructor SimpleSGDTrainer: (m: edu.cmu.dynet.ParameterCollection, learningRate: Float)edu.cmu.dynet.SimpleSGDTrainer
[error] val sgd = new SimpleSGDTrainer(model.model, learningRate, decay)
[error] ^
[error] /Users/pulikunt/lib/pnp/src/main/scala/org/allenai/dqa/matching/TrainMatchingCli.scala:199:65: too many arguments (3) for constructor SimpleSGDTrainer: (m: edu.cmu.dynet.ParameterCollection, learningRate: Float)edu.cmu.dynet.SimpleSGDTrainer
[error] val sgd = new SimpleSGDTrainer(model.model, learningRate, decay)
[error] ^
[error] /Users/pulikunt/lib/pnp/src/main/scala/org/allenai/pnp/BsoTrainer.scala:181:22: no arguments allowed for nullary method update: ()Unit
[error] trainer.update(1.0f)
[error] ^
[error] /Users/pulikunt/lib/pnp/src/main/scala/org/allenai/pnp/CompGraph.scala:9:28: not found: type Model
[error] class CompGraph(val model: Model,
[error] ^
[error] /Users/pulikunt/lib/pnp/src/main/scala/org/allenai/pnp/CompGraph.scala:23:20: not found: type Model
[error] def empty(model: Model): CompGraph = {
[error] ^
[error] /Users/pulikunt/lib/pnp/src/main/scala/org/allenai/pnp/GlobalLoglikelihoodTrainer.scala:48:26: no arguments allowed for nullary method update: ()Unit
[error] trainer.update(1.0f)
[error] ^
[error] /Users/pulikunt/lib/pnp/src/main/scala/org/allenai/pnp/LoglikelihoodTrainer.scala:66:26: no arguments allowed for nullary method update: ()Unit
[error] trainer.update(1.0f)
[error] ^
[error] /Users/pulikunt/lib/pnp/src/main/scala/org/allenai/pnp/PnpModel.scala:56:11: value addBoolean is not a member of edu.cmu.dynet.ModelSaver
[error] saver.addBoolean(locallyNormalized)
[error] ^
[error] /Users/pulikunt/lib/pnp/src/main/scala/org/allenai/pnp/PnpModel.scala:58:11: value addInt is not a member of edu.cmu.dynet.ModelSaver
[error] saver.addInt(names.size)
[error] ^
[error] /Users/pulikunt/lib/pnp/src/main/scala/org/allenai/pnp/PnpModel.scala:60:13: value addObject is not a member of edu.cmu.dynet.ModelSaver
[error] saver.addObject(k)
[error] ^
[error] /Users/pulikunt/lib/pnp/src/main/scala/org/allenai/pnp/PnpModel.scala:64:11: value addInt is not a member of edu.cmu.dynet.ModelSaver
[error] saver.addInt(lookupNames.size)
[error] ^
[error] /Users/pulikunt/lib/pnp/src/main/scala/org/allenai/pnp/PnpModel.scala:66:13: value addObject is not a member of edu.cmu.dynet.ModelSaver
[error] saver.addObject(k)
[error] ^
[error] /Users/pulikunt/lib/pnp/src/main/scala/org/allenai/pnp/PnpModel.scala:74:36: not found: type Model
[error] new PnpModel(Map(), Map(), new Model, locallyNormalized)
[error] ^
[error] /Users/pulikunt/lib/pnp/src/main/scala/org/allenai/pnp/PnpModel.scala:78:24: value loadModel is not a member of edu.cmu.dynet.ModelLoader
[error] val model = loader.loadModel()
[error] ^
[error] /Users/pulikunt/lib/pnp/src/main/scala/org/allenai/pnp/PnpModel.scala:79:36: value loadBoolean is not a member of edu.cmu.dynet.ModelLoader
[error] val locallyNormalized = loader.loadBoolean()
[error] ^
[error] /Users/pulikunt/lib/pnp/src/main/scala/org/allenai/pnp/PnpModel.scala:81:28: value loadInt is not a member of edu.cmu.dynet.ModelLoader
[error] val numParams = loader.loadInt()
[error] ^
[error] /Users/pulikunt/lib/pnp/src/main/scala/org/allenai/pnp/PnpModel.scala:84:25: value loadObject is not a member of edu.cmu.dynet.ModelLoader
[error] val name = loader.loadObject(classOf[String])
[error] ^
[error] /Users/pulikunt/lib/pnp/src/main/scala/org/allenai/pnp/PnpModel.scala:85:26: value loadParameter is not a member of edu.cmu.dynet.ModelLoader
[error] val param = loader.loadParameter()
[error] ^
[error] /Users/pulikunt/lib/pnp/src/main/scala/org/allenai/pnp/PnpModel.scala:89:29: value loadInt is not a member of edu.cmu.dynet.ModelLoader
[error] val numLookups = loader.loadInt()
[error] ^
[error] /Users/pulikunt/lib/pnp/src/main/scala/org/allenai/pnp/PnpModel.scala:92:25: value loadObject is not a member of edu.cmu.dynet.ModelLoader
[error] val name = loader.loadObject(classOf[String])
[error] ^
[error] /Users/pulikunt/lib/pnp/src/main/scala/org/allenai/pnp/PnpModel.scala:93:26: value loadLookupParameter is not a member of edu.cmu.dynet.ModelLoader
[error] val param = loader.loadLookupParameter()
[error] ^
[error] /Users/pulikunt/lib/pnp/src/main/scala/org/allenai/pnp/examples/Seq2Seq.scala:282:55: too many arguments (3) for constructor SimpleSGDTrainer: (m: edu.cmu.dynet.ParameterCollection, learningRate: Float)edu.cmu.dynet.SimpleSGDTrainer
[error] val sgd = new SimpleSGDTrainer(model.model, 0.1f, 0.01f)
[error] ^
[error] /Users/pulikunt/lib/pnp/src/main/scala/org/allenai/pnp/semparse/SemanticParser.scala:445:11: value addObject is not a member of edu.cmu.dynet.ModelSaver
[error] saver.addObject(actionSpace)
[error] ^
[error] /Users/pulikunt/lib/pnp/src/main/scala/org/allenai/pnp/semparse/SemanticParser.scala:446:11: value addObject is not a member of edu.cmu.dynet.ModelSaver
[error] saver.addObject(vocab)
[error] ^
[error] /Users/pulikunt/lib/pnp/src/main/scala/org/allenai/pnp/semparse/SemanticParser.scala:447:11: value addInt is not a member of edu.cmu.dynet.ModelSaver
[error] saver.addInt(inputDim)
[error] ^
[error] /Users/pulikunt/lib/pnp/src/main/scala/org/allenai/pnp/semparse/SemanticParser.scala:448:11: value addInt is not a member of edu.cmu.dynet.ModelSaver
[error] saver.addInt(hiddenDim)
[error] ^
[error] /Users/pulikunt/lib/pnp/src/main/scala/org/allenai/pnp/semparse/SemanticParser.scala:449:11: value addInt is not a member of edu.cmu.dynet.ModelSaver
[error] saver.addInt(maxVars)
[error] ^
[error] /Users/pulikunt/lib/pnp/src/main/scala/org/allenai/pnp/semparse/SemanticParser.scala:450:11: value addLstmBuilder is not a member of edu.cmu.dynet.ModelSaver
[error] saver.addLstmBuilder(forwardBuilder)
[error] ^
[error] /Users/pulikunt/lib/pnp/src/main/scala/org/allenai/pnp/semparse/SemanticParser.scala:451:11: value addLstmBuilder is not a member of edu.cmu.dynet.ModelSaver
[error] saver.addLstmBuilder(backwardBuilder)
[error] ^
[error] /Users/pulikunt/lib/pnp/src/main/scala/org/allenai/pnp/semparse/SemanticParser.scala:452:11: value addLstmBuilder is not a member of edu.cmu.dynet.ModelSaver
[error] saver.addLstmBuilder(actionBuilder)
[error] ^
[error] /Users/pulikunt/lib/pnp/src/main/scala/org/allenai/pnp/semparse/SemanticParser.scala:633:30: value loadObject is not a member of edu.cmu.dynet.ModelLoader
[error] val actionSpace = loader.loadObject(classOf[ActionSpace])
[error] ^
[error] /Users/pulikunt/lib/pnp/src/main/scala/org/allenai/pnp/semparse/SemanticParser.scala:634:24: value loadObject is not a member of edu.cmu.dynet.ModelLoader
[error] val vocab = loader.loadObject(classOf[IndexedList[String]])
[error] ^
[error] /Users/pulikunt/lib/pnp/src/main/scala/org/allenai/pnp/semparse/SemanticParser.scala:635:27: value loadInt is not a member of edu.cmu.dynet.ModelLoader
[error] val inputDim = loader.loadInt()
[error] ^
[error] /Users/pulikunt/lib/pnp/src/main/scala/org/allenai/pnp/semparse/SemanticParser.scala:636:28: value loadInt is not a member of edu.cmu.dynet.ModelLoader
[error] val hiddenDim = loader.loadInt()
[error] ^
[error] /Users/pulikunt/lib/pnp/src/main/scala/org/allenai/pnp/semparse/SemanticParser.scala:637:26: value loadInt is not a member of edu.cmu.dynet.ModelLoader
[error] val maxVars = loader.loadInt()
[error] ^
[error] /Users/pulikunt/lib/pnp/src/main/scala/org/allenai/pnp/semparse/SemanticParser.scala:638:33: value loadLstmBuilder is not a member of edu.cmu.dynet.ModelLoader
[error] val forwardBuilder = loader.loadLstmBuilder()
[error] ^
[error] /Users/pulikunt/lib/pnp/src/main/scala/org/allenai/pnp/semparse/SemanticParser.scala:639:34: value loadLstmBuilder is not a member of edu.cmu.dynet.ModelLoader
[error] val backwardBuilder = loader.loadLstmBuilder()
[error] ^
[error] /Users/pulikunt/lib/pnp/src/main/scala/org/allenai/pnp/semparse/SemanticParser.scala:640:32: value loadLstmBuilder is not a member of edu.cmu.dynet.ModelLoader
[error] val actionBuilder = loader.loadLstmBuilder()
[error] ^
[error] /Users/pulikunt/lib/pnp/src/main/scala/org/allenai/pnp/semparse/TrainSemanticParserCli.scala:150:55: too many arguments (3) for constructor SimpleSGDTrainer: (m: edu.cmu.dynet.ParameterCollection, learningRate: Float)edu.cmu.dynet.SimpleSGDTrainer
[error] val sgd = new SimpleSGDTrainer(model.model, 0.1f, 0.01f)
[error] ^
[error] 55 errors found
[error] (Compile / compileIncremental) Compilation failed
[error] Total time: 5 s, completed May 5, 2019 12:35:28 AM

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