Skip to content

Commit cc68499

Browse files
committed
Fast failing
1 parent 7df1a83 commit cc68499

2 files changed

Lines changed: 19 additions & 16 deletions

File tree

.github/workflows/build-python.yml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,29 +10,29 @@ on:
1010
workflow_dispatch:
1111
inputs:
1212
run-integration-tests:
13-
description: 'If integration test should be run'
13+
description: "If integration test should be run"
1414
required: true
1515
type: boolean
1616
default: false
1717
use-cache:
18-
description: 'If cache should be used'
18+
description: "If cache should be used"
1919
required: true
2020
type: boolean
2121
default: true
2222
is-dispatch:
23-
description: 'Just to identify manual dispatch'
23+
description: "Just to identify manual dispatch"
2424
required: true
2525
type: boolean
2626
default: true
2727
workflow_call:
2828
inputs:
2929
run-integration-tests:
30-
description: 'If integration test should be run'
30+
description: "If integration test should be run"
3131
required: true
3232
type: boolean
3333
default: false
3434
use-cache:
35-
description: 'If cache should be used'
35+
description: "If cache should be used"
3636
required: true
3737
type: boolean
3838
default: false
@@ -53,7 +53,7 @@ jobs:
5353
strategy:
5454
fail-fast: false # Do not stop when any job fails
5555
matrix:
56-
python-version: [ "3.9", "3.10", "3.11" ]
56+
python-version: ["3.9", "3.10", "3.11"]
5757
os: [ubuntu-latest]
5858
pydantic_v1: [false]
5959
pandas_v1: [false]
@@ -116,8 +116,6 @@ jobs:
116116
pdm install -G :all
117117
pdm list
118118
119-
- name: Lint code
120-
run: pdm run lint
121119
- name: Re-install lightgbm from sources for MacOS
122120
if: ${{ matrix.os == 'macos-latest' }}
123121
run: |
@@ -157,6 +155,9 @@ jobs:
157155
pdm run pip freeze | grep '^pandas'
158156
pdm run pip freeze | grep -q '^pandas==${{ matrix.pandas_v1 && '1' || '2' }}\.'
159157
158+
- name: Lint code
159+
run: pdm run lint
160+
160161
- name: Test code (concurrency)
161162
run: pdm test-worker
162163

@@ -205,7 +206,7 @@ jobs:
205206
- name: Setup PDM
206207
uses: pdm-project/setup-pdm@v3
207208
with:
208-
python-version: '3.10'
209+
python-version: "3.10"
209210
cache: false
210211
- name: Build wheel
211212
run: pdm build
@@ -233,7 +234,7 @@ jobs:
233234
- name: Setup PDM
234235
uses: pdm-project/setup-pdm@v3
235236
with:
236-
python-version: '3.10'
237+
python-version: "3.10"
237238
cache: false
238239
- name: Build wheel
239240
run: pdm build
@@ -252,8 +253,8 @@ jobs:
252253
- name: Setup PDM
253254
uses: pdm-project/setup-pdm@v3
254255
with:
255-
python-version: '3.10'
256-
version: '2.10.4' # Fix to repair the CI, use latest version when fixed on pdm
256+
python-version: "3.10"
257+
version: "2.10.4" # Fix to repair the CI, use latest version when fixed on pdm
257258
cache: false
258259
- name: Build wheel
259260
run: pdm build
@@ -291,7 +292,7 @@ jobs:
291292
- name: Set up Pandoc (needed for doc)
292293
uses: r-lib/actions/setup-pandoc@v2
293294
with:
294-
pandoc-version: '3.1.7' # https://github.com/jgm/pandoc/releases
295+
pandoc-version: "3.1.7" # https://github.com/jgm/pandoc/releases
295296

296297
- name: Install dependencies
297298
run: pdm install -G :all

tests/integrations/test_mlflow.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import os
12
from pathlib import Path
23
from tempfile import TemporaryDirectory
34

@@ -20,10 +21,11 @@ def _evaluate(dataset, model, evaluator_config):
2021
# MLFlow logic for windows seems to say : "Start with drive, no need for file:"
2122
# https://github.com/mlflow/mlflow/blob/b414a22bdead12a1865a0ab59460eb6b158db7d0/mlflow/utils/uri.py#L65C1-L66C1
2223
# Since it's not working, let's just skip it for windows..
23-
if platform.system() != "Windows":
24-
mlflow.set_tracking_uri(Path(f))
24+
if platform.system() == "Windows":
25+
f = "file:/" + f.replace(os.sep, "/")
26+
mlflow.set_tracking_uri(f)
2527
else:
26-
mlflow.set_registry_uri("")
28+
mlflow.set_tracking_uri(Path(f))
2729
experiment_id = mlflow.create_experiment("test", artifact_location=f)
2830
with mlflow.start_run(experiment_id=experiment_id):
2931
model_info = model.to_mlflow()

0 commit comments

Comments
 (0)