linfa icon indicating copy to clipboard operation
linfa copied to clipboard

Suggestion: Make serde an optional dependency

Open xd009642 opened this issue 5 years ago • 4 comments

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.

xd009642 avatar Sep 27 '20 16:09 xd009642

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.

paulkoerbitz avatar Sep 27 '20 20:09 paulkoerbitz

we can't move the serde dependency behind a feature flag for linfa-linear and linfa-logistic because of argmin

bytesnake avatar Nov 30 '20 08:11 bytesnake

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.

stefan-k avatar Jan 11 '22 11:01 stefan-k

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.

YuhanLiin avatar Feb 25 '23 18:02 YuhanLiin