Skip to content

Commit

Permalink
Prepare release of TF-DF 1.9.2 and PYDF 0.6.0
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 650123651
  • Loading branch information
rstz authored and copybara-github committed Jul 8, 2024
1 parent 57f260f commit d62c91d
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 34 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## 1.9.2 - 2024-07-04

### Fix

- Fix compatibility with TF 2.16.2.
- Fix build.

## 1.9.1 - 2024-05-07

### Fix
Expand Down
6 changes: 3 additions & 3 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
# absl used by tensorflow.
http_archive(
name = "org_tensorflow",
strip_prefix = "tensorflow-2.16.1",
sha256 = "c729e56efc945c6df08efe5c9f5b8b89329c7c91b8f40ad2bb3e13900bd4876d",
urls = ["https://github.com/tensorflow/tensorflow/archive/v2.16.1.tar.gz"],
strip_prefix = "tensorflow-2.16.2",
sha256 = "023849bf253080cb1e4f09386f5eb900492da2288274086ed6cfecd6d99da9eb",
urls = ["https://github.com/tensorflow/tensorflow/archive/v2.16.2.tar.gz"],
# Starting with TF 2.14, disable hermetic Python builds.
patch_args = ["-p1"],
patches = ["//third_party/tensorflow:tf.patch"],
Expand Down
44 changes: 20 additions & 24 deletions configure/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,20 @@
"""

import platform
import sys
import setuptools
from setuptools.command.install import install
from setuptools.dist import Distribution

_VERSION = "1.9.1"
_VERSION = "1.9.2"

with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()

REQUIRED_PACKAGES = [
"numpy",
"pandas",
"tensorflow~=2.16.1",
"tensorflow==2.16.2",
"six",
"absl_py",
"wheel",
Expand All @@ -57,31 +58,26 @@ def is_pure(self):
return False


try:
from wheel.bdist_wheel import bdist_wheel as _bdist_wheel

class bdist_wheel(_bdist_wheel):

def finalize_options(self):
_bdist_wheel.finalize_options(self)
self.root_is_pure = False

def get_tag(self):
python, abi, plat = _bdist_wheel.get_tag(self)
if platform.system() == "Darwin":
# Uncomment on of the lines below to adapt the platform string when
# cross-compiling.
plat = "macosx_12_0_arm64"
# plat = "macosx_10_15_x86_64"
pass
return python, abi, plat

except ImportError:
bdist_wheel = None
if "bdist_wheel" in sys.argv:
if "--plat-name" not in sys.argv:
if platform.system() == "Darwin":
idx = sys.argv.index("bdist_wheel") + 1
sys.argv.insert(idx, "--plat-name")
if platform.processor() == "arm":
sys.argv.insert(idx + 1, "macosx_10_15_x86_64")
elif platform.processor() == "i386":
sys.argv.insert(idx + 1, "macosx_12_0_arm64")
else:
raise ValueError(f"Unknown processor {platform.processor()}")
else:
print("Not on MacOS")
else:
print("PLAT-NAME Supplied")
else:
print("NO BDIST_WHEEL")

setuptools.setup(
cmdclass={
"bdist_wheel": bdist_wheel,
"install": InstallPlatlib,
},
name="tensorflow_decision_forests",
Expand Down
1 change: 1 addition & 0 deletions documentation/known_issues.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ The following table shows the compatibility between

tensorflow_decision_forests | tensorflow
--------------------------- | ---------------
1.9.2 | 2.16.2
1.9.1 | 2.16.1
1.9.0 | 2.16.1
1.8.0 - 1.8.1 | 2.15.0
Expand Down
4 changes: 2 additions & 2 deletions tensorflow_decision_forests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@
```
"""

__version__ = "1.9.1"
__version__ = "1.9.2"
__author__ = "Mathieu Guillame-Bert"

compatible_tf_versions = ["2.16.1"]
compatible_tf_versions = ["2.16.2"]
__git_version__ = "HEAD" # Modify for release build.

from tensorflow_decision_forests.tensorflow import check_version
Expand Down
8 changes: 4 additions & 4 deletions tensorflow_decision_forests/keras/wrappers_pre_generated.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ class CartModel(core.CoreModel):
value for Random Forest: `sqrt(number of input attributes)` in case of
classification and `number_of_input_attributes / 3` in case of regression.
If `num_candidate_attributes=-1`, all the attributes are tested. Default:
0.
-1.
num_candidate_attributes_ratio: Ratio of attributes tested at each node. If
set, it is equivalent to `num_candidate_attributes =
number_of_input_features x num_candidate_attributes_ratio`. The possible
Expand All @@ -308,7 +308,7 @@ class CartModel(core.CoreModel):
training. This solution is faster but consumes much more memory than
IN_NODE. - IN_NODE: The features are sorted just before being used in the
node. This solution is slow but consumes little amount of memory. .
Default: "PRESORT".
Default: "IN_NODE".
sparse_oblique_max_num_projections: For sparse oblique splits i.e.
`split_axis=SPARSE_OBLIQUE`. Maximum number of projections (applied after
the num_projections_exponent). Oblique splits try out
Expand Down Expand Up @@ -420,11 +420,11 @@ def __init__(
mhld_oblique_sample_attributes: Optional[bool] = None,
min_examples: Optional[int] = 5,
missing_value_policy: Optional[str] = "GLOBAL_IMPUTATION",
num_candidate_attributes: Optional[int] = 0,
num_candidate_attributes: Optional[int] = -1,
num_candidate_attributes_ratio: Optional[float] = -1.0,
pure_serving_model: Optional[bool] = False,
random_seed: Optional[int] = 123456,
sorting_strategy: Optional[str] = "PRESORT",
sorting_strategy: Optional[str] = "IN_NODE",
sparse_oblique_max_num_projections: Optional[int] = None,
sparse_oblique_normalization: Optional[str] = None,
sparse_oblique_num_projections_exponent: Optional[float] = None,
Expand Down
2 changes: 1 addition & 1 deletion tools/test_bazel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#
# Usage example
#
# RUN_TESTS=1 PY_VERSION=3.9 TF_VERSION=2.16.1 ./tools/test_bazel.sh
# RUN_TESTS=1 PY_VERSION=3.9 TF_VERSION=2.16.2 ./tools/test_bazel.sh

set -vex

Expand Down

0 comments on commit d62c91d

Please sign in to comment.