Skip to content

Commit

Permalink
[Feature] add pypi deploy action (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
RektPunk authored Sep 18, 2024
1 parent 4ac7947 commit 2dc947e
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 717 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/pypi_release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Publish Python Package

on:
push:
tags:
- 'v*.*.*'

jobs:
release:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Publish module
uses: JRubics/poetry-publish@v2.0
with:
pypi_token: ${{ secrets.PYPI_TOKEN }}
poetry_install_options: "--without dev"
2 changes: 2 additions & 0 deletions imlightgbm/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# ruff: noqa
from imlightgbm.engine import cv, train

__version__ = "0.0.1"
5 changes: 5 additions & 0 deletions imlightgbm/objective.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,11 @@ def _get_fobj_feval(
"""Return obj and eval with respect to task type."""
_task = type_of_target(train_set.get_label())
task_enum = SupportedTask.get(_task)
# FIXME: remove after developing multiclass objective
if task_enum != SupportedTask.binary:
raise ValueError(
"Inferred task is not binary. Multiclass classification will be supported starting from version 0.1.0."
)
feval = _get_metric(task_enum=task_enum, metric=metric)
fobj = _get_objective(
task_enum=task_enum, objective=objective, alpha=alpha, gamma=gamma
Expand Down
Loading

0 comments on commit 2dc947e

Please sign in to comment.