Skip to content

Commit 04faed2

Browse files
author
OpenClaw Subagent
committed
Merge upstream/main into merge
2 parents e493299 + 330021c commit 04faed2

File tree

1,180 files changed

+38132
-138593
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,180 files changed

+38132
-138593
lines changed

.github/ISSUE_TEMPLATE/1_bug-report.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: "🐛 Bug Report"
22
description: Submit a bug report to help us improve transformers.js
3-
labels: [ "bug" ]
3+
labels: ["bug"]
44
body:
55
- type: textarea
66
id: system-info
@@ -47,4 +47,3 @@ body:
4747
1.
4848
2.
4949
3.
50-

.github/ISSUE_TEMPLATE/2_new_model.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: "🌟 New model addition"
22
description: Submit a proposal/request to implement a new model
3-
labels: [ "new model" ]
3+
labels: ["new model"]
44

55
body:
66
- type: textarea
@@ -17,7 +17,7 @@ body:
1717
attributes:
1818
label: Prerequisites
1919
description: |
20-
Please note that Transformers.js relies on the model first being supported in [🤗 Transformers](https://github.com/huggingface/transformers) and [🤗 Optimum](https://github.com/huggingface/optimum). If the model you are requesting is not yet supported by either of them, feel free to open up a model request there too.
20+
Please note that Transformers.js relies on the model first being supported in [🤗 Transformers](https://github.com/huggingface/transformers) and [🤗 Optimum](https://github.com/huggingface/optimum). If the model you are requesting is not yet supported by either of them, feel free to open up a model request there too.
2121
options:
2222
- label: "The model is supported in Transformers (i.e., listed [here](https://huggingface.co/docs/transformers/index#supported-models-and-frameworks))"
2323
- label: "The model can be exported to ONNX with Optimum (i.e., listed [here](https://huggingface.co/docs/optimum/main/en/exporters/onnx/overview))"

.github/ISSUE_TEMPLATE/3_new_pipeline.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: "🔧 New pipeline addition"
22
description: Submit a proposal/request to implement a new pipeline
3-
labels: [ "new pipeline" ]
3+
labels: ["new pipeline"]
44

55
body:
66
- type: textarea
@@ -17,7 +17,7 @@ body:
1717
attributes:
1818
label: Prerequisites
1919
description: |
20-
Please note that Transformers.js relies on the pipeline first being supported in [🤗 Transformers](https://github.com/huggingface/transformers). If the pipeline you are requesting is not yet supported by Transformers, feel free to open up a feature request for it there too.
20+
Please note that Transformers.js relies on the pipeline first being supported in [🤗 Transformers](https://github.com/huggingface/transformers). If the pipeline you are requesting is not yet supported by Transformers, feel free to open up a feature request for it there too.
2121
options:
2222
- label: "The pipeline is supported in Transformers (i.e., listed [here](https://huggingface.co/docs/transformers/main_classes/pipelines))"
2323
- label: "The task is listed [here](https://huggingface.co/tasks)"

.github/ISSUE_TEMPLATE/4_feature-request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: "🚀 Feature request"
22
description: Submit a proposal/request for a new transformers.js feature
3-
labels: [ "enhancement" ]
3+
labels: ["enhancement"]
44
body:
55
- type: textarea
66
id: feature-request

.github/ISSUE_TEMPLATE/5_question.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: "🙋 Question"
22
description: Ask a question about the library
3-
labels: [ "question" ]
3+
labels: ["question"]
44

55
body:
66
- type: textarea

.github/workflows/documentation.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ jobs:
1212
with:
1313
commit_sha: ${{ github.sha }}
1414
package: transformers.js
15-
path_to_docs: transformers.js/docs/source
16-
pre_command: cd transformers.js && npm install && npm run docs-api
15+
path_to_docs: transformers.js/packages/transformers/docs/source
16+
pre_command: cd transformers.js && corepack enable && ONNXRUNTIME_NODE_INSTALL=skip pnpm install --frozen-lockfile && pnpm --filter @huggingface/transformers docs-api
1717
additional_args: --not_python_module
1818
secrets:
1919
hf_token: ${{ secrets.HF_DOC_BUILD_PUSH }}

.github/workflows/gh-pages.yml

Lines changed: 0 additions & 60 deletions
This file was deleted.

.github/workflows/pr-documentation.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ jobs:
1414
commit_sha: ${{ github.sha }}
1515
pr_number: ${{ github.event.number }}
1616
package: transformers.js
17-
path_to_docs: transformers.js/docs/source
18-
pre_command: cd transformers.js && npm install && npm run docs-api
17+
path_to_docs: transformers.js/packages/transformers/docs/source
18+
pre_command: cd transformers.js && corepack enable && ONNXRUNTIME_NODE_INSTALL=skip pnpm install --frozen-lockfile && pnpm --filter @huggingface/transformers docs-api
1919
additional_args: --not_python_module

.github/workflows/publish.yml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,28 @@
11
name: Publish Package to npmjs
2+
23
on:
34
release:
45
types: [published]
6+
7+
env:
8+
ONNXRUNTIME_NODE_INSTALL: skip
9+
510
jobs:
611
build:
712
runs-on: ubuntu-latest
813
steps:
9-
- uses: actions/checkout@v4
14+
- uses: actions/checkout@v6
15+
- name: Install pnpm
16+
uses: pnpm/action-setup@v4
1017
# Setup .npmrc file to publish to npm
11-
- uses: actions/setup-node@v3
18+
- uses: actions/setup-node@v6
1219
with:
13-
node-version: 'latest'
14-
registry-url: 'https://registry.npmjs.org'
15-
- run: npm ci
16-
- run: npm run build
17-
- run: npm publish
20+
node-version: "24.10.0"
21+
registry-url: "https://registry.npmjs.org"
22+
cache: "pnpm"
23+
- run: pnpm install --frozen-lockfile
24+
- run: pnpm build
25+
- name: Publish to npm
26+
run: pnpm --filter @huggingface/transformers publish --access public --no-git-checks
1827
env:
1928
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/tests.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ on:
1515

1616
env:
1717
TESTING_REMOTELY: true
18+
ONNXRUNTIME_NODE_INSTALL: skip
1819

1920
jobs:
2021
build:
@@ -26,16 +27,19 @@ jobs:
2627
node-version: [18, 20, 22]
2728

2829
steps:
29-
- uses: actions/checkout@v4
30+
- uses: actions/checkout@v6
31+
- name: Install pnpm
32+
uses: pnpm/action-setup@v4
3033
- name: Use Node.js ${{ matrix.node-version }}
31-
uses: actions/setup-node@v3
34+
uses: actions/setup-node@v6
3235
with:
3336
node-version: ${{ matrix.node-version }}
34-
- run: npm ci
35-
- run: npm run build
36-
37+
cache: "pnpm"
38+
- run: pnpm install --frozen-lockfile
39+
- run: pnpm build
40+
3741
# Setup the testing environment
38-
- run: git lfs install && GIT_CLONE_PROTECTION_ACTIVE=false git clone https://huggingface.co/hf-internal-testing/tiny-random-T5ForConditionalGeneration ./models/hf-internal-testing/tiny-random-T5ForConditionalGeneration
42+
- run: git lfs install && GIT_CLONE_PROTECTION_ACTIVE=false git clone https://huggingface.co/hf-internal-testing/tiny-random-T5ForConditionalGeneration ./packages/transformers/models/hf-internal-testing/tiny-random-T5ForConditionalGeneration
3943

4044
# Actually run tests
41-
- run: npm run test
45+
- run: pnpm test

0 commit comments

Comments
 (0)