Skip to content

Commit

Permalink
fix: makefile edit for unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ishaansehgal99 committed Feb 15, 2024
1 parent 56cacc6 commit cfe9ac7
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/e2e-preset-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Determine Affected Models
id: affected_models
run: |
PR_BRANCH=${{ github.head_ref }} \
PR_BRANCH=${{ github.ref_name }} \
python3 .github/workflows/kind-cluster/determine_models.py
- name: Print Determined Models
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/preset-image-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,5 +118,6 @@ jobs:
if: ${{ always() }}
run: |
kubectl get job --no-headers -o custom-columns=":metadata.name" | grep "^docker-build-job-${{ matrix.model.name }}-[0-9]" | xargs -r kubectl delete job
kubectl get pods --no-headers -o custom-columns=":metadata.name" | grep "^docker-build-job-${{ matrix.model.name }}-[0-9]" | xargs -r kubectl delete pod
# Job deletion above deletes associated pods
# kubectl get pods --no-headers -o custom-columns=":metadata.name" | grep "^docker-build-job-${{ matrix.model.name }}-[0-9]" | xargs -r kubectl delete pod
4 changes: 4 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ jobs:
run: |
make unit-test
- name: Run inference api unit tests
run: |
make inference-api-e2e
- name: Upload Codecov report
uses: codecov/codecov-action@v4
with:
Expand Down
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ fmt: ## Run go fmt against code.
unit-test: ## Run unit tests.
go test -v $(shell go list ./pkg/... ./api/... | grep -v /vendor) -race -coverprofile=coverage.txt -covermode=atomic
go tool cover -func=coverage.txt

inference-api-e2e:
pip install -r presets/inference/text-generation/requirements.txt
pytest -o log_cli=true -o log_cli_level=INFO .

Expand Down
1 change: 0 additions & 1 deletion docker/presets/llama-2/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ RUN git clone https://github.com/facebookresearch/llama

WORKDIR /workspace/llama

# RUN sed -i $'/torch.distributed.init_process_group("nccl")/c\\ import datetime\\\n torch.distributed.init_process_group("nccl", timeout=datetime.timedelta(days=365*100))' /workspace/llama/llama/generation.py
RUN ["/bin/bash", "-c", "sed -i $'/torch.distributed.init_process_group(\"nccl\")/c\\ import datetime\\\n torch.distributed.init_process_group(\"nccl\", timeout=datetime.timedelta(days=365*100))' /workspace/llama/llama/generation.py"]

RUN pip install -e .
Expand Down

0 comments on commit cfe9ac7

Please sign in to comment.