Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve package loading speed #75

Closed
nic-barbara opened this issue May 29, 2023 · 3 comments · Fixed by #116
Closed

Improve package loading speed #75

nic-barbara opened this issue May 29, 2023 · 3 comments · Fixed by #116
Assignees
Labels
enhancement New feature or request

Comments

@nic-barbara
Copy link
Member

Is there anything we can do to improve load speeds when typing using RobustNeuralNetworks in the REPL? Are we unnecessarily loading large parts of Flux.jl or Zygote.jl that we could get away with ignoring?

@nic-barbara nic-barbara added the enhancement New feature or request label Jun 9, 2023
@nic-barbara
Copy link
Member Author

Worth looking into PrecompileTools.jl for this. Can also look at package extensions.

@nic-barbara
Copy link
Member Author

A lot of the loading speed seems to come from loading Flux.jl, which we don't actually need... we could just load the essential parts like NNLib.jl, Functors.jl, and write gradient rules with ChainRulesCore.jl, which we'll switch to in #94 anyway.

We also don't need to load MatrixEquations.jl, the version of ContractingRENParams that takes in a linear system is not really used, and could be added back in a later extension of the package if required.

@nic-barbara nic-barbara self-assigned this Aug 2, 2023
@nic-barbara
Copy link
Member Author

On second thoughts, removing Flux.jl and Zygote.jl sounds like a bad idea. Requires re-implementing things like glorot_normal which should have a standard interface across all ML libraries.

It also only takes package loading speeds down from 2.4s to about 1.7s on my MacbookPro on Julia v1.9. Minimal overhead anyway, so let's leave this alone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant