Mystery function disappearance

I have written a rather large module. I use it locally so I have not gone through the complex process to make it a package.

I just refactored some functions, always fraught with peril.

A smaller function in a separate file is used to do some setup and call the primary function in the module.


ERROR: UndefVarError: train_nn not defined
 [1] runjob(::String, ::String) at /Users/lewislevin/Dropbox/Online Coursework/ML Independent explorations/nn by hand/sample.jl:35
 [2] runjob() at /Users/lewislevin/Dropbox/Online Coursework/ML Independent explorations/nn by hand/sample.jl:23
 [3] top-level scope at none:0

The mystery is that function train_nn has 4 methods, so it certainly exists somewhere. I am sure I am overlooking something stupid on my part because this is so simple and fundamental. In the past, this sort of problem is caused by an unmatched or missing “end” somewhere.

It’s a lot of code so I wonder what is best to share to get some help.



Because the module was loaded and its top-level function run from a script (a small function within the script file–as functions are always cleaner), an error message pointing to the problem was suppressed. Loading at REPL made the error clear. I expected the error to be in the file defining the module. It was actually a missing END in an included file.

I found another mystery (to me) posted separately.