Skip to content

Commit 1fb2d6a

Browse files
committedDec 6, 2023
Update readme and fix lgbm bug, no code modifications
1 parent 8fc3f49 commit 1fb2d6a

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed
 

‎benchmarks/README.md

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
## Running the benchmarks
2+
3+
Create a conda environment and activate it:
4+
```commandline
5+
conda env create -f environment.yml
6+
conda activate lleaves
7+
```
8+
9+
Modify [setup.py](../setup.py) to not exclude the `benchmark` package:
10+
```python
11+
packages=find_packages(exclude=[]) # Used to be: exclude=["benchmark"]
12+
```
13+
14+
Install the packages in the environment (optionally, in development mode with `-e`):
15+
```commandline
16+
python -m pip install --no-build-isolation -e .
17+
```
18+
19+
Generate the test data and train the necessary models:
20+
```commandline
21+
benchmarks/data/setup_data.sh
22+
python benchmarks/train_NYC_model.py
23+
```
24+
25+
Finally, run the benchmarks from within the benchmarks folder:
26+
```commandline
27+
cd benchmarks
28+
python benchmark.py
29+
```

‎environment.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ dependencies:
1010
# testing
1111
- pytest
1212
- hypothesis
13-
- lightgbm
13+
- lightgbm<4 # Pin needed until https://github.com/onnx/onnxmltools/issues/645 is fixed
1414
- pre-commit
1515
- pyarrow
1616
- pandas

0 commit comments

Comments
 (0)