Skip to content

Commit

Permalink
Fix sklearn+array api+torch solver, and add results
Browse files Browse the repository at this point in the history
  • Loading branch information
fcharras committed Jan 16, 2024
1 parent edd2e90 commit 4e1a2c0
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
Binary file not shown.
16 changes: 16 additions & 0 deletions benchmarks/ridge/results.csv
Original file line number Diff line number Diff line change
@@ -1,29 +1,45 @@
Benchmark id,Dtype,Nb data samples,Nb data features,Nb data targets,Walltime,Backend provider,Compute device,Compute runtime,Solver,Nb cpus,Cpu name,Gpu name,RAM (GB),Platform,Platform architecture,Platform release,Run date,Version info,Comment,Result nb iterations,Result objective value,Data random state,Solver random state
3a327106,float32,5000000,100,1,0.735,sklearn-torch-dispatch,cuda,,svd,32,AMD EPYC 7302 16-Core Processor,NVIDIA A100-PCIE-40GB,503,Linux,x86_64,4.18.0-394.el8.x86_64,2024-01-16,scikit-learn 1.5.dev0; torch 2.1.0.post300,,,4.506280786413193,123,123
3a327106,float32,5000000,100,1,1.37,cuml,gpu,,svd,32,AMD EPYC 7502 32-Core Processor,NVIDIA A100-PCIE-40GB,503,Linux,x86_64,4.18.0-394.el8.x86_64,2024-01-15,scikit-learn 1.3.2,,,4.506280786409378,123,123
3a327106,float32,5000000,100,1,1.73,scikit-learn,,,cholesky,32,AMD EPYC 7402 24-Core Processor,,1008,Linux,x86_64,4.18.0-394.el8.x86_64,2024-01-15,scikit-learn 1.3.2,,,4.506297986368179,123,123
3a327106,float32,5000000,100,1,4.3,scikit-learn,,,lsqr,32,AMD EPYC 7402 24-Core Processor,,1008,Linux,x86_64,4.18.0-394.el8.x86_64,2024-01-15,scikit-learn 1.3.2,,25,4.506297986381912,123,123
3a327106,float32,5000000,100,1,5.56,sklearn-torch-dispatch,cpu,,svd,32,AMD EPYC 7302 16-Core Processor,NVIDIA A100-PCIE-40GB,503,Linux,x86_64,4.18.0-394.el8.x86_64,2024-01-16,scikit-learn 1.5.dev0; torch 2.1.0.post300,,,4.506281586742783,123,123
3a327106,float32,5000000,100,1,13.7,scikit-learn,,,svd,32,AMD EPYC 7402 24-Core Processor,,1008,Linux,x86_64,4.18.0-394.el8.x86_64,2024-01-15,scikit-learn 1.3.2,,,4.506297186405945,123,123
9bd2a256,float32,5000000,100,10,0.74,sklearn-torch-dispatch,cuda,,svd,32,AMD EPYC 7302 16-Core Processor,NVIDIA A100-PCIE-40GB,503,Linux,x86_64,4.18.0-394.el8.x86_64,2024-01-16,scikit-learn 1.5.dev0; torch 2.1.0.post300,,,2.0798047731054687,123,123
9bd2a256,float32,5000000,100,10,1.93,scikit-learn,,,cholesky,32,AMD EPYC 7402 24-Core Processor,,1008,Linux,x86_64,4.18.0-394.el8.x86_64,2024-01-15,scikit-learn 1.3.2,,,2.079808773100586,123,123
9bd2a256,float32,5000000,100,10,5.78,sklearn-torch-dispatch,cpu,,svd,32,AMD EPYC 7302 16-Core Processor,NVIDIA A100-PCIE-40GB,503,Linux,x86_64,4.18.0-394.el8.x86_64,2024-01-16,scikit-learn 1.5.dev0; torch 2.1.0.post300,,,2.0798046132958983,123,123
9bd2a256,float32,5000000,100,10,14.9,scikit-learn,,,svd,32,AMD EPYC 7402 24-Core Processor,,1008,Linux,x86_64,4.18.0-394.el8.x86_64,2024-01-15,scikit-learn 1.3.2,,,2.079808933101807,123,123
9bd2a256,float32,5000000,100,10,37.2,scikit-learn,,,lsqr,32,AMD EPYC 7402 24-Core Processor,,1008,Linux,x86_64,4.18.0-394.el8.x86_64,2024-01-15,scikit-learn 1.3.2,,25,2.07980909309967,123,123
a9a05f25,float32,5000000,10,1,0.0324,sklearn-torch-dispatch,cuda,,svd,32,AMD EPYC 7302 16-Core Processor,NVIDIA A100-PCIE-40GB,503,Linux,x86_64,4.18.0-394.el8.x86_64,2024-01-16,scikit-learn 1.5.dev0; torch 2.1.0.post300,,,0.0251269460045129,123,123
a9a05f25,float32,5000000,10,1,0.131,cuml,gpu,,svd,32,AMD EPYC 7502 32-Core Processor,NVIDIA A100-PCIE-40GB,503,Linux,x86_64,4.18.0-394.el8.x86_64,2024-01-15,scikit-learn 1.3.2,,,0.0251269475669592,123,123
a9a05f25,float32,5000000,10,1,0.245,scikit-learn,,,cholesky,32,AMD EPYC 7402 24-Core Processor,,1008,Linux,x86_64,4.18.0-394.el8.x86_64,2024-01-15,scikit-learn 1.3.2,,,0.02512695694184,123,123
a9a05f25,float32,5000000,10,1,0.527,sklearn-torch-dispatch,cpu,,svd,32,AMD EPYC 7302 16-Core Processor,NVIDIA A100-PCIE-40GB,503,Linux,x86_64,4.18.0-394.el8.x86_64,2024-01-16,scikit-learn 1.5.dev0; torch 2.1.0.post300,,,0.0251269460045427,123,123
a9a05f25,float32,5000000,10,1,0.796,scikit-learn,,,svd,32,AMD EPYC 7402 24-Core Processor,,1008,Linux,x86_64,4.18.0-394.el8.x86_64,2024-01-15,scikit-learn 1.3.2,,,0.025126958504486,123,123
a9a05f25,float32,5000000,10,1,0.842,scikit-learn,,,lsqr,32,AMD EPYC 7402 24-Core Processor,,1008,Linux,x86_64,4.18.0-394.el8.x86_64,2024-01-15,scikit-learn 1.3.2,,25,0.025126955379498,123,123
ffd32c2e,float32,5000000,10,10,0.0375,sklearn-torch-dispatch,cuda,,svd,32,AMD EPYC 7302 16-Core Processor,NVIDIA A100-PCIE-40GB,503,Linux,x86_64,4.18.0-394.el8.x86_64,2024-01-16,scikit-learn 1.5.dev0; torch 2.1.0.post300,,,0.1351635653306007,123,123
ffd32c2e,float32,5000000,10,10,0.441,scikit-learn,,,cholesky,32,AMD EPYC 7402 24-Core Processor,,1008,Linux,x86_64,4.18.0-394.el8.x86_64,2024-01-15,scikit-learn 1.3.2,,,0.1351636653292465,123,123
ffd32c2e,float32,5000000,10,10,0.688,sklearn-torch-dispatch,cpu,,svd,32,AMD EPYC 7302 16-Core Processor,NVIDIA A100-PCIE-40GB,503,Linux,x86_64,4.18.0-394.el8.x86_64,2024-01-16,scikit-learn 1.5.dev0; torch 2.1.0.post300,,,0.1351635653207397,123,123
ffd32c2e,float32,5000000,10,10,1.01,scikit-learn,,,svd,32,AMD EPYC 7402 24-Core Processor,,1008,Linux,x86_64,4.18.0-394.el8.x86_64,2024-01-15,scikit-learn 1.3.2,,,0.1351636653303528,123,123
ffd32c2e,float32,5000000,10,10,7.28,scikit-learn,,,lsqr,32,AMD EPYC 7402 24-Core Processor,,1008,Linux,x86_64,4.18.0-394.el8.x86_64,2024-01-15,scikit-learn 1.3.2,,25,0.1351636553305053,123,123
c49c3df8,float32,2000000,100,1,0.283,sklearn-torch-dispatch,cuda,,svd,32,AMD EPYC 7302 16-Core Processor,NVIDIA A100-PCIE-40GB,503,Linux,x86_64,4.18.0-394.el8.x86_64,2024-01-16,scikit-learn 1.5.dev0; torch 2.1.0.post300,,,2.28315184118557,123,123
c49c3df8,float32,2000000,100,1,0.557,cuml,gpu,,svd,32,AMD EPYC 7502 32-Core Processor,NVIDIA A100-PCIE-40GB,503,Linux,x86_64,4.18.0-394.el8.x86_64,2024-01-15,scikit-learn 1.3.2,,,2.283151841176033,123,123
c49c3df8,float32,2000000,100,1,0.727,scikit-learn,,,cholesky,32,AMD EPYC 7402 24-Core Processor,,1008,Linux,x86_64,4.18.0-394.el8.x86_64,2024-01-15,scikit-learn 1.3.2,,,2.283155591078758,123,123
c49c3df8,float32,2000000,100,1,1.84,scikit-learn,,,lsqr,32,AMD EPYC 7402 24-Core Processor,,1008,Linux,x86_64,4.18.0-394.el8.x86_64,2024-01-15,scikit-learn 1.3.2,,25,2.283155091144562,123,123
c49c3df8,float32,2000000,100,1,2.35,sklearn-torch-dispatch,cpu,,svd,32,AMD EPYC 7302 16-Core Processor,NVIDIA A100-PCIE-40GB,503,Linux,x86_64,4.18.0-394.el8.x86_64,2024-01-16,scikit-learn 1.5.dev0; torch 2.1.0.post300,,,2.2831518412952425,123,123
c49c3df8,float32,2000000,100,1,5.62,scikit-learn,,,svd,32,AMD EPYC 7402 24-Core Processor,,1008,Linux,x86_64,4.18.0-394.el8.x86_64,2024-01-15,scikit-learn 1.3.2,,,2.2831550911808014,123,123
1a8c391a,float32,2000000,100,10,0.282,sklearn-torch-dispatch,cuda,,svd,32,AMD EPYC 7302 16-Core Processor,NVIDIA A100-PCIE-40GB,503,Linux,x86_64,4.18.0-394.el8.x86_64,2024-01-16,scikit-learn 1.5.dev0; torch 2.1.0.post300,,,2.160555392803192,123,123
1a8c391a,float32,2000000,100,10,0.779,scikit-learn,,,cholesky,32,AMD EPYC 7402 24-Core Processor,,1008,Linux,x86_64,4.18.0-394.el8.x86_64,2024-01-15,scikit-learn 1.3.2,,,2.160573592800904,123,123
1a8c391a,float32,2000000,100,10,2.61,sklearn-torch-dispatch,cpu,,svd,32,AMD EPYC 7302 16-Core Processor,NVIDIA A100-PCIE-40GB,503,Linux,x86_64,4.18.0-394.el8.x86_64,2024-01-16,scikit-learn 1.5.dev0; torch 2.1.0.post300,,,2.16055519289856,123,123
1a8c391a,float32,2000000,100,10,5.7,scikit-learn,,,svd,32,AMD EPYC 7402 24-Core Processor,,1008,Linux,x86_64,4.18.0-394.el8.x86_64,2024-01-15,scikit-learn 1.3.2,,,2.1605733927993773,123,123
1a8c391a,float32,2000000,100,10,16.4,scikit-learn,,,lsqr,32,AMD EPYC 7402 24-Core Processor,,1008,Linux,x86_64,4.18.0-394.el8.x86_64,2024-01-15,scikit-learn 1.3.2,,25,2.1605733928001403,123,123
e5684553,float32,5000,5000,1,0.166,scikit-learn,,,lsqr,32,AMD EPYC 7402 24-Core Processor,,1008,Linux,x86_64,4.18.0-394.el8.x86_64,2024-01-15,scikit-learn 1.3.2,,25,9.347395458984376,123,123
e5684553,float32,5000,5000,1,0.541,scikit-learn,,,cholesky,32,AMD EPYC 7402 24-Core Processor,,1008,Linux,x86_64,4.18.0-394.el8.x86_64,2024-01-15,scikit-learn 1.3.2,,,2.45976669921875,123,123
e5684553,float32,5000,5000,1,6.29,cuml,gpu,,svd,32,AMD EPYC 7502 32-Core Processor,NVIDIA A100-PCIE-40GB,503,Linux,x86_64,4.18.0-394.el8.x86_64,2024-01-15,scikit-learn 1.3.2,,,2.20544453125,123,123
e5684553,float32,5000,5000,1,7.03,sklearn-torch-dispatch,cpu,,svd,32,AMD EPYC 7302 16-Core Processor,NVIDIA A100-PCIE-40GB,503,Linux,x86_64,4.18.0-394.el8.x86_64,2024-01-16,scikit-learn 1.5.dev0; torch 2.1.0.post300,,,3.76734375,123,123
e5684553,float32,5000,5000,1,9.08,scikit-learn,,,svd,32,AMD EPYC 7402 24-Core Processor,,1008,Linux,x86_64,4.18.0-394.el8.x86_64,2024-01-15,scikit-learn 1.3.2,,,2.459914453125,123,123
e5684553,float32,5000,5000,1,10.7,sklearn-torch-dispatch,cuda,,svd,32,AMD EPYC 7302 16-Core Processor,NVIDIA A100-PCIE-40GB,503,Linux,x86_64,4.18.0-394.el8.x86_64,2024-01-16,scikit-learn 1.5.dev0; torch 2.1.0.post300,,,3.76877265625,123,123
7b05f2bf,float32,5000,5000,10,0.478,scikit-learn,,,cholesky,32,AMD EPYC 7402 24-Core Processor,,1008,Linux,x86_64,4.18.0-394.el8.x86_64,2024-01-15,scikit-learn 1.3.2,,,2.781028203125,123,123
7b05f2bf,float32,5000,5000,10,1.22,scikit-learn,,,lsqr,32,AMD EPYC 7402 24-Core Processor,,1008,Linux,x86_64,4.18.0-394.el8.x86_64,2024-01-15,scikit-learn 1.3.2,,25,9.960193984375,123,123
7b05f2bf,float32,5000,5000,10,6.82,sklearn-torch-dispatch,cpu,,svd,32,AMD EPYC 7302 16-Core Processor,NVIDIA A100-PCIE-40GB,503,Linux,x86_64,4.18.0-394.el8.x86_64,2024-01-16,scikit-learn 1.5.dev0; torch 2.1.0.post300,,,2.747505859375,123,123
7b05f2bf,float32,5000,5000,10,9.23,scikit-learn,,,svd,32,AMD EPYC 7402 24-Core Processor,,1008,Linux,x86_64,4.18.0-394.el8.x86_64,2024-01-15,scikit-learn 1.3.2,,,2.781131640625,123,123
7b05f2bf,float32,5000,5000,10,10.7,sklearn-torch-dispatch,cuda,,svd,32,AMD EPYC 7302 16-Core Processor,NVIDIA A100-PCIE-40GB,503,Linux,x86_64,4.18.0-394.el8.x86_64,2024-01-16,scikit-learn 1.5.dev0; torch 2.1.0.post300,,,2.747708828125,123,123
8 changes: 4 additions & 4 deletions benchmarks/ridge/solvers/sklearn_torch_dispatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import sklearn_pytorch_engine # noqa
import torch
from sklearn import config_context
from sklearn.linear_models import Ridge
from sklearn.linear_model import Ridge
from sklearn_pytorch_engine._utils import has_fp64_support

# isort: on
Expand Down Expand Up @@ -120,9 +120,9 @@ def get_result(self):
pass

return dict(
weights=self.weights.cpu().asnumpy(),
intercept=self.intercept.cpu().asnumpy(),
n_iter=self.n_iter_.cpu(),
weights=self.weights.cpu().numpy(),
intercept=self.intercept.cpu().numpy(),
n_iter=self.n_iter_,
version_info=version_info,
__name=self.name,
**self._parameters,
Expand Down

0 comments on commit 4e1a2c0

Please sign in to comment.