From cd3d424cb131a986c8853385a1e2204742a95548 Mon Sep 17 00:00:00 2001 From: Igor Kasianenko Date: Fri, 9 May 2025 16:27:07 +0100 Subject: [PATCH 1/6] fix failing github actions --- .github/workflows/pytest_cpu_gha_runner.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/pytest_cpu_gha_runner.yaml b/.github/workflows/pytest_cpu_gha_runner.yaml index 4c8d6a671..b46998713 100644 --- a/.github/workflows/pytest_cpu_gha_runner.yaml +++ b/.github/workflows/pytest_cpu_gha_runner.yaml @@ -70,7 +70,5 @@ jobs: id: test_summary uses: test-summary/action@v2 with: - paths: | - **/*.xml - !**/AndroidManifest.xml + paths: $GITHUB_WORKSPACE/result.xml if: always() From 235af2ac66c8cf11897913db3a60552eff834fe6 Mon Sep 17 00:00:00 2001 From: Igor Kasianenko Date: Thu, 22 May 2025 14:41:01 +0100 Subject: [PATCH 2/6] revert changes in pytest_cpu_gha_runner.yaml --- .github/workflows/pytest_cpu_gha_runner.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pytest_cpu_gha_runner.yaml b/.github/workflows/pytest_cpu_gha_runner.yaml index b46998713..442bcf967 100644 --- a/.github/workflows/pytest_cpu_gha_runner.yaml +++ b/.github/workflows/pytest_cpu_gha_runner.yaml @@ -70,5 +70,5 @@ jobs: id: test_summary uses: test-summary/action@v2 with: - paths: $GITHUB_WORKSPACE/result.xml + paths: "**/*.xml" if: always() From 001f14dd1d171f9cabe9fa91edc164331dde3b5e Mon Sep 17 00:00:00 2001 From: Igor Kasianenko Date: Fri, 23 May 2025 13:31:43 +0100 Subject: [PATCH 3/6] run summary only on success action --- .github/workflows/pytest_cpu_gha_runner.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pytest_cpu_gha_runner.yaml b/.github/workflows/pytest_cpu_gha_runner.yaml index b46998713..5a02c0a29 100644 --- a/.github/workflows/pytest_cpu_gha_runner.yaml +++ b/.github/workflows/pytest_cpu_gha_runner.yaml @@ -70,5 +70,7 @@ jobs: id: test_summary uses: test-summary/action@v2 with: - paths: $GITHUB_WORKSPACE/result.xml - if: always() + paths: | + $GITHUB_WORKSPACE/result.xml + !**/AndroidManifest.xml + if: ${{ steps.pytest.outcome == 'true' }} From 395cd8ee0c8cae0c170a4b22821b13c2764e9e7b Mon Sep 17 00:00:00 2001 From: Igor Kasianenko Date: Fri, 23 May 2025 13:53:41 +0100 Subject: [PATCH 4/6] fix dataset link --- src/tests/datasets/test_samsum_datasets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/datasets/test_samsum_datasets.py b/src/tests/datasets/test_samsum_datasets.py index 0297cbb30..7a880a592 100644 --- a/src/tests/datasets/test_samsum_datasets.py +++ b/src/tests/datasets/test_samsum_datasets.py @@ -12,7 +12,7 @@ class Config: model_type: str = "llama" try: - load_dataset("Samsung/samsum") + load_dataset("knkarthick/samsum") SAMSUM_UNAVAILABLE = False except ValueError: SAMSUM_UNAVAILABLE = True From 27c432b4996cd1e4ae3a00737de8157596ce5540 Mon Sep 17 00:00:00 2001 From: Igor Kasianenko Date: Tue, 27 May 2025 09:17:17 +0100 Subject: [PATCH 5/6] update test logic --- .github/workflows/pytest_cpu_gha_runner.yaml | 34 ++++++++++++-------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/.github/workflows/pytest_cpu_gha_runner.yaml b/.github/workflows/pytest_cpu_gha_runner.yaml index 5a02c0a29..432773a05 100644 --- a/.github/workflows/pytest_cpu_gha_runner.yaml +++ b/.github/workflows/pytest_cpu_gha_runner.yaml @@ -2,20 +2,20 @@ name: "[GHA][CPU] llama-cookbook Pytest tests on CPU GitHub hosted runner." on: pull_request: branches: - - 'main' + - "main" # triggers workflow manually for debugging purposes. workflow_dispatch: inputs: runner: - description: 'GHA Runner Scale Set label to run workflow on.' + description: "GHA Runner Scale Set label to run workflow on." required: true default: ubuntu-24.04 debug: - description: 'Run debugging steps?' - required: false - default: "true" + description: "Run debugging steps?" + required: false + default: "true" env: PYTORCH_WHEEL_URL: https://download.pytorch.org/whl/test/cu118 @@ -28,23 +28,21 @@ jobs: shell: bash # default shell to run all steps for a given job. runs-on: ${{ github.event.inputs.runner != '' && github.event.inputs.runner || 'ubuntu-24.04' }} steps: - - name: "[DEBUG] Get runner container OS information" id: os_info if: ${{ github.event.inputs.debug == 'true' }} run: | - cat /etc/os-release + cat /etc/os-release - name: "Checkout 'meta-llama/llama-cookbook' repository" id: checkout uses: actions/checkout@v4 - - name: "[DEBUG] Content of the repository after checkout" id: content_after_checkout if: ${{ github.event.inputs.debug == 'true' }} run: | - ls -la ${GITHUB_WORKSPACE} + ls -la ${GITHUB_WORKSPACE} - name: "Installing Python dependencies" id: python_dependencies @@ -52,25 +50,33 @@ jobs: pip3 install --upgrade pip pip3 install setuptools - - name: "Installing 'llama-cookbook' project" id: install_llama_cookbook_package run: | echo "Installing 'llama-cookbook' project (re: https://github.com/meta-llama/llama-cookbook/tree/main/src?tab=readme-ov-file#install-with-optional-dependencies)" pip install --extra-index-url ${PYTORCH_WHEEL_URL} -e '.[tests]' - - name: "Running PyTest tests on GHA CPU Runner" id: pytest + continue-on-error: true run: | echo "Running PyTest tests at 'GITHUB_WORKSPACE' path: ${GITHUB_WORKSPACE}" cd $GITHUB_WORKSPACE && python3 -m pytest --junitxml="$GITHUB_WORKSPACE/result.xml" + # checking for the presence of the Junit generated report file: + if [ -f "$GITHUB_WORKSPACE/result.xml"]; then + cat "$GITHUB_WORKSPACE/result.xml" + run: echo ::set-output name=status::success + else + echo "$GITHUB_WORKSPACE/result.xml file is not present." + run: echo ::set-output name=status::failure + fi + - name: Publish Test Summary id: test_summary uses: test-summary/action@v2 with: - paths: | - $GITHUB_WORKSPACE/result.xml + paths: | + **/*.xml !**/AndroidManifest.xml - if: ${{ steps.pytest.outcome == 'true' }} + if: steps.pytest.outputs.status == 'success' From 26b1767331ed4af2757b0f70496a99d07e1ecacb Mon Sep 17 00:00:00 2001 From: Igor Kasianenko Date: Wed, 28 May 2025 08:25:48 +0100 Subject: [PATCH 6/6] fix linux commands in test --- .github/workflows/pytest_cpu_gha_runner.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pytest_cpu_gha_runner.yaml b/.github/workflows/pytest_cpu_gha_runner.yaml index 432773a05..fc67d30c0 100644 --- a/.github/workflows/pytest_cpu_gha_runner.yaml +++ b/.github/workflows/pytest_cpu_gha_runner.yaml @@ -66,10 +66,10 @@ jobs: # checking for the presence of the Junit generated report file: if [ -f "$GITHUB_WORKSPACE/result.xml"]; then cat "$GITHUB_WORKSPACE/result.xml" - run: echo ::set-output name=status::success + echo "report_available=true" "$GITHUB_OUTPUT" else echo "$GITHUB_WORKSPACE/result.xml file is not present." - run: echo ::set-output name=status::failure + echo "report_available=false" "$GITHUB_OUTPUT" fi - name: Publish Test Summary @@ -79,4 +79,4 @@ jobs: paths: | **/*.xml !**/AndroidManifest.xml - if: steps.pytest.outputs.status == 'success' + if: steps.pytest.outputs.report_available == 'true' \ No newline at end of file