I think this cell in 09_optimizer
public extension StatefulOptimizer {
func setParam(_ hp: String, _ val: Float) {
for i in 0..<configs.count { configs[i][hp] = val }
}
}
needs an //export
. I was otherwise unable to build 11_imagenette
or import 09_optimizer
into my own nb, as it was failing with an error saying “StatefulOptimizer has no member setParam
” or similar (I forgot to save the actual error text).
As an aside, I couldn’t get the notebook to recompile properly, either; I ran notebookToScript(fname: Path.cwd / "09_optimizer.ipynb")
and then exportNotebooks(Path.cwd)
but it didn’t seem to update the package. I had to manually write the above extension into FastaiNotebook_09_optimizer/Sources/FastaiNotebook_09_optimizer/09_optimizer.swift
to get that module to import.
Sorry if this is already fixed and/or I’m missing something stupid (again).