However, now that we no longer depend on RunMe logs config.learner could be nil and this would return no training directories. In which case learner.Reconcile would not attempt to save any examples
The fix is to allow config.Learner to be nil in GetTrainingDirs and return a suitable default.
We also need to ensure the training directory gets created if it doesn't exist.
My suspicion is that I never hit this bug because i originally created my ~/.foyle/training directory using a version of the code which wasn't using FileHelper and explicitly checked and created the directory. I suspect when I refactored the code to support saving examples to GCS thats when the code to ensure the directory exists got dropped.
The bug is described in https://github.com/jlewi/foyle/issues/215#issuecomment-2357274369
The bug is that
Config.getTrainingDirs
returns no training directories if config.learner == nilPrior to https://github.com/jlewi/foyle/issues/211 config.learner would be non-nil because we had to set the path of the RunMe logs
However, now that we no longer depend on RunMe logs config.learner could be nil and this would return no training directories. In which case learner.Reconcile would not attempt to save any examples
The fix is to allow config.Learner to be nil in GetTrainingDirs and return a suitable default.
We also need to ensure the training directory gets created if it doesn't exist.