Skip to content
Merged
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
7 changes: 4 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Unit Tests
name: CI

on:
# This runs in the context of the base of the pull request,
Expand All @@ -11,7 +11,8 @@ permissions:
contents: read

jobs:
build-and-test:
test:
name: Test
uses: huggingface/hf-workflows/.github/workflows/swift_transformers_unit_tests.yml@main
with:
# Use the PR merge ref, not the head.
Expand All @@ -26,7 +27,7 @@ jobs:
- uses: actions/checkout@v4

- run: |
swift format lint --recursive .
swift format lint --strict --recursive .

- name: Suggest fixes (if check fails)
if: failure()
Expand Down
5 changes: 4 additions & 1 deletion Tests/TokenizersTests/TokenizerTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,10 @@ struct TokenizerTests {
let tokenizer = tokenizerOpt!

// These are two different characters
let cases = ["à" /* 0x61 0x300 */, "à" /* 0xe0 */]
let cases = [
"à", // 0x61 0x300
"à", // 0xe0
]
let expected = [217138, 1305]
for (s, expected) in zip(cases, expected) {
let encoded = tokenizer.encode(text: " " + s)
Expand Down