Not in copyright. The work speaks for itself, and the function of code is not a copyrightable aspect.
Training a model doesn't involve reproducing a copyrighted work, preparing a derivative work, distributing that work, or performing that work.
Fair use isn't required because none of the exclusive rights afforded by copyright apply.