Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt generate-snippets-fixtures script for providers #1137

Conversation

Wauplin
Copy link
Contributor

@Wauplin Wauplin commented Jan 24, 2025

cc @julien-c

Goal is to easily review inference snippets changes by generating and committing the expected snippets that will be shown on the Hub. For now mostly adapter for "hf-inference" provider + added 1 example with "replicate". In practice, we can add more examples once merged to #1129

How to use:

  1. Go to @tasks-gen

  2. Edit packages/tasks-gen/scripts/generate-snippets-fixtures.ts to add new examples

  3. Run

pnpm run generate-snippets-fixtures
  1. Use git diff to check difference => commit them

Afterwards, run tests (also done in CI)

pnpm test

Note: I haven't properly checked the snippets themselves. Will do it once merged when reviewing #1129.

@Wauplin Wauplin requested a review from julien-c January 24, 2025 13:57
@julien-c julien-c merged commit 204f05a into inference/providers-snippets Jan 24, 2025
4 of 5 checks passed
@julien-c julien-c deleted the inference/providers-snippets-adapt-test-script branch January 24, 2025 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants