Skip to content

HOLD: Inference mock migration #22

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
33 changes: 17 additions & 16 deletions .github/workflows/instructlab-knowledge-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ on:
branches:
- "main"

env:
# dependencies that need to be installed using pip for testing to work
TESTING_PIP_DEPENDENCIES: "papermill nbformat ipykernel"

jobs:
end_to_end:
strategy:
Expand All @@ -33,20 +29,25 @@ jobs:
cache: pip
- name: Install Testing Tools
run: |
pip install ${{ env.TESTING_PIP_DEPENDENCIES }}
pip install papermill nbformat ipykernel
ipython kernel install --name "python3" --user
- name: Validate The Notebook
working-directory: ./notebooks/instructlab-knowledge
run: |
git clone https://github.com/instructlab/instructlab.git
python3 instructlab/scripts/validate_notebook.py ${{ matrix.notebooks_to_test }}
- name: Checkout in-house CI actions
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: iamemilio/ci-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we be using https://github.com/instructlab/ci-actions here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ya, this one is not ready to merge yet. Sorry for the premature undrafting. I still need to merge the change in ci-actoins and cut a release

path: ci-actions
ref: inference-mock
sparse-checkout: |
actions/validate-notebooks
actions/inference-mock
- name: Validate Jupyter Notebooks
uses: ./ci-actions/actions/validate-notebooks
with:
path: "./notebooks/instructlab-knowledge/${{ matrix.notebooks_to_test }}"
- name: Start Inference Mock Server
working-directory: ./tests/inference-mock
run: |
pip install -r requirements.txt
nohup python app.py &
sleep 1
echo "Inference mock server started on port 11434"
uses: ./ci-actions/actions/inference-mock
with:
config: ./notebooks/instructlab-knowledge/ci-config.yml
- name: Run End To End Tests
working-directory: ./notebooks/instructlab-knowledge
# NOTE: for this to work, cells with parameters need to be tagged as parameters in the target notebooks
Expand Down
7 changes: 7 additions & 0 deletions notebooks/instructlab-knowledge/ci-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Inference Mock Config

debug: False
matches:
- contains:
- 'I need you to generate three questions that must be answered only with information contained in this passage, and nothing else.'
response: '{"fact_single": "What are some common ways to assign rewards to partial answers?", "fact_single_answer": "There are three: prod, which takes the product of rewards across all steps; min, which selects the minimum reward over all steps; and last, which uses the reward from the final step.", "reasoning": "What is the best method for rewarding models?", "reasoning_answer": "That depends on whether the training data is prepared using MC rollout, human annotation, or model annotation.", "summary": "How does QWEN implement model reward?", "summary_answer": "Qwen computes the aggregate reward based on the entire partial reward trajectory. I also uses a method that feeds the performance reference model with partial answers, then only considering the final reward token."}'
63 changes: 0 additions & 63 deletions tests/inference-mock/app.py

This file was deleted.

Empty file.
40 changes: 0 additions & 40 deletions tests/inference-mock/qna/qna.py

This file was deleted.

1 change: 0 additions & 1 deletion tests/inference-mock/requirements.txt

This file was deleted.

Loading