Linker Errors in Part-2 "01a_fastai_layers.ipynb" Notebook


I am trying to run the 01a_fastai_layers.ipynb notebook. But I am getting the following error, while running the fileds in Jupyter-lab.

error: Couldn't lookup symbols:

From the error log, I think there is some problem with the “callAsFunction” which is defined as an extension.

public extension FALayer {
    @differentiable(vjp: callGrad)
    func callAsFunction(_ input: Input) -> Output {
        let activation = forward(input)
        for d in delegates { d(activation) }
        return activation

Is not being linked to the base protocol.

public protocol FALayer: Layer {
    var delegates: [(Output) -> ()] { get set }
    // FALayer's will implement this instead of `func call`.
    func forward(_ input: Input) -> Output
    associatedtype Input
    associatedtype Output

Not sure how to fix this error. I tried to add the custom command line option to build it using the ** -enable-library-evolution** mode initally

%install-swiftpm-flags -enable-library-evolution

But looks like option (-enable-library-evolution) is not available in swiftpm-flags
I also tried to remove the @frozen options in the cells, but that didn’t help either. Not sure what I’m missing. Any inputs will be of great help

PS: here is my swift version and I am using the CPU only version of S4TF

swift --version
Swift version 5.2-dev
Target: x86_64-unknown-linux-gnu


Okay. Looks like the notebooks available in the fasti course-v3 repo is old outdated.

I switched to the swiftai official repo and things are working as expected.
Please update the v3-repo or add a link to redirect to the official repo.

The course is meant to be run with the 0.4 toolchain. The up to date notebooks are in fasta_dev repo.