Skip to content

Commit

Permalink
Add XGBoost test file (#1309)
Browse files Browse the repository at this point in the history
  • Loading branch information
lutzroeder committed Jul 1, 2024
1 parent 573e917 commit eeae4d4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
14 changes: 7 additions & 7 deletions source/python.js
Original file line number Diff line number Diff line change
Expand Up @@ -2096,17 +2096,17 @@ python.Execution = class {
});
this.registerType('joblib.numpy_pickle.NumpyArrayWrapper', class {

__setstate__(state) {
this.subclass = state.subclass;
this.dtype = state.dtype;
this.shape = state.shape;
this.order = state.order;
this.allow_mmap = state.allow_mmap;
}
__read__(unpickler) {
if (this.dtype.__name__ === 'object') {
return unpickler.load();
}
if (this.numpy_array_alignment_bytes) {
const [size] = unpickler.read(1);
unpickler.read(size);
}
if (this.order === 'F') {
throw new python.Error('Fortran order not implemented.');
}
const size = this.dtype.itemsize * this.shape.reduce((a, b) => a * b, 1);
this.data = unpickler.read(size);
return execution.invoke(this.subclass, [this.shape, this.dtype, this.data]);
Expand Down
7 changes: 7 additions & 0 deletions test/models.json
Original file line number Diff line number Diff line change
Expand Up @@ -6409,6 +6409,13 @@
"format": "scikit-learn v0.24.0rc1",
"link": "https://github.com/lutzroeder/netron/issues/182"
},
{
"type": "sklearn",
"target": "numpy_array_alignment_bytes.pkl",
"source": "https://github.com/user-attachments/files/16054844/numpy_array_alignment_bytes.pkl.zip[numpy_array_alignment_bytes.pkl]",
"format": "scikit-learn",
"link": "https://github.com/lutzroeder/netron/issues/182"
},
{
"type": "sklearn",
"target": "phoenix_ml_classifier.pkl",
Expand Down

0 comments on commit eeae4d4

Please sign in to comment.