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

Ignore -> Debugging failing integration test #798

Closed
wants to merge 3 commits into from
Closed
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
68 changes: 0 additions & 68 deletions .github/workflows/code-checks.yml

This file was deleted.

11 changes: 4 additions & 7 deletions .github/workflows/docs-integration-tests.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
name: Docs Integration Tests

on:
pull_request_review:
types: [submitted]
push:
branches:
- main
- dev
branches: [ "main", "dev" ]
pull_request:
branches: [ "main", "dev" ]

jobs:
test:
if: github.event.review.state == 'APPROVED' || github.event_name == 'push'
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand Down Expand Up @@ -129,7 +127,6 @@ jobs:
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v44
if: github.event_name == 'pull_request_review'
with:
files: |
**.md
Expand Down
20 changes: 0 additions & 20 deletions .github/workflows/pull-request-links.yml

This file was deleted.

22 changes: 0 additions & 22 deletions .github/workflows/unit-tests.yml

This file was deleted.

11 changes: 5 additions & 6 deletions docs/griptape-framework/drivers/prompt-drivers.md
Original file line number Diff line number Diff line change
Expand Up @@ -319,9 +319,9 @@ agent.run("Write the code for a snake game.")
### Hugging Face Pipeline

!!! info
This driver requires the `drivers-prompt-huggingface` [extra](../index.md#extras).
This driver requires the `drivers-prompt-huggingface-pipeline` [extra](../index.md#extras).

The [HuggingFaceHubPromptDriver](../../reference/griptape/drivers/prompt/huggingface_pipeline_prompt_driver.md) uses [Hugging Face Pipelines](https://huggingface.co/docs/transformers/main_classes/pipelines) for inference locally. It supports models with the following tasks:
The [HuggingFacePipelinePromptDriver](../../reference/griptape/drivers/prompt/huggingface_pipeline_prompt_driver.md) uses [Hugging Face Pipelines](https://huggingface.co/docs/transformers/main_classes/pipelines) for inference locally. It supports models with the following tasks:

- text2text-generation
- text-generation
Expand All @@ -332,7 +332,7 @@ The [HuggingFaceHubPromptDriver](../../reference/griptape/drivers/prompt/hugging
```python
import os
from griptape.structures import Agent
from griptape.drivers import HuggingFaceHubPromptDriver
from griptape.drivers import HuggingFacePipelinePromptDriver
from griptape.rules import Rule, Ruleset
from griptape.utils import PromptStack
from griptape.config import StructureConfig
Expand All @@ -357,9 +357,8 @@ def prompt_stack_to_string_converter(prompt_stack: PromptStack) -> str:

agent = Agent(
config=StructureConfig(
prompt_driver=HuggingFaceHubPromptDriver(
model="tiiuae/falcon-7b-instruct",
api_token=os.environ["HUGGINGFACE_HUB_ACCESS_TOKEN"],
prompt_driver=HuggingFacePipelinePromptDriver(
model="TinyLlama/TinyLlama-1.1B-Chat-v0.6",
prompt_stack_to_string=prompt_stack_to_string_converter,
)
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class HuggingFacePipelinePromptDriver(BasePromptDriver):
SUPPORTED_TASKS = ["text2text-generation", "text-generation"]
DEFAULT_PARAMS = {"return_full_text": False, "num_return_sequences": 1}

max_tokens: int = field(default=250, kw_only=True, metadata={"serializable": True})
model: str = field(kw_only=True, metadata={"serializable": True})
params: dict = field(factory=dict, kw_only=True, metadata={"serializable": True})
tokenizer: HuggingFaceTokenizer = field(
Expand Down
Loading
Loading