Skip to content

Commit

Permalink
Merge branch 'main' of github.com:zenml-io/zenml-projects
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexejPenner committed Nov 11, 2024
2 parents d9025e5 + cf091d0 commit 5cae76d
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/production_run_complete_llm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ jobs:
- name: Run pipeline, create pipeline, configure trigger (Production)
working-directory: ./llm-complete-guide
run: |
python gh_action_rag.py --no-cache --create-template --event-source-id --service-account-id ${{ env.ZENML_SERVICE_ACCOUNT_ID }} --action-id ${{ env.ZENML_ACTION_ID }} --config production/rag.yaml --zenml-model-version production
python gh_action_rag.py --no-cache --create-template --event-source-id ${{ env.ZENML_EVENT_SOURCE_ID }} --service-account-id ${{ env.ZENML_SERVICE_ACCOUNT_ID }} --config production/rag.yaml --zenml-model-version production
2 changes: 1 addition & 1 deletion llm-complete-guide/ZENML_VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.68.1
0.66.0
1 change: 1 addition & 0 deletions llm-complete-guide/configs/dev/rag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ settings:
- ratelimit
- rerankers
- pygithub
- rerankers[flashrank]
environment:
ZENML_PROJECT_SECRET_NAME: llm_complete
ZENML_ENABLE_RICH_TRACEBACK: FALSE
Expand Down
1 change: 1 addition & 0 deletions llm-complete-guide/configs/production/rag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ settings:
- ratelimit
- rerankers
- pygithub
- rerankers[flashrank]
environment:
ZENML_PROJECT_SECRET_NAME: llm_complete
ZENML_ENABLE_RICH_TRACEBACK: FALSE
Expand Down
2 changes: 2 additions & 0 deletions llm-complete-guide/configs/staging/rag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@ settings:
- ratelimit
- rerankers
- pygithub
- rerankers[flashrank]
environment:
ZENML_PROJECT_SECRET_NAME: llm_complete
ZENML_ENABLE_RICH_TRACEBACK: FALSE
ZENML_LOGGING_VERBOSITY: INFO
python_package_installer: "uv"
parent_image: "339712793861.dkr.ecr.eu-central-1.amazonaws.com/zenml:llm_index_and_evaluate-orchestrator"
skip_build: true

steps:
url_scraper:
parameters:
Expand Down
7 changes: 4 additions & 3 deletions llm-complete-guide/gh_action_rag.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,13 @@ def main(
no_cache (bool): If `True`, cache will be disabled.
config (str): The path to the configuration file.
create_template (bool): If `True`, a run template will be created.
action_id (str): The action ID.
service_account_id (str): The service account ID.
event_source_id (str): The event source ID.
zenml_model_name (str): The ZenML model name.
zenml_model_version (str): The ZenML model version.
"""
pipeline_args = {"enable_cache": not no_cache}

client = Client()
config_path = Path(__file__).parent / "configs" / config

Expand Down Expand Up @@ -139,7 +140,7 @@ def main(
)

if create_template:
# run pipeline
# Run pipeline
run = llm_index_and_evaluate.with_options(
model=zenml_model,
config_path=str(config_path),
Expand All @@ -157,7 +158,7 @@ def main(
name_id_or_prefix="LLM Complete (production)",
allow_name_prefix_match=True,
)
except ZenKeyError:
except KeyError:
if not event_source_id:
raise RuntimeError(
"An event source is required for this workflow."
Expand Down

0 comments on commit 5cae76d

Please sign in to comment.