Skip to content

Commit 71164f2

Browse files
author
Circle CI
committed
Update docs for dev (build 3912)
1 parent e11ee94 commit 71164f2

185 files changed

Lines changed: 1589 additions & 239 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Binary file not shown.

dev/_downloads/46d3545d2de3fcee6756b7d2ee7fb39f/plot_run_benchmark_python_R.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
import matplotlib.pyplot as plt
1010
from benchopt import run_benchmark
1111
from benchopt.benchmark import Benchmark
12-
from benchopt.plotting import plot_benchmark, PLOT_KINDS
13-
from benchopt.plotting.helpers import reset_solver_styles_idx
12+
from benchopt.plotting import plot_benchmark
13+
from benchopt.plotting.helpers import reset_solver_styles
1414

1515

1616
BENCHMARK_PATH = Path().resolve().parent / 'benchmarks' / 'benchmark_lasso'
@@ -32,10 +32,9 @@
3232
plot_result=False, show_progress=False
3333
)
3434

35+
reset_solver_styles()
3536

36-
kinds = list(PLOT_KINDS.keys())
37-
reset_solver_styles_idx()
3837
figs = plot_benchmark(
39-
save_file, benchmark=Benchmark(BENCHMARK_PATH), kinds=kinds, html=False
38+
save_file, benchmark=Benchmark(BENCHMARK_PATH), html=False
4039
)
4140
plt.show()
Binary file not shown.
Binary file not shown.
Binary file not shown.

dev/_downloads/cdb26c80ea62f96a318a8bcdbbf34171/plot_run_benchmark.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
},
1616
"outputs": [],
1717
"source": [
18-
"from pathlib import Path\nimport matplotlib.pyplot as plt\nfrom benchopt import run_benchmark\nfrom benchopt.benchmark import Benchmark\nfrom benchopt.plotting import plot_benchmark, PLOT_KINDS\nfrom benchopt.plotting.helpers import reset_solver_styles_idx\n\n\nBENCHMARK_PATH = (\n Path().resolve().parent / 'benchmarks' / 'benchmark_logreg_l2'\n)\n\n\ntry:\n\n _, save_file = run_benchmark(\n BENCHMARK_PATH,\n solver_names=['sklearn[liblinear]', 'sklearn[newton-cg]', 'lightning'],\n dataset_names=[\"Simulated[n_features=500,n_samples=200]\"],\n objective_filters=['L2 Logistic Regression[lmbd=1.0]'],\n max_runs=100, timeout=20, n_repetitions=15,\n plot_result=False, show_progress=True\n )\n\nexcept RuntimeError:\n raise RuntimeError(\n \"This example can only work when Logreg-l2 benchmark is cloned in a \"\n \"`benchmarks` folder. Please run:\\n\"\n \"$ git clone https://github.com/benchopt/benchmark_logreg_l2 \"\n f\"{BENCHMARK_PATH.resolve()}\"\n )\n\n\nkinds = list(PLOT_KINDS.keys())\nreset_solver_styles_idx()\nfigs = plot_benchmark(save_file, benchmark=Benchmark(BENCHMARK_PATH),\n kinds=kinds, html=False)\nplt.show()"
18+
"from pathlib import Path\nimport matplotlib.pyplot as plt\nfrom benchopt import run_benchmark\nfrom benchopt.benchmark import Benchmark\nfrom benchopt.plotting import plot_benchmark\nfrom benchopt.plotting.helpers import reset_solver_styles\n\n\nBENCHMARK_PATH = (\n Path().resolve().parent / 'benchmarks' / 'benchmark_logreg_l2'\n)\n\ntry:\n\n _, save_file = run_benchmark(\n BENCHMARK_PATH,\n solver_names=['sklearn[liblinear]', 'sklearn[newton-cg]', 'lightning'],\n dataset_names=[\"Simulated[n_features=500,n_samples=200]\"],\n objective_filters=['L2 Logistic Regression[lmbd=1.0]'],\n max_runs=100, timeout=20, n_repetitions=15,\n plot_result=False, show_progress=True\n )\n\nexcept RuntimeError:\n raise RuntimeError(\n \"This example can only work when Logreg-l2 benchmark is cloned in a \"\n \"`benchmarks` folder. Please run:\\n\"\n \"$ git clone https://github.com/benchopt/benchmark_logreg_l2 \"\n f\"{BENCHMARK_PATH.resolve()}\"\n )\n\nreset_solver_styles()\n\nfigs = plot_benchmark(\n save_file, benchmark=Benchmark(BENCHMARK_PATH), html=False\n)\nplt.show()"
1919
]
2020
}
2121
],

dev/_downloads/d0a19eddcd9b5cc19e309134ae758ece/plot_run_benchmark.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,14 @@
99
import matplotlib.pyplot as plt
1010
from benchopt import run_benchmark
1111
from benchopt.benchmark import Benchmark
12-
from benchopt.plotting import plot_benchmark, PLOT_KINDS
13-
from benchopt.plotting.helpers import reset_solver_styles_idx
12+
from benchopt.plotting import plot_benchmark
13+
from benchopt.plotting.helpers import reset_solver_styles
1414

1515

1616
BENCHMARK_PATH = (
1717
Path().resolve().parent / 'benchmarks' / 'benchmark_logreg_l2'
1818
)
1919

20-
2120
try:
2221

2322
_, save_file = run_benchmark(
@@ -37,9 +36,9 @@
3736
f"{BENCHMARK_PATH.resolve()}"
3837
)
3938

39+
reset_solver_styles()
4040

41-
kinds = list(PLOT_KINDS.keys())
42-
reset_solver_styles_idx()
43-
figs = plot_benchmark(save_file, benchmark=Benchmark(BENCHMARK_PATH),
44-
kinds=kinds, html=False)
41+
figs = plot_benchmark(
42+
save_file, benchmark=Benchmark(BENCHMARK_PATH), html=False
43+
)
4544
plt.show()

dev/_downloads/dc84f98e56bc6933a9be8456166d8561/plot_run_benchmark_python_R.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
},
1616
"outputs": [],
1717
"source": [
18-
"from pathlib import Path\nimport matplotlib.pyplot as plt\nfrom benchopt import run_benchmark\nfrom benchopt.benchmark import Benchmark\nfrom benchopt.plotting import plot_benchmark, PLOT_KINDS\nfrom benchopt.plotting.helpers import reset_solver_styles_idx\n\n\nBENCHMARK_PATH = Path().resolve().parent / 'benchmarks' / 'benchmark_lasso'\n\nif not BENCHMARK_PATH.exists():\n raise RuntimeError(\n \"This example can only work when Lasso benchmark is cloned in the \"\n \"example folder. Please run:\\n\"\n \"$ git clone https://github.com/benchopt/benchmark_lasso \"\n f\"{BENCHMARK_PATH.resolve()}\"\n )\n\n_, save_file = run_benchmark(\n BENCHMARK_PATH,\n solver_names=['Python-PGD[use_acceleration=False]', 'R-PGD'],\n dataset_names=[\"Simulated[n_features=5000,n_samples=100,rho=0]\"],\n objective_filters=['*[fit_intercept=False,reg=0.5]'],\n max_runs=100, timeout=100, n_repetitions=5,\n plot_result=False, show_progress=False\n)\n\n\nkinds = list(PLOT_KINDS.keys())\nreset_solver_styles_idx()\nfigs = plot_benchmark(\n save_file, benchmark=Benchmark(BENCHMARK_PATH), kinds=kinds, html=False\n)\nplt.show()"
18+
"from pathlib import Path\nimport matplotlib.pyplot as plt\nfrom benchopt import run_benchmark\nfrom benchopt.benchmark import Benchmark\nfrom benchopt.plotting import plot_benchmark\nfrom benchopt.plotting.helpers import reset_solver_styles\n\n\nBENCHMARK_PATH = Path().resolve().parent / 'benchmarks' / 'benchmark_lasso'\n\nif not BENCHMARK_PATH.exists():\n raise RuntimeError(\n \"This example can only work when Lasso benchmark is cloned in the \"\n \"example folder. Please run:\\n\"\n \"$ git clone https://github.com/benchopt/benchmark_lasso \"\n f\"{BENCHMARK_PATH.resolve()}\"\n )\n\n_, save_file = run_benchmark(\n BENCHMARK_PATH,\n solver_names=['Python-PGD[use_acceleration=False]', 'R-PGD'],\n dataset_names=[\"Simulated[n_features=5000,n_samples=100,rho=0]\"],\n objective_filters=['*[fit_intercept=False,reg=0.5]'],\n max_runs=100, timeout=100, n_repetitions=5,\n plot_result=False, show_progress=False\n)\n\nreset_solver_styles()\n\nfigs = plot_benchmark(\n save_file, benchmark=Benchmark(BENCHMARK_PATH), html=False\n)\nplt.show()"
1919
]
2020
}
2121
],
25.3 KB
10.1 KB

0 commit comments

Comments
 (0)