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

generate llms.txt for our docs #3273

Merged
merged 29 commits into from
Jan 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
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
59 changes: 59 additions & 0 deletions .github/workflows/docs_summarization_submit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
name: Summarize and Upload Docs
on:
push:
branches: [release/**]
jobs:
summarize-and-upload:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install openai pathlib huggingface_hub
npm install -g repomix
- name: Generate repomix outputs
run: |
# Create directory for outputs
mkdir -p repomix-outputs

# Full docs
repomix --include "docs/book/**/*.md"
mv repomix-output.txt repomix-outputs/llms-full.txt

# Component guide
repomix --include "docs/book/component-guide/**/*.md"
mv repomix-output.txt repomix-outputs/component-guide.txt

# User guide
repomix --include "docs/book/user-guide/**/*.md"
mv repomix-output.txt user-guide.txt

# Getting started
repomix --include "docs/book/getting-started/**/*.md"
mv repomix-output.txt getting-started.txt

# Merge user guide and getting started into basics
cat user-guide.txt getting-started.txt > repomix-outputs/basics.txt
rm user-guide.txt getting-started.txt
- name: Upload repomix outputs
uses: actions/upload-artifact@v4
with:
name: repomix-outputs
path: repomix-outputs
retention-days: 5
- name: Summarize and upload to HuggingFace
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: |-
python scripts/summarize_docs.py
python scripts/upload_to_huggingface.py
2 changes: 1 addition & 1 deletion examples/e2e/LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Apache Software License 2.0

Copyright (c) ZenML GmbH 2024. All rights reserved.
Copyright (c) ZenML GmbH 2025. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion examples/e2e/configs/deployer_config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Apache Software License 2.0
#
# Copyright (c) ZenML GmbH 2024. All rights reserved.
# Copyright (c) ZenML GmbH 2025. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion examples/e2e/configs/inference_config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Apache Software License 2.0
#
# Copyright (c) ZenML GmbH 2024. All rights reserved.
# Copyright (c) ZenML GmbH 2025. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion examples/e2e/configs/train_config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Apache Software License 2.0
#
# Copyright (c) ZenML GmbH 2024. All rights reserved.
# Copyright (c) ZenML GmbH 2025. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion examples/e2e/pipelines/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Apache Software License 2.0
#
# Copyright (c) ZenML GmbH 2024. All rights reserved.
# Copyright (c) ZenML GmbH 2025. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion examples/e2e/pipelines/batch_inference.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Apache Software License 2.0
#
# Copyright (c) ZenML GmbH 2024. All rights reserved.
# Copyright (c) ZenML GmbH 2025. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion examples/e2e/pipelines/deployment.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Apache Software License 2.0
#
# Copyright (c) ZenML GmbH 2024. All rights reserved.
# Copyright (c) ZenML GmbH 2025. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion examples/e2e/pipelines/training.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Apache Software License 2.0
#
# Copyright (c) ZenML GmbH 2024. All rights reserved.
# Copyright (c) ZenML GmbH 2025. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion examples/e2e/run.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Apache Software License 2.0
#
# Copyright (c) ZenML GmbH 2024. All rights reserved.
# Copyright (c) ZenML GmbH 2025. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion examples/e2e/steps/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Apache Software License 2.0
#
# Copyright (c) ZenML GmbH 2024. All rights reserved.
# Copyright (c) ZenML GmbH 2025. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion examples/e2e/steps/alerts/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Apache Software License 2.0
#
# Copyright (c) ZenML GmbH 2024. All rights reserved.
# Copyright (c) ZenML GmbH 2025. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion examples/e2e/steps/alerts/notify_on.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Apache Software License 2.0
#
# Copyright (c) ZenML GmbH 2024. All rights reserved.
# Copyright (c) ZenML GmbH 2025. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion examples/e2e/steps/data_quality/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Apache Software License 2.0
#
# Copyright (c) ZenML GmbH 2024. All rights reserved.
# Copyright (c) ZenML GmbH 2025. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion examples/e2e/steps/data_quality/drift_quality_gate.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Apache Software License 2.0
#
# Copyright (c) ZenML GmbH 2024. All rights reserved.
# Copyright (c) ZenML GmbH 2025. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion examples/e2e/steps/deployment/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Apache Software License 2.0
#
# Copyright (c) ZenML GmbH 2024. All rights reserved.
# Copyright (c) ZenML GmbH 2025. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
12 changes: 5 additions & 7 deletions examples/e2e/steps/deployment/deployment_deploy.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Apache Software License 2.0
#
# Copyright (c) ZenML GmbH 2024. All rights reserved.
# Copyright (c) ZenML GmbH 2025. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -34,12 +34,10 @@


@step
def deployment_deploy() -> (
Annotated[
Optional[MLFlowDeploymentService],
ArtifactConfig(name="mlflow_deployment", is_deployment_artifact=True),
]
):
def deployment_deploy() -> Annotated[
Optional[MLFlowDeploymentService],
ArtifactConfig(name="mlflow_deployment", is_deployment_artifact=True),
]:
"""Predictions step.

This is an example of a predictions step that takes the data in and returns
Expand Down
2 changes: 1 addition & 1 deletion examples/e2e/steps/etl/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Apache Software License 2.0
#
# Copyright (c) ZenML GmbH 2024. All rights reserved.
# Copyright (c) ZenML GmbH 2025. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion examples/e2e/steps/etl/data_loader.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Apache Software License 2.0
#
# Copyright (c) ZenML GmbH 2024. All rights reserved.
# Copyright (c) ZenML GmbH 2025. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion examples/e2e/steps/etl/inference_data_preprocessor.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Apache Software License 2.0
#
# Copyright (c) ZenML GmbH 2024. All rights reserved.
# Copyright (c) ZenML GmbH 2025. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion examples/e2e/steps/etl/train_data_preprocessor.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Apache Software License 2.0
#
# Copyright (c) ZenML GmbH 2024. All rights reserved.
# Copyright (c) ZenML GmbH 2025. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion examples/e2e/steps/etl/train_data_splitter.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Apache Software License 2.0
#
# Copyright (c) ZenML GmbH 2024. All rights reserved.
# Copyright (c) ZenML GmbH 2025. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion examples/e2e/steps/hp_tuning/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Apache Software License 2.0
#
# Copyright (c) ZenML GmbH 2024. All rights reserved.
# Copyright (c) ZenML GmbH 2025. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Apache Software License 2.0
#
# Copyright (c) ZenML GmbH 2024. All rights reserved.
# Copyright (c) ZenML GmbH 2025. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion examples/e2e/steps/hp_tuning/hp_tuning_single_search.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Apache Software License 2.0
#
# Copyright (c) ZenML GmbH 2024. All rights reserved.
# Copyright (c) ZenML GmbH 2025. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion examples/e2e/steps/inference/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Apache Software License 2.0
#
# Copyright (c) ZenML GmbH 2024. All rights reserved.
# Copyright (c) ZenML GmbH 2025. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion examples/e2e/steps/inference/inference_predict.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Apache Software License 2.0
#
# Copyright (c) ZenML GmbH 2024. All rights reserved.
# Copyright (c) ZenML GmbH 2025. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion examples/e2e/steps/promotion/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Apache Software License 2.0
#
# Copyright (c) ZenML GmbH 2024. All rights reserved.
# Copyright (c) ZenML GmbH 2025. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Apache Software License 2.0
#
# Copyright (c) ZenML GmbH 2024. All rights reserved.
# Copyright (c) ZenML GmbH 2025. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Apache Software License 2.0
#
# Copyright (c) ZenML GmbH 2024. All rights reserved.
# Copyright (c) ZenML GmbH 2025. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion examples/e2e/steps/training/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Apache Software License 2.0
#
# Copyright (c) ZenML GmbH 2024. All rights reserved.
# Copyright (c) ZenML GmbH 2025. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
10 changes: 5 additions & 5 deletions examples/e2e/steps/training/model_evaluator.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Apache Software License 2.0
#
# Copyright (c) ZenML GmbH 2024. All rights reserved.
# Copyright (c) ZenML GmbH 2025. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -82,22 +82,22 @@ def model_evaluator(
dataset_trn.drop(columns=[target]),
dataset_trn[target],
)
logger.info(f"Train accuracy={trn_acc*100:.2f}%")
logger.info(f"Train accuracy={trn_acc * 100:.2f}%")
tst_acc = model.score(
dataset_tst.drop(columns=[target]),
dataset_tst[target],
)
logger.info(f"Test accuracy={tst_acc*100:.2f}%")
logger.info(f"Test accuracy={tst_acc * 100:.2f}%")
mlflow.log_metric("testing_accuracy_score", tst_acc)

messages = []
if trn_acc < min_train_accuracy:
messages.append(
f"Train accuracy {trn_acc*100:.2f}% is below {min_train_accuracy*100:.2f}% !"
f"Train accuracy {trn_acc * 100:.2f}% is below {min_train_accuracy * 100:.2f}% !"
)
if tst_acc < min_test_accuracy:
messages.append(
f"Test accuracy {tst_acc*100:.2f}% is below {min_test_accuracy*100:.2f}% !"
f"Test accuracy {tst_acc * 100:.2f}% is below {min_test_accuracy * 100:.2f}% !"
)
if fail_on_accuracy_quality_gates and messages:
raise RuntimeError(
Expand Down
2 changes: 1 addition & 1 deletion examples/e2e/steps/training/model_trainer.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Apache Software License 2.0
#
# Copyright (c) ZenML GmbH 2024. All rights reserved.
# Copyright (c) ZenML GmbH 2025. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion examples/e2e/utils/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Apache Software License 2.0
#
# Copyright (c) ZenML GmbH 2024. All rights reserved.
# Copyright (c) ZenML GmbH 2025. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion examples/e2e/utils/get_model_from_config.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Apache Software License 2.0
#
# Copyright (c) ZenML GmbH 2024. All rights reserved.
# Copyright (c) ZenML GmbH 2025. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion examples/e2e/utils/preprocess.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Apache Software License 2.0
#
# Copyright (c) ZenML GmbH 2024. All rights reserved.
# Copyright (c) ZenML GmbH 2025. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion examples/e2e/utils/promote_in_model_registry.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Apache Software License 2.0
#
# Copyright (c) ZenML GmbH 2024. All rights reserved.
# Copyright (c) ZenML GmbH 2025. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion examples/e2e_nlp/.copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Changes here will be overwritten by Copier
_commit: 2024.11.28
_commit: 2025.01.08
_src_path: gh:zenml-io/template-nlp
accelerator: cpu
cloud_of_choice: aws
Expand Down
Loading