linfa
linfa copied to clipboard
Suggestion: Make serde an optional dependency
One suggestion to prevent bringing in more dependencies than a user needs would be to make serde an optional dependency and adjust the Serialize and Deserialize derives be like #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]. This would be a breaking change so would need a minor version update.
This sounds like a good idea, thanks for pointing this out! We're currently contributing a lot of changes for a 0.2 version, so the minor version update is not a problem IMO.
we can't move the serde dependency behind a feature flag for linfa-linear and linfa-logistic because of argmin
I just merged a PR in argmin which adds a feature that allows users to remove the serde dependency. This isn't released yet though and unfortunately I can't make any promises yet as to when there will be a new release.
Update: We just need to bump argmin in linfa-logistic and linfa-ftrl to 0.7, the same way it was done in linfa-linear.