Skip to content

Commit

Permalink
Merge branch 'main' into vb/replicate-kokoro
Browse files Browse the repository at this point in the history
  • Loading branch information
hanouticelina authored Feb 4, 2025
2 parents c8879b2 + 34e5352 commit b45b0e4
Show file tree
Hide file tree
Showing 15 changed files with 27 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/agents-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
# remote: error: GH006: Protected branch update failed for refs/heads/main.
# remote: error: Changes must be made through a pull request. Required status check "lint" is expected.
token: ${{ secrets.BOT_ACCESS_TOKEN }}
- run: corepack enable
- run: npm install -g corepack@latest && corepack enable
- uses: actions/setup-node@v3
with:
node-version: "20"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/blob-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
# remote: error: GH006: Protected branch update failed for refs/heads/main.
# remote: error: Changes must be made through a pull request. Required status check "lint" is expected.
token: ${{ secrets.BOT_ACCESS_TOKEN }}
- run: corepack enable
- run: npm install -g corepack@latest && corepack enable
- uses: actions/setup-node@v3
with:
node-version: "20"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dduf-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
# remote: error: GH006: Protected branch update failed for refs/heads/main.
# remote: error: Changes must be made through a pull request. Required status check "lint" is expected.
token: ${{ secrets.BOT_ACCESS_TOKEN }}
- run: corepack enable
- run: npm install -g corepack@latest && corepack enable
- uses: actions/setup-node@v3
with:
node-version: "20"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gguf-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
# remote: error: GH006: Protected branch update failed for refs/heads/main.
# remote: error: Changes must be made through a pull request. Required status check "lint" is expected.
token: ${{ secrets.BOT_ACCESS_TOKEN }}
- run: corepack enable
- run: npm install -g corepack@latest && corepack enable
- uses: actions/setup-node@v3
with:
node-version: "20"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/hub-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
# remote: error: GH006: Protected branch update failed for refs/heads/main.
# remote: error: Changes must be made through a pull request. Required status check "lint" is expected.
token: ${{ secrets.BOT_ACCESS_TOKEN }}
- run: corepack enable
- run: npm install -g corepack@latest && corepack enable
- uses: actions/setup-node@v3
with:
node-version: "20"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/inference-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
# remote: error: GH006: Protected branch update failed for refs/heads/main.
# remote: error: Changes must be made through a pull request. Required status check "lint" is expected.
token: ${{ secrets.BOT_ACCESS_TOKEN }}
- run: corepack enable
- run: npm install -g corepack@latest && corepack enable
- uses: actions/setup-node@v3
with:
node-version: "20"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/jinja-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
# remote: error: GH006: Protected branch update failed for refs/heads/main.
# remote: error: Changes must be made through a pull request. Required status check "lint" is expected.
token: ${{ secrets.BOT_ACCESS_TOKEN }}
- run: corepack enable
- run: npm install -g corepack@latest && corepack enable
- uses: actions/setup-node@v3
with:
node-version: "20"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/languages-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
# remote: error: GH006: Protected branch update failed for refs/heads/main.
# remote: error: Changes must be made through a pull request. Required status check "lint" is expected.
token: ${{ secrets.BOT_ACCESS_TOKEN }}
- run: corepack enable
- run: npm install -g corepack@latest && corepack enable
- uses: actions/setup-node@v3
with:
node-version: "20"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
PR_REF: ${{ github.event.pull_request.head.ref }}
SHA: ${{ github.sha }}

- run: corepack enable
- run: npm install -g corepack@latest && corepack enable

- uses: actions/setup-node@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/space-header-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
# remote: error: GH006: Protected branch update failed for refs/heads/main.
# remote: error: Changes must be made through a pull request. Required status check "lint" is expected.
token: ${{ secrets.BOT_ACCESS_TOKEN }}
- run: corepack enable
- run: npm install -g corepack@latest && corepack enable
- uses: actions/setup-node@v3
with:
node-version: "20"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tasks-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
# remote: error: GH006: Protected branch update failed for refs/heads/main.
# remote: error: Changes must be made through a pull request. Required status check "lint" is expected.
token: ${{ secrets.BOT_ACCESS_TOKEN }}
- run: corepack enable
- run: npm install -g corepack@latest && corepack enable
- uses: actions/setup-node@v3
with:
node-version: "20"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
echo "SINCE=$(git merge-base origin/${{ github.event.pull_request.base.ref }} ${{ github.sha }})" >> $GITHUB_OUTPUT
fi
- run: corepack enable
- run: npm install -g corepack@latest && corepack enable

- uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -65,7 +65,7 @@ jobs:
echo "SINCE=$(git merge-base origin/${{ github.event.pull_request.base.ref }} ${{ github.sha }})" >> $GITHUB_OUTPUT
fi
- run: corepack enable
- run: npm install -g corepack@latest && corepack enable

- uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -93,7 +93,7 @@ jobs:
steps:
- uses: actions/checkout@v3

- run: corepack enable
- run: npm install -g corepack@latest && corepack enable

- uses: actions/setup-node@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion e2e/deno/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { whoAmI, listFiles } from "npm:@huggingface/hub@*";
const info = await whoAmI({ credentials: { accessToken: "hf_hub.js" }, hubUrl: "https://hub-ci.huggingface.co" });
console.log(info);

for await (const file of listFiles({ credentials: { accessToken: "hf_hub.js" }, repo: "gpt2" })) {
for await (const file of listFiles({ repo: "gpt2" })) {
console.log(file);
}

Expand Down
8 changes: 6 additions & 2 deletions packages/tasks/src/tasks/feature-extraction/inference.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ export type FeatureExtractionOutput = Array<number[]>;
*/
export interface FeatureExtractionInput {
/**
* The text to embed.
* The text or list of texts to embed.
*/
inputs: string;
inputs: FeatureExtractionInputs;
normalize?: boolean;
/**
* The name of the prompt that should be used by for encoding. If not set, no prompt
Expand All @@ -34,4 +34,8 @@ export interface FeatureExtractionInput {
truncation_direction?: FeatureExtractionInputTruncationDirection;
[property: string]: unknown;
}
/**
* The text or list of texts to embed.
*/
export type FeatureExtractionInputs = string[] | string;
export type FeatureExtractionInputTruncationDirection = "Left" | "Right";
8 changes: 6 additions & 2 deletions packages/tasks/src/tasks/feature-extraction/spec/input.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@
"required": ["inputs"],
"properties": {
"inputs": {
"type": "string",
"description": "The text to embed."
"title": "FeatureExtractionInputs",
"oneOf": [
{ "type": "string" },
{ "type": "array", "items": { "type": "string" } }
],
"description": "The text or list of texts to embed."
},
"normalize": {
"type": "boolean",
Expand Down

0 comments on commit b45b0e4

Please sign in to comment.