VisionEval / VisionEval-Dev

Development version of VisionEval framework
https://visioneval.github.io/
Apache License 2.0
6 stars 32 forks source link

Add a "getModuleL" function to the framework code to assist with debugging #155

Closed gregorbj closed 2 years ago

gregorbj commented 2 years ago

Sometimes debugging requires digging into module code using datastore data that is creating an error. In these instances I like to load the data used by the module (the 'L' list) into my workspace (e.g. R Studio) and then step through the module code. I've modified the 'testModule' framework function to create a function that will retrieve the datastore data and create the 'L' list. A copy is here: https://github.com/gregorbj/OregonDOT-VisionEval/blob/master/sources/getModuleL.R It would be good to include a version of this function in the framework code.

jrawbits commented 2 years ago

A couple of thoughts on this in light of the VE 3.0 architecture.

I'm planning to add a "RunScript" function to the framework (like RunModule) that will load an R file (that contains module code) and get access the Datastore. For development purposes, we could create a base model that sets up the pre-requisites in the datastore, then create a stage on that model whose run_model.R script contains a single RunScript line. Then just running that stage will run the script (with the L object being built based on whatever specifications are associated with the script). So far, it's just a concept (though there is a "RunScript" partly written in the 3.0 visioneval package) - need to deal with specifications better during model loading.

That approach will solve the need for pre-requisite data, and enable debugging within RStudio - I'm not an RStudio user, so we'll need to play with script file loading requirements to set breakpoints etc.

jrawbits commented 2 years ago

I've added the getModuleL function to the visioneval framework. It will appear in the forthcoming "beta-0.7" release; I'll close that issue when the beta is posted.

jrawbits commented 2 years ago

Fixed in Beta-0.7