hammlab / Crowd-ML

Framework for Crowd-sourced Machine Learning
Apache License 2.0
16 stars 10 forks source link

Missing parameter in Constants.js while running Android server script #5

Closed tylermzeller closed 7 years ago

tylermzeller commented 7 years ago

When I try to run crowdML-server-Android.js (master branch), I get the following error:

Error: Firebase.update failed: First argument contains undefined in property 'parameters.maxIter

If you look at line 30 in crowdML-server-Android.js it is looking for the maxIter variable

30| var maxIter = constants.maxIter;

However this variable is not present in any of the Constants.js files. Should this variable be removed from the server file or added to the constants file?

tylermzeller commented 7 years ago

For now I have just removed it from the server file. Runs fine otherwise.

ynxyn commented 7 years ago

I think maxIter is created for test version, because test version does not require user input, which means server will define the number of time of iteration for client, and then client will retrieve the value from firebase, and begin to iterate. If you use a test version, I will suggest add maxIter into your Constants.js. It may be a way to solve your problem. Add both two lines into your Constants.js:

var maxIter = 100; #you can define this number by yourself. exports.maxIter = maxIter;