Skip to content

Add Integration Testing for chakra_trace_link and chakra_converter #2

Add Integration Testing for chakra_trace_link and chakra_converter

Add Integration Testing for chakra_trace_link and chakra_converter #2

name: Integration Tests
on: pull_request
jobs:
integration-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
with:
lfs: true
- name: Setup Python Environment
uses: actions/setup-python@v2
with:
python-version: '3.10.14'
- name: Install Dependencies
run: |
pip install -r requirements-dev.txt
pip install .
- name: Install PARAM
run: |
git clone https://github.com/facebookresearch/param.git
cd param/train/compute/python/
git checkout c83ce8429110a86549c40fec5a01acbd9fbd54a4
pip install .
- name: Extract Data Files
run: |
tar -xzf tests/data/1.0.2-chakra.0.0.4/llama_pytorch24.05.tgz \
-C tests/data/
- name: Run chakra_trace_link for Each Pair
run: |
for i in {0..7}
do
chakra_trace_link --pytorch-et-file \
tests/data/llama_pytorch24.05/megatron_et_$i.json \
--kineto-file tests/data/llama_pytorch24.05/megatron_kineto_$i.json \
--output-file tests/data/llama_pytorch24.05/megatron_$i.json &
done
wait
- name: Run chakra_converter for Each Output
run: |
for i in {0..7}
do
chakra_converter --input_filename \
tests/data/llama_pytorch24.05/megatron_$i.json \
--output_filename tests/data/llama_pytorch24.05/megatron_$i.chakra \
--input_type PyTorch > /tmp/rank_$i &
done
wait
- name: Check Outputs
run: |
for i in {0..7}
do
test -f tests/data/llama_pytorch24.05/megatron_$i.chakra \
&& echo "File tests/data/llama_pytorch24.05/megatron_$i.chakra exists."
done