Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .clang-format

This file was deleted.

12 changes: 5 additions & 7 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@

root = true

# We follow TF's style: https://tensorflow.org/community/contribute/code_style
# We follow the TensorFlow coding style
# https://www.tensorflow.org/community/contribute/code_style

# IMPORTANT: some of the other config files (e.g., .pylintrc) also have settings
# for the same properties & need to be updated if changes are made to this file.
# IMPORTANT: some of the other config files (.clang-format, etc.) also have
# the same settings and need to be updated if changes are made to this file.
[*]
charset = utf-8
indent_style = space
Expand All @@ -27,10 +28,7 @@ spelling_language = en-US
trim_trailing_whitespace = true
max_line_length = 80

[{BUILD,*.bzl,*.bazel,.bazelrc,WORKSPACE}]
indent_size = 4

[Dockerfile]
[{BUILD,*.BUILD,*.bzl,*.bazel,.bazelrc,WORKSPACE}]
indent_size = 4

[{*.cc,*.h}]
Expand Down
28 changes: 0 additions & 28 deletions .gemini/config.yaml

This file was deleted.

50 changes: 0 additions & 50 deletions .github/dependabot.yaml

This file was deleted.

10 changes: 10 additions & 0 deletions .github/problem-matchers/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Problem Matchers

GitHub [Problem Matchers](https://github.com/actions/toolkit/blob/main/docs/problem-matchers.md) are a mechanism that enable workflow steps to scan the outputs of GitHub Actions for regex patterns and automatically write annotations in the workflow summary page. Using Problem Matchers allows information to be displayed more prominently in the GitHub user interface.

This directory contains Problem Matchers used by the GitHub Actions workflows in the [`workflows`](./workflows) subdirectory.

The following problem matcher JSON files found in this directory were copied from the [Home Assistant](https://github.com/home-assistant/core) project on GitHub. The Home Assistant project is licensed under the Apache 2.0 open-source license. The version of the files at the time they were copied was 2025.1.2.

- [`pylint.json`](https://github.com/home-assistant/core/blob/dev/.github/workflows/matchers/pylint.json)
- [`yamllint.json`](https://github.com/home-assistant/core/blob/dev/.github/workflows/matchers/yamllint.json)
30 changes: 30 additions & 0 deletions .github/problem-matchers/clang-format.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"problemMatcher": [
{
"owner": "clang-format-error",
"severity": "error",
"pattern": [
{
"regexp": "^(.*?)\\((\\d+),(\\d*)\\):\\s+(?:fatal\\s+)?error:\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"message": 4
}
]
},
{
"owner": "clang-format-warning",
"severity": "warning",
"pattern": [
{
"regexp": "^(.*?)\\((\\d+),(\\d*)\\):\\s+(?:fatal\\s+)?warning:\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"message": 4
}
]
}
]
}
32 changes: 32 additions & 0 deletions .github/problem-matchers/pylint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"problemMatcher": [
{
"owner": "pylint-error",
"severity": "error",
"pattern": [
{
"regexp": "^(.+):(\\d+):(\\d+):\\s(([EF]\\d{4}):\\s.+)$",
"file": 1,
"line": 2,
"column": 3,
"message": 4,
"code": 5
}
]
},
{
"owner": "pylint-warning",
"severity": "warning",
"pattern": [
{
"regexp": "^(.+):(\\d+):(\\d+):\\s(([CRW]\\d{4}):\\s.+)$",
"file": 1,
"line": 2,
"column": 3,
"message": 4,
"code": 5
}
]
}
]
}
22 changes: 22 additions & 0 deletions .github/problem-matchers/yamllint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"problemMatcher": [
{
"owner": "yamllint",
"pattern": [
{
"regexp": "^(.*\\.ya?ml)$",
"file": 1
},
{
"regexp": "^\\s{2}(\\d+):(\\d+)\\s+(error|warning)\\s+(.*?)\\s+\\((.*)\\)$",
"line": 1,
"column": 2,
"severity": 3,
"message": 4,
"code": 5,
"loop": true
}
]
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# yamllint disable rule:line-length

name: 'CI: build & test'
run-name: Continuous integration build and test

Expand All @@ -26,63 +24,29 @@ on:
types:
- checks_requested

env:
# Python version to use for actions/setup-python.
python-version: '3.11'

concurrency:
cancel-in-progress: true
group: ${{github.workflow}}-${{github.event.pull_request.number||github.ref}}

permissions: read-all

jobs:
format-and-lint-checks:
name: File format & lint checks
runs-on: ubuntu-22.04
timeout-minutes: 30
steps:
- name: Check out a copy of the TFQ git repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: ${{env.python-version}}
cache: pip
cache-dependency-path: requirements.txt

- name: Install Python dependencies
run: |
pip install --upgrade pip
pip install -r requirements.txt

- name: Check code formatting
run: ./scripts/format_check.sh

- name: Check code lint
run: ./scripts/lint_all.sh

wheel-build:
name: Wheel test
runs-on: ubuntu-22.04
timeout-minutes: 60

steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
- uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v5
with:
python-version: ${{env.python-version}}
python-version: '3.10'
architecture: 'x64'
cache: pip
cache-dependency-path: requirements.txt

- name: Install Bazel on CI
run: ./scripts/ci_install.sh

- name: Build Wheel Test
run: ./scripts/build_pip_package_test.sh

- name: Test Wheel
run: ./scripts/run_example.sh

Expand All @@ -92,26 +56,24 @@ jobs:
container:
image: us-docker.pkg.dev/ml-oss-artifacts-published/ml-public-container/ml-build:infrastructure-public-image-82c7ac59ba4b
timeout-minutes: 60

steps:
- name: Adjust the ml-build runner to our needs
run: |
# lsb-release (needed by setup-python) is missing in ml-build runners
sudo apt-get update && sudo apt-get install -y lsb-release
# This file, though it's empty, hangs the Bazel install step.
rm -f /etc/bazel.bazelrc
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
- uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v5
with:
python-version: ${{env.python-version}}
python-version: '3.10'
architecture: 'x64'
cache: pip
cache-dependency-path: requirements.txt

- name: Install Bazel on CI
run: ./scripts/ci_install.sh

- name: Configure CI TF
run: echo "Y\n" | ./configure.sh

- name: Full Library Test
run: ./scripts/test_all.sh

Expand Down Expand Up @@ -143,28 +105,25 @@ jobs:
container:
image: us-docker.pkg.dev/ml-oss-artifacts-published/ml-public-container/ml-build:infrastructure-public-image-82c7ac59ba4b
timeout-minutes: 60

steps:
- name: Adjust the ml-build runner to our needs
run: |
# lsb-release (needed by setup-python) is missing in ml-build runners
sudo apt-get update && sudo apt-get install -y lsb-release
# This file, though it's empty, hangs the Bazel install step.
rm -f /etc/bazel.bazelrc
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
- uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v5
with:
python-version: ${{env.python-version}}
python-version: '3.10'
architecture: 'x64'
cache: pip
cache-dependency-path: requirements.txt

- name: Upgrade pip
run: pip install --upgrade pip

- name: Install notebook dependencies
run: pip install --upgrade pip seaborn==0.10.0
- name: Install Bazel on CI
run: ./scripts/ci_install.sh

- name: Build Wheel
run: ./scripts/build_pip_package_test.sh

- name: Test Notebooks
run: ./scripts/ci_validate_tutorials.sh
Loading
Loading