smartcorelib / smartcore

A comprehensive library for machine learning and numerical computing. The library provides a set of tools for linear algebra, numerical computing, optimization, and enables a generic, powerful yet still efficient approach to machine learning.
https://smartcorelib.org/
Apache License 2.0
698 stars 75 forks source link

Handle kernel serialization #232

Closed morenol closed 1 year ago

morenol commented 1 year ago

Fixes https://github.com/smartcorelib/smartcore/issues/221

Checklist

Current behaviour

New expected behaviour

codecov-commenter commented 1 year ago

Codecov Report

:exclamation: No coverage uploaded for pull request base (development@9eaae9e). Click here to learn what that means. The diff coverage is n/a.

:exclamation: Current head fe27ce9 differs from pull request most recent head f883525. Consider uploading reports for the commit f883525 to get more accurate results

@@              Coverage Diff               @@
##             development     #232   +/-   ##
==============================================
  Coverage               ?   44.15%           
==============================================
  Files                  ?       85           
  Lines                  ?     7275           
  Branches               ?        0           
==============================================
  Hits                   ?     3212           
  Misses                 ?     4063           
  Partials               ?        0           
Impacted Files Coverage Δ
src/svm/mod.rs 32.25% <ø> (ø)
src/svm/svc.rs 33.18% <ø> (ø)
src/svm/svr.rs 44.84% <ø> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

morenol commented 1 year ago

Wow, typetag is not usable in wasm, I disabled that for WASM32 target. So we have full serialization/deserialization support in all targets except WASM

https://github.com/mmastrac/rust-ctor/issues/14

Mec-iS commented 1 year ago

that is why I wanted default to be empty feature: default = [] so that it could compiled to Wasm, we can assume that for in-browser application serialisation is not needed in the Wasm binary.

please add some tests for Kernel serialisation/deserialisation

morenol commented 1 year ago

that is why I wanted default to be empty feature: default = [] so that it could compiled to Wasm, we can assume that for in-browser application serialisation is not needed in the Wasm binary.

please add some tests for Kernel serialisation/deserialisation

Addressed.

I agree. I think that by default we should not enable any feature

morenol commented 1 year ago

so that it could compiled to Wasm, we can assume that for in-browser application serialisation is not needed in the Wasm binary.

I think that there could be a couple of use cases in wasm where deserialization could be useful, but I think that is ok for now to partially support WASM

Mec-iS commented 1 year ago

I think that there could be a couple of use cases in wasm where deserialization could be useful, but I think that is ok for now to partially support WASM

yes something we can add later or leave it to the implementation in JS

Mec-iS commented 1 year ago

@morenol please double check that these changes are inline with the new features setup.