From f9ed657c35b297da8f05c2477ce3794b77b84651 Mon Sep 17 00:00:00 2001 From: MKhalusova Date: Mon, 29 Jan 2024 10:32:24 -0500 Subject: [PATCH 01/10] Added GitHub workflows --- .github/workflows /build_documentation.yml | 19 ++++++++++++++++++ .github/workflows /build_pr_documentation.yml | 20 +++++++++++++++++++ .../workflows /upload_pr_documentation.yml | 17 ++++++++++++++++ 3 files changed, 56 insertions(+) create mode 100644 .github/workflows /build_documentation.yml create mode 100644 .github/workflows /build_pr_documentation.yml create mode 100644 .github/workflows /upload_pr_documentation.yml diff --git a/.github/workflows /build_documentation.yml b/.github/workflows /build_documentation.yml new file mode 100644 index 00000000..687aed65 --- /dev/null +++ b/.github/workflows /build_documentation.yml @@ -0,0 +1,19 @@ +name: Build documentation + +on: + push: + branches: + - main + +jobs: + build: + uses: huggingface/doc-builder/.github/workflows/build_main_documentation.yml@main + with: + commit_sha: ${{ github.sha }} + package: cookbook + package_name: cookbook + path_to_docs: cookbook/notebooks/ + additional_args: --not_python_module + languages: en + secrets: + hf_token: ${{ secrets.HF_DOC_BUILD_PUSH }} \ No newline at end of file diff --git a/.github/workflows /build_pr_documentation.yml b/.github/workflows /build_pr_documentation.yml new file mode 100644 index 00000000..97c1ea77 --- /dev/null +++ b/.github/workflows /build_pr_documentation.yml @@ -0,0 +1,20 @@ +name: Build PR Documentation + +on: + pull_request: + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + build: + uses: huggingface/doc-builder/.github/workflows/build_pr_documentation.yml@main + with: + commit_sha: ${{ github.event.pull_request.head.sha }} + pr_number: ${{ github.event.number }} + package: cookbook + package_name: cookbook + path_to_docs: cookbook/notebooks/ + additional_args: --not_python_module + languages: en \ No newline at end of file diff --git a/.github/workflows /upload_pr_documentation.yml b/.github/workflows /upload_pr_documentation.yml new file mode 100644 index 00000000..03b4b5ac --- /dev/null +++ b/.github/workflows /upload_pr_documentation.yml @@ -0,0 +1,17 @@ +name: Upload PR Documentation + +on: + workflow_run: + workflows: ["Build PR Documentation"] + types: + - completed + +jobs: + build: + uses: huggingface/doc-builder/.github/workflows/upload_pr_documentation.yml@main + with: + package_name: cookbook + hub_base_path: https://moon-ci-docs.huggingface.co/learn + secrets: + hf_token: ${{ secrets.HF_DOC_BUILD_PUSH }} + comment_bot_token: ${{ secrets.COMMENT_BOT_TOKEN }} \ No newline at end of file From e20d1c5e03396c51375b5298bfee35239bf4beb7 Mon Sep 17 00:00:00 2001 From: MKhalusova Date: Mon, 29 Jan 2024 12:24:14 -0500 Subject: [PATCH 02/10] moved notebook files under notebooks/en --- notebooks/{ => en}/FAISS_with_HF_datasets_and_CLIP.ipynb | 0 notebooks/{ => en}/Fine_tuning_Code_LLM_on_single_GPU.ipynb | 0 notebooks/{ => en}/RAG_zephyr_langchain.ipynb | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename notebooks/{ => en}/FAISS_with_HF_datasets_and_CLIP.ipynb (100%) rename notebooks/{ => en}/Fine_tuning_Code_LLM_on_single_GPU.ipynb (100%) rename notebooks/{ => en}/RAG_zephyr_langchain.ipynb (100%) diff --git a/notebooks/FAISS_with_HF_datasets_and_CLIP.ipynb b/notebooks/en/FAISS_with_HF_datasets_and_CLIP.ipynb similarity index 100% rename from notebooks/FAISS_with_HF_datasets_and_CLIP.ipynb rename to notebooks/en/FAISS_with_HF_datasets_and_CLIP.ipynb diff --git a/notebooks/Fine_tuning_Code_LLM_on_single_GPU.ipynb b/notebooks/en/Fine_tuning_Code_LLM_on_single_GPU.ipynb similarity index 100% rename from notebooks/Fine_tuning_Code_LLM_on_single_GPU.ipynb rename to notebooks/en/Fine_tuning_Code_LLM_on_single_GPU.ipynb diff --git a/notebooks/RAG_zephyr_langchain.ipynb b/notebooks/en/RAG_zephyr_langchain.ipynb similarity index 100% rename from notebooks/RAG_zephyr_langchain.ipynb rename to notebooks/en/RAG_zephyr_langchain.ipynb From 653fa551044837b76e5966d1db17fde62f0b94be Mon Sep 17 00:00:00 2001 From: MKhalusova Date: Mon, 29 Jan 2024 12:59:15 -0500 Subject: [PATCH 03/10] Added _toctree.yml --- notebooks/en/_toctree.yml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 notebooks/en/_toctree.yml diff --git a/notebooks/en/_toctree.yml b/notebooks/en/_toctree.yml new file mode 100644 index 00000000..41b73bbb --- /dev/null +++ b/notebooks/en/_toctree.yml @@ -0,0 +1,8 @@ +- title: Open-Source AI Cookbook + sections: + - local: FAISS_with_HF_datasets_and_CLIP.ipynb + title: Embedding multimodal data for similarity search using 🤗 transformers, 🤗 datasets and FAISS + - local: RAG_zephyr_langchain.ipynb + title: Simple RAG for GitHub issues using Hugging Face Zephyr and LangChain + - local: Fine_tuning_Code_LLM_on_single_GPU.ipynb + title: Fine-tuning a Code LLM on Custom Code on a single GPU From a2209d9d02c6d18adb61cf34c24504bf20361fc2 Mon Sep 17 00:00:00 2001 From: MKhalusova Date: Mon, 29 Jan 2024 13:52:58 -0500 Subject: [PATCH 04/10] Two new notebooks added to _toctree.yml --- notebooks/{ => en}/RAG_evaluation.ipynb | 0 notebooks/en/_toctree.yml | 8 ++++++-- notebooks/{ => en}/advanced_RAG.ipynb | 0 3 files changed, 6 insertions(+), 2 deletions(-) rename notebooks/{ => en}/RAG_evaluation.ipynb (100%) rename notebooks/{ => en}/advanced_RAG.ipynb (100%) diff --git a/notebooks/RAG_evaluation.ipynb b/notebooks/en/RAG_evaluation.ipynb similarity index 100% rename from notebooks/RAG_evaluation.ipynb rename to notebooks/en/RAG_evaluation.ipynb diff --git a/notebooks/en/_toctree.yml b/notebooks/en/_toctree.yml index 41b73bbb..52937c77 100644 --- a/notebooks/en/_toctree.yml +++ b/notebooks/en/_toctree.yml @@ -2,7 +2,11 @@ sections: - local: FAISS_with_HF_datasets_and_CLIP.ipynb title: Embedding multimodal data for similarity search using 🤗 transformers, 🤗 datasets and FAISS - - local: RAG_zephyr_langchain.ipynb - title: Simple RAG for GitHub issues using Hugging Face Zephyr and LangChain - local: Fine_tuning_Code_LLM_on_single_GPU.ipynb title: Fine-tuning a Code LLM on Custom Code on a single GPU + - local: RAG_zephyr_langchain.ipynb + title: Simple RAG for GitHub issues using Hugging Face Zephyr and LangChain + - local: advanced_RAG.ipynb + title: Advanced RAG on HuggingFace documentation using LangChain + - local: RAG_evaluation.ipynb + title: RAG Evaluation diff --git a/notebooks/advanced_RAG.ipynb b/notebooks/en/advanced_RAG.ipynb similarity index 100% rename from notebooks/advanced_RAG.ipynb rename to notebooks/en/advanced_RAG.ipynb From c4031f9716ba62c0029254b00f96646cb4827344 Mon Sep 17 00:00:00 2001 From: Mishig Davaadorj Date: Tue, 30 Jan 2024 10:03:30 +0100 Subject: [PATCH 05/10] rm unneeded .ipynb extensions --- notebooks/en/_toctree.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/notebooks/en/_toctree.yml b/notebooks/en/_toctree.yml index 52937c77..2258c0e7 100644 --- a/notebooks/en/_toctree.yml +++ b/notebooks/en/_toctree.yml @@ -1,12 +1,12 @@ - title: Open-Source AI Cookbook sections: - - local: FAISS_with_HF_datasets_and_CLIP.ipynb + - local: FAISS_with_HF_datasets_and_CLIP title: Embedding multimodal data for similarity search using 🤗 transformers, 🤗 datasets and FAISS - - local: Fine_tuning_Code_LLM_on_single_GPU.ipynb + - local: Fine_tuning_Code_LLM_on_single_GPU title: Fine-tuning a Code LLM on Custom Code on a single GPU - - local: RAG_zephyr_langchain.ipynb + - local: RAG_zephyr_langchain title: Simple RAG for GitHub issues using Hugging Face Zephyr and LangChain - - local: advanced_RAG.ipynb + - local: advanced_RAG title: Advanced RAG on HuggingFace documentation using LangChain - - local: RAG_evaluation.ipynb + - local: RAG_evaluation title: RAG Evaluation From c96c2434b8d8f132d39f880363af24dba0df3ef2 Mon Sep 17 00:00:00 2001 From: MKhalusova Date: Tue, 30 Jan 2024 09:51:33 -0500 Subject: [PATCH 06/10] shorter titles, added index.md --- notebooks/en/_toctree.yml | 6 ++++-- notebooks/en/index.md | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 notebooks/en/index.md diff --git a/notebooks/en/_toctree.yml b/notebooks/en/_toctree.yml index 2258c0e7..213caf51 100644 --- a/notebooks/en/_toctree.yml +++ b/notebooks/en/_toctree.yml @@ -1,11 +1,13 @@ - title: Open-Source AI Cookbook sections: + - local: index + title: About the Open-Source AI Cookbook - local: FAISS_with_HF_datasets_and_CLIP - title: Embedding multimodal data for similarity search using 🤗 transformers, 🤗 datasets and FAISS + title: Embedding multimodal data for similarity search - local: Fine_tuning_Code_LLM_on_single_GPU title: Fine-tuning a Code LLM on Custom Code on a single GPU - local: RAG_zephyr_langchain - title: Simple RAG for GitHub issues using Hugging Face Zephyr and LangChain + title: Simple RAG using Hugging Face Zephyr and LangChain - local: advanced_RAG title: Advanced RAG on HuggingFace documentation using LangChain - local: RAG_evaluation diff --git a/notebooks/en/index.md b/notebooks/en/index.md new file mode 100644 index 00000000..74e46e64 --- /dev/null +++ b/notebooks/en/index.md @@ -0,0 +1,3 @@ +# Open-Source AI Cookbook + +[//]: # () \ No newline at end of file From 017c4b09f28ce24f377afa277c84833d9715494a Mon Sep 17 00:00:00 2001 From: Mishig Davaadorj Date: Thu, 1 Feb 2024 11:26:59 +0100 Subject: [PATCH 07/10] placeholder --- notebooks/en/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notebooks/en/index.md b/notebooks/en/index.md index 74e46e64..fe832994 100644 --- a/notebooks/en/index.md +++ b/notebooks/en/index.md @@ -1,3 +1,3 @@ # Open-Source AI Cookbook -[//]: # () \ No newline at end of file +we cooking \ No newline at end of file From c928cc23cd66ae5142ffc98bc0a8b33120f2188f Mon Sep 17 00:00:00 2001 From: Mishig Davaadorj Date: Thu, 1 Feb 2024 11:28:23 +0100 Subject: [PATCH 08/10] better title for index --- notebooks/en/_toctree.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notebooks/en/_toctree.yml b/notebooks/en/_toctree.yml index 213caf51..14e76918 100644 --- a/notebooks/en/_toctree.yml +++ b/notebooks/en/_toctree.yml @@ -1,7 +1,7 @@ - title: Open-Source AI Cookbook sections: - local: index - title: About the Open-Source AI Cookbook + title: Open-Source AI Cookbook - local: FAISS_with_HF_datasets_and_CLIP title: Embedding multimodal data for similarity search - local: Fine_tuning_Code_LLM_on_single_GPU From d385ba2dd38c361b585081c67b88c6b02199fa88 Mon Sep 17 00:00:00 2001 From: Mishig Davaadorj Date: Thu, 1 Feb 2024 11:29:37 +0100 Subject: [PATCH 09/10] Add "convert_notebooks: true" to github workflows --- .github/workflows /build_documentation.yml | 1 + .github/workflows /build_pr_documentation.yml | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows /build_documentation.yml b/.github/workflows /build_documentation.yml index 687aed65..53d94f16 100644 --- a/.github/workflows /build_documentation.yml +++ b/.github/workflows /build_documentation.yml @@ -15,5 +15,6 @@ jobs: path_to_docs: cookbook/notebooks/ additional_args: --not_python_module languages: en + convert_notebooks: true secrets: hf_token: ${{ secrets.HF_DOC_BUILD_PUSH }} \ No newline at end of file diff --git a/.github/workflows /build_pr_documentation.yml b/.github/workflows /build_pr_documentation.yml index 97c1ea77..64c41ff8 100644 --- a/.github/workflows /build_pr_documentation.yml +++ b/.github/workflows /build_pr_documentation.yml @@ -17,4 +17,5 @@ jobs: package_name: cookbook path_to_docs: cookbook/notebooks/ additional_args: --not_python_module - languages: en \ No newline at end of file + languages: en + convert_notebooks: true \ No newline at end of file From ad3bf7f4277673b78f5df599505e7ab382586110 Mon Sep 17 00:00:00 2001 From: Mishig Davaadorj Date: Thu, 1 Feb 2024 11:34:07 +0100 Subject: [PATCH 10/10] fix extra space " " in directory name --- .github/{workflows => workflows}/build_documentation.yml | 0 .github/{workflows => workflows}/build_pr_documentation.yml | 0 .github/{workflows => workflows}/upload_pr_documentation.yml | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename .github/{workflows => workflows}/build_documentation.yml (100%) rename .github/{workflows => workflows}/build_pr_documentation.yml (100%) rename .github/{workflows => workflows}/upload_pr_documentation.yml (100%) diff --git a/.github/workflows /build_documentation.yml b/.github/workflows/build_documentation.yml similarity index 100% rename from .github/workflows /build_documentation.yml rename to .github/workflows/build_documentation.yml diff --git a/.github/workflows /build_pr_documentation.yml b/.github/workflows/build_pr_documentation.yml similarity index 100% rename from .github/workflows /build_pr_documentation.yml rename to .github/workflows/build_pr_documentation.yml diff --git a/.github/workflows /upload_pr_documentation.yml b/.github/workflows/upload_pr_documentation.yml similarity index 100% rename from .github/workflows /upload_pr_documentation.yml rename to .github/workflows/upload_pr_documentation.yml