Skip to content

Conversation

@kharshith-k
Copy link
Member

Running TPU tests on linux-x86-ct6e-44-1tpu

@codecov-commenter
Copy link

codecov-commenter commented Jun 26, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.92%. Comparing base (6bc6203) to head (a7ec63b).
⚠️ Report is 45 commits behind head on master.

❗ There is a different number of reports uploaded between BASE (6bc6203) and HEAD (a7ec63b). Click for more details.

HEAD has 2 uploads less than BASE
Flag BASE (6bc6203) HEAD (a7ec63b)
keras 5 4
keras-torch 1 0
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #21425      +/-   ##
==========================================
- Coverage   82.72%   76.92%   -5.81%     
==========================================
  Files         567      572       +5     
  Lines       56245    57337    +1092     
  Branches     8790     8970     +180     
==========================================
- Hits        46527    44104    -2423     
- Misses       7561    11001    +3440     
- Partials     2157     2232      +75     
Flag Coverage Δ
keras 76.82% <ø> (-5.70%) ⬇️
keras-jax 63.58% <ø> (-0.36%) ⬇️
keras-numpy 57.86% <ø> (-0.56%) ⬇️
keras-openvino 34.34% <ø> (-0.23%) ⬇️
keras-tensorflow 64.22% <ø> (-0.14%) ⬇️
keras-torch ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

kharshith-k and others added 10 commits June 30, 2025 08:34
Progress bar would always report the starting batch + 1 at the end of the batch. Now it takes into account `steps_per_execution` for the last batch reported.

Fixes keras-team#20861
Using `keras.ops.math.logsumexp` with an int for `axis` in a functional model would throw an error.
…eras-team#21429)

Arbitrary functions and classes are not allowed.

- Made `Operation` extend `KerasSaveable`, this required moving imports to avoid circular imports
- `Layer` no longer need to extend `KerasSaveable` directly
- Made feature space `Cross` and `Feature` extend `KerasSaveable`
- Also dissallow public function `enable_unsafe_deserialization`
…developed dtypes_new_test.py to use requires_tpu marker
…workflow and added a step to install docker client
…try after attaching service accounts as IAM policies
Copy link
Collaborator

@hertschuh hertschuh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use the same approach as OpenVino, i.e. have a file containing the list of failing tests:

So for now you'd exclude anything that doesn't pass. The file would be it will be at the root, something like tpu_excluded_tests.txt.

pip install -r requirements.txt --progress-bar off --upgrade
if [ "${{ matrix.nnx_enabled }}" == "true" ]; then
pip install --upgrade git+https://github.com/google/flax.git
pip install --upgrade flax>=0.11.1
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file should be reverted

@@ -0,0 +1,104 @@
# name: TPU Tests
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove all commented out code

runs-on: linux-x86-ct6e-44-1tpu

container:
# The container image is now set to python:3.10-slim
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this comment

Comment on lines +75 to +80
- name: Install System Dependencies
run: |
apt-get update && apt-get install -y --no-install-recommends \
git \
sudo \
&& rm -rf /var/lib/apt/lists/*
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is needed. I got it to work without this:
https://github.com/keras-team/keras-rs/blob/main/.github/workflows/actions.yml#L49

- name: Install Dependencies
run: |
pip install --no-cache-dir -U pip setuptools && \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove setuptools, we're not building the wheel.

Comment on lines +3 to +4
ENV KERAS_HOME=/github/workspace/.github/workflows/config/jax \
KERAS_BACKEND=jax
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shouldn't be here since we want to support TF too.

Comment on lines +17 to +26
RUN pip install --no-cache-dir -U pip setuptools && \
pip install --no-cache-dir -U psutil && \
pip install --no-cache-dir -r requirements-jax-tpu.txt && \
pip uninstall -y keras keras-nightly
# python3 -c 'import jax;print(jax.__version__);print(jax.default_backend())' && \
# python3 -c 'import jax;assert jax.default_backend().lower() == "tpu"' && \
# pytest keras --ignore keras/src/applications \
# --ignore keras/src/layers/merging/merging_test.py \
# --cov=keras \
# --cov-config=pyproject.toml
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove, this will be done by the action.

@@ -0,0 +1,31 @@
pre-commit
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why can't you use the requirements-common.txt?

# for tree_test.py
dm_tree
coverage
coverage!=7.6.5 # 7.6.5 breaks CI
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert this file.

Comment on lines +1 to +3
#tensorflow==2.18.0
#--find-links https://storage.googleapis.com/libtpu-tf-releases/index.html
#tensorflow-tpu==2.18.0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use tensorflow-tpu==2.19.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants