iamDecode / sklearn-pmml-model

A library to parse and convert PMML models into Scikit-learn estimators.
BSD 2-Clause "Simplified" License
76 stars 15 forks source link

Improvements to estimator auto detect #52

Closed iamDecode closed 11 months ago

iamDecode commented 11 months ago

This PR fixes an issue for loading file-like objects (file could be closed before completing the import), and adds support for non-seekable file-like objects. I assumed seek would be universally supported but it turns out that is not the case. Non-seekable files will be read entirely in advance, and converted to a StringIO feed for the rest of the processing. This has a slight impact on performance compared to seekable files.

codecov[bot] commented 11 months ago

Codecov Report

Merging #52 (8b6a760) into master (e187c8a) will increase coverage by 0.00%. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master      #52   +/-   ##
=======================================
  Coverage   99.44%   99.44%           
=======================================
  Files          24       24           
  Lines        1252     1258    +6     
=======================================
+ Hits         1245     1251    +6     
  Misses          7        7           
Files Coverage Δ
sklearn_pmml_model/auto_detect/base.py 100.00% <100.00%> (ø)

:mega: Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today!