Skip to content

Commit

Permalink
Prepare release of TF-DF 1.10.0 and YDF 1.10.0 and PYDF 0.7.0
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 665797043
  • Loading branch information
rstz authored and copybara-github committed Aug 21, 2024
1 parent f16d77d commit 8bf9db0
Show file tree
Hide file tree
Showing 13 changed files with 63 additions and 76 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
Note: This is the changelog of the C++ library. The Python port has a separate
Changelog under `yggdrasil_decision_forests/port/python/CHANGELOG.md`.

## Head
## 1.10.0 - 2024-08-21

### Features

- Add support for Isolation Forests model.
- The default value of `num_candidate_attributes` in the CART learner is
changed from 0 (Random Forest style sampling) to -1 (no sampling). This is
the generally accepted logic of CART.
- Added support for GCS for file I/O.

## 1.9.0 - 2024-03-12

Expand Down
92 changes: 35 additions & 57 deletions documentation/public/docs/hyperparameters.md

Large diffs are not rendered by default.

14 changes: 11 additions & 3 deletions yggdrasil_decision_forests/port/python/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog

## Head
## 0.7.0 - 2024-08-21

### Feature

Expand All @@ -13,12 +13,13 @@
- Models can be pickled safely.
- Native support for Xarray as a dataset format for all operations (e.g.,
training, evaluation, predictions).
- The output of `model.to_jax_function` can then be converted to a TensorFlow
Lite model.
- The output of `model.to_jax_function` can be converted to a TensorFlow Lite
model.
- Change the default number of examples to scan when training on files to
determine the semantic and dictionaries of columns from 10k to 100k.
- Various improvements of error messages.
- Evaluation for Anomaly Detection models.
- Oblique splits for Anomaly Detection models.

### Fix

Expand All @@ -31,6 +32,13 @@
multidimensional categorical integers.
- Fix error when defining categorical sets for non-ragged multidimensional
inputs.
- MacOS: Fix compatibility with other protobuf-using libraries such as
Tensorflow.

#### Release music

Rondo Alla ingharese quasi un capriccio "Die Wut über den verlorenen Groschen",
Op. 129. Ludwig van Beethoven

## 0.6.0 - 2024-07-04

Expand Down
4 changes: 2 additions & 2 deletions yggdrasil_decision_forests/port/python/config/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
from setuptools.command.install import install
from setuptools.dist import Distribution

_VERSION = "0.6.0"
_VERSION = "0.7.0"

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

REQUIRED_PACKAGES = [
"numpy<2.0.0",
"numpy",
"absl_py",
"protobuf>=3.14",
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pydantic
requests
fastapi[standard]>=0.112.0,<0.113.0
tensorflow_decision_forests; platform_machine != 'aarch64' and python_version >= '3.9' and python_version < '3.12'
tensorflow; platform_machine != 'aarch64'
tensorflow; platform_machine != 'aarch64' and python_version >= '3.9' and python_version < '3.12'
portpicker
matplotlib
scikit-learn
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

def deps():
PYBIND_PROTOBUF_COMMIT_HASH = "3d7834b607758bbd2e3d210c6c478453922f20c0"
PYBIND_PROTOBUF_SHA = "89ba0a6eb92a834dc08dc199da5b94b4648168c56d5409116f9b7699e5350f11"
PYBIND_PROTOBUF_COMMIT_HASH = "f1b245929759230f31cdd1e5f9e0e69f817fed95"
PYBIND_PROTOBUF_SHA = "7eeabdaa39d5b1f48f1feb0894d6b7f02f77964e2a6bc1eaa4a90fe243e0a34c"
http_archive(
name = "com_google_pybind11_protobuf",
strip_prefix = "pybind11_protobuf-{commit}".format(commit = PYBIND_PROTOBUF_COMMIT_HASH),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ build_and_maybe_test () {
echo " Compiler : $CC"

bazel version
local ARCHITECTURE=$(uname --m)
local ARCHITECTURE=$(uname -m)

local flags="--config=linux_cpp17 --features=-fully_static_link"
if [ "$ARCHITECTURE" == "x86_64" ]; then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
# limitations under the License.


# Running this script inside a python venv may not work.
set -vex

declare -a python_versions=("3.8" "3.9" "3.10" "3.11" "3.12")
Expand All @@ -27,7 +28,7 @@ do
source ${TMPDIR}venv/bin/activate
pip install --upgrade pip

echo "Building with $(python3 -V 2>&1)"
echo "Building with $(python -V 2>&1)"

bazel clean --expunge
RUN_TESTS=0 CC="clang" ./tools/build_test_linux.sh
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
cls
setlocal

set YDF_VERSION=0.5.0
set YDF_VERSION=0.7.0
set BAZEL=bazel.exe
set BAZEL_SH=C:\msys64\usr\bin\bash.exe
set BAZEL_FLAGS=--config=windows_cpp20 --config=windows_avx2
Expand Down
4 changes: 4 additions & 0 deletions yggdrasil_decision_forests/port/python/ydf/cc/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ package(
pybind_extension(
name = "ydf",
srcs = ["ydf.cc"],
linkopts = select({
"@bazel_tools//src/conditions:darwin": ["-Wl,-exported_symbol,_PyInit_ydf"],
"//conditions:default": [],
}),
deps = [
"//ydf/dataset:dataset_cc",
"//ydf/learner:learner_cc",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -897,12 +897,6 @@ def pre_processing(raw_features):
force: Try to export even in currently unsupported environments. WARNING:
Setting this to true may crash the Python runtime.
"""
if platform.system() == "Darwin" and not force:
raise ValueError(
"Exporting to TensorFlow is currently broken on MacOS and may crash"
" the current Python process. To proceed anyway, add parameter"
" `force=True`."
)

if mode == "keras":
log.warning(
Expand Down
2 changes: 1 addition & 1 deletion yggdrasil_decision_forests/port/python/ydf/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

version = "0.6.0"
version = "0.7.0"
1 change: 1 addition & 0 deletions yggdrasil_decision_forests/utils/compatibility.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

#include <stdint.h>

#include <cassert>
#include <type_traits>

#include "absl/types/optional.h"
Expand Down

0 comments on commit 8bf9db0

Please sign in to comment.