Open alashworth opened 5 years ago
Comment by doikov
Wednesday Apr 26, 2017 at 01:22 GMT
Do we need to check that the variable is really used in the model, I mean in a strict sense: changing the value of variable leads to changing of the output?
I suppose not, because it sounds too unrealistic to detect that, am I right?
So, If we only need to detect that the model class somehow touch the variable, then the problem looks not so difficult: we can
Comment by bob-carpenter
Wednesday Apr 26, 2017 at 17:20 GMT
@doykov --- you're right that it's impossible to check if a variable is really used.
What we want to flag is any variable with a definition in the input file (and in the interfaces in the dictionary, list whatever) is declared as a data variable in the program.
What you're suggesting is the only way I can see to implement it.
This isn't such a high priority issue as we plan to swap out the R dump format in the near future for either JSON or protocol buffers. And most of our users use R or Python anyway. But if you want to tackle it, it'll be useful for at least another year or two!
Comment by sakrejda
Friday Apr 28, 2017 at 14:13 GMT
@bob-carpenter I suggested this issue because @doykov did a GSoC proposal for the protobuf project and part of that is working with var contexts. I agree this isn't a very high priority issue but it's a good excuse for him to muck around in the var_context code.
Summary:
Add a warning for data variables included in a data file that are not used in the model.
Current Version:
v2.14.0