Skip to content

Commit

Permalink
Merge branch 'main' of github.com:fmind/mlops-python-package
Browse files Browse the repository at this point in the history
  • Loading branch information
fmind committed Mar 18, 2024
2 parents bf2f303 + 90d8f28 commit e4050ac
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 31 deletions.
9 changes: 0 additions & 9 deletions .github/ISSUE_TEMPLATE/feat-request.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,6 @@ about: A new feature.
title: "[FEAT] "
labels: feat
assignees: fmind
body:
- type: checkboxes
id: breaking-change
attributes:
label: Breaking change?
options:
- label: Yes
- label: No
- label: Maybe
---

## Description
Expand Down
9 changes: 0 additions & 9 deletions .github/ISSUE_TEMPLATE/fix-request.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,6 @@ about: A bug fix
title: "[FIX] "
labels: fix
assignees: fmind
body:
- type: checkboxes
id: breaking-change
attributes:
label: Breaking change?
options:
- label: Yes
- label: No
- label: Maybe
---

## Bug Description
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
release:
types: [published]
env:
DOCKER_IMAGE: ghcr.io/fmind/mlops-python-package:latest
DOCKER_IMAGE: ghcr.io/fmind/mlops-python-package
concurrency:
cancel-in-progress: true
group: publish-workflow
Expand Down Expand Up @@ -39,4 +39,6 @@ jobs:
context: .
cache-to: type=gha
cache-from: type=gha
tags: ${{ env.DOCKER_IMAGE }}
tags: |
${{ env.DOCKER_IMAGE }}:latest
${{ env.DOCKER_IMAGE }}:${{ github.ref }}
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ addopts = "--verbosity=2"

[tool.ruff]
fix = true
indent-width = 4
line-length = 100
target-version = "py312"

Expand Down
1 change: 1 addition & 0 deletions src/bikes/core/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

# %% TYPES

# Generic type for a dataframe container
TSchema = T.TypeVar("TSchema", bound="pa.DataFrameModel")

# %% SCHEMAS
Expand Down
4 changes: 2 additions & 2 deletions src/bikes/io/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class RunConfig(pdt.BaseModel, strict=True, frozen=True, extra="forbid"):
experiment_name: str = "bikes"
# registry
registry_name: str = "bikes"
# autologg
# autolog
autolog_disable: bool = False
autolog_disable_for_unsupported_versions: bool = False
autolog_exclusive: bool = False
Expand All @@ -138,7 +138,7 @@ def start(self) -> None:
mlflow.set_registry_uri(uri=self.registry_uri)
# experiment
mlflow.set_experiment(experiment_name=self.experiment_name)
# autologging
# autolog
mlflow.autolog(
disable=self.autolog_disable,
disable_for_unsupported_versions=self.autolog_disable_for_unsupported_versions,
Expand Down
4 changes: 2 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ def extra_config() -> str:
{
"job": {
"mlflow_service": {
"tracking_uri": "${tmp_path:}/experiments/",
"registry_uri": "${tmp_path:}/models/",
"tracking_uri": "${tmp_path:}/tracking/",
"registry_uri": "${tmp_path:}/registry/",
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions tests/io/test_registries.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def test_custom_pipeline(
saver = registries.CustomSaver(path=path)
loader = registries.CustomLoader()
register = registries.MlflowRegister(tags=tags)
run_config = services.MlflowService.RunConfig(name="Custom-Run")
run_config = mlflow_service.RunConfig(name="Custom-Run")
# when
with mlflow_service.run_context(run_config=run_config) as run:
info = saver.save(model=model, signature=signature, input_example=inputs)
Expand Down Expand Up @@ -92,7 +92,7 @@ def test_builtin_pipeline(
saver = registries.BuiltinSaver(path=path, flavor=flavor)
loader = registries.BuiltinLoader()
register = registries.MlflowRegister(tags=tags)
run_config = services.MlflowService.RunConfig(name="Custom-Run")
run_config = mlflow_service.RunConfig(name="Builtin-Run")
# when
with mlflow_service.run_context(run_config=run_config) as run:
info = saver.save(model=model, signature=signature, input_example=inputs)
Expand Down
4 changes: 2 additions & 2 deletions tests/jobs/test_training.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ def test_training_job(
targets_reader: datasets.Reader,
model: models.Model,
metric: metrics.Metric,
train_test_splitter: splitters.TrainTestSplitter,
train_test_splitter: splitters.Splitter,
saver: registries.Saver,
signer: signers.Signer,
register: registries.Register,
) -> None:
# given
run_config = services.MlflowService.RunConfig(
run_config = mlflow_service.RunConfig(
name="TrainingTest", tags={"context": "training"}, description="Training job."
)
splitter = train_test_splitter
Expand Down
4 changes: 2 additions & 2 deletions tests/jobs/test_tuning.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ def test_tuning_job(
targets_reader: datasets.Reader,
model: models.Model,
metric: metrics.Metric,
time_series_splitter: splitters.TimeSeriesSplitter,
time_series_splitter: splitters.Splitter,
searcher: searchers.Searcher,
) -> None:
# given
run_config = services.MlflowService.RunConfig(
run_config = mlflow_service.RunConfig(
name="TuningTest", tags={"context": "tuning"}, description="Tuning job."
)
splitter = time_series_splitter
Expand Down
2 changes: 1 addition & 1 deletion tests/utils/test_searchers.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def test_grid_cv_searcher(
metric: metrics.Metric,
inputs: schemas.Inputs,
targets: schemas.Targets,
train_test_splitter: splitters.TrainTestSplitter,
train_test_splitter: splitters.Splitter,
) -> None:
# given
param_grid = {"max_depth": [3, 5, 7]}
Expand Down

0 comments on commit e4050ac

Please sign in to comment.