Skip to content

Commit

Permalink
fix python type hints
Browse files Browse the repository at this point in the history
  • Loading branch information
deadsoul44 committed Aug 1, 2024
1 parent 463134d commit 6b47e88
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "perpetual"
version = "0.3.1"
version = "0.3.2"
edition = "2021"
authors = ["Mutlu Simsek <msimsek@perpetual-ml.com>"]
homepage = "https://perpetual-ml.com"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ pip install perpetual
To use in a Rust project, add the following to your Cargo.toml file to get the package from [crates.io](https://crates.io/crates/perpetual).

```toml
perpetual = "0.3.1"
perpetual = "0.3.2"
```

## Paper
Expand Down
4 changes: 2 additions & 2 deletions python-package/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "py-perpetual"
version = "0.3.1"
version = "0.3.2"
edition = "2021"
authors = ["Mutlu Simsek <msimsek@perpetual-ml.com>"]
homepage = "https://perpetual-ml.com"
Expand All @@ -19,7 +19,7 @@ crate-type = ["cdylib", "rlib"]

[dependencies]
pyo3 = { version = "0.21", features = ["extension-module"] }
perpetual_rs = {package="perpetual", version = "0.3.1", path = "../" }
perpetual_rs = {package="perpetual", version = "0.3.2", path = "../" }
numpy = "0.21"
ndarray = "0.15"
serde_plain = { version = "1.0" }
Expand Down
2 changes: 1 addition & 1 deletion python-package/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "maturin"

[project]
name = "perpetual"
version = "0.3.1"
version = "0.3.2"
description = "A self-generalizing gradient boosting machine which doesn't need hyperparameter optimization"
license = { file = "LICENSE" }
keywords = [
Expand Down
10 changes: 5 additions & 5 deletions python-package/python/perpetual/data.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from dataclasses import dataclass
from typing import Iterable
from typing import Iterable, Optional, Union


@dataclass
Expand All @@ -11,14 +11,14 @@ class Node:
hessian_sum: float
depth: int
split_value: float
split_feature: int | str
split_feature: Union[str, int]
split_gain: float
missing_node: int
left_child: int
right_child: int
is_leaf: bool
node_type: str
parent_node: int
generalization: float | None
left_categories: Iterable | None
right_categories: Iterable | None
generalization: Optional[float]
left_categories: Optional[Iterable]
right_categories: Optional[Iterable]

0 comments on commit 6b47e88

Please sign in to comment.