Skip to content

Commit

Permalink
Fix Evaluation CI failure (#302)
Browse files Browse the repository at this point in the history
Add perplexity deps
  • Loading branch information
archana-ramalingam authored Oct 21, 2024
1 parent 421f45a commit 79f2c77
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
pip install --no-compile -r pytorch-cpu-requirements.txt
pip install --no-compile -f https://iree.dev/pip-release-links.html --src deps \
-e "git+https://github.com/iree-org/iree-turbine.git#egg=iree-turbine"
pip install --no-compile -r requirements.txt -e sharktank/
pip install --no-compile -r requirements.txt -r sharktank/requirements-tests.txt -e sharktank/
- name: Run perplexity test
run: pytest sharktank/tests/evaluate/perplexity_test.py --longrun
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
pip install --no-compile -r pytorch-rocm-requirements.txt
pip install --no-compile -f https://iree.dev/pip-release-links.html --src deps \
-e "git+https://github.com/iree-org/iree-turbine.git#egg=iree-turbine"
pip install --no-compile -r requirements.txt -e sharktank/ shortfin/
pip install --no-compile -r requirements.txt -r sharktank/requirements-tests.txt -e sharktank/ shortfin/
- name: Run punet tests
run: |
Expand Down
11 changes: 0 additions & 11 deletions sharktank/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,6 @@ def pytest_addoption(parser):
help="Llama3.1 8B & 405B model baseline perplexity scores json",
)

parser.addoption(
"--current-perplexity-scores-json",
type=Path,
action="store",
default="sharktank/tests/evaluate/current_perplexity_scores.json",
help="Llama3.1 8B & 405B model current perplexity scores json",
)


def set_fixture_from_cli_option(
request: FixtureRequest,
Expand Down Expand Up @@ -200,7 +192,4 @@ def get_model_path(request: FixtureRequest):
model_path["baseline_perplexity_score_json"] = set_fixture_from_cli_option(
request, "--baseline-perplexity-score-json", "baseline_perplexity_score_json"
)
model_path["current_perplexity_scores_json"] = set_fixture_from_cli_option(
request, "--current-perplexity-scores-json", "current_perplexity_scores_json"
)
return model_path
21 changes: 0 additions & 21 deletions sharktank/tests/evaluate/perplexity_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@ def setUp(self):
with open(self.baseline_perplexity_score_json, "r") as f:
self.baseline_perplexity = json.load(f)

def save_perplexity(self, model_name: str, current_perplexity: dict):
self.current_perplexity_all = {model_name: current_perplexity}
with open(self.current_perplexity_scores_json, "w") as f:
json.dump(self.current_perplexity_all, f)

@longrun
def test_llama3_8B_f16_decomposed(self):

Expand All @@ -43,8 +38,6 @@ def test_llama3_8B_f16_decomposed(self):
]
)

self.save_perplexity(model_name, current_perplexity)

self.assertAlmostEqual(
baseline_perplexity["mean_perplexity"],
current_perplexity["mean_perplexity"],
Expand All @@ -71,8 +64,6 @@ def test_llama3_8B_f16_non_decomposed(self):
]
)

self.save_perplexity(model_name, current_perplexity)

self.assertAlmostEqual(
baseline_perplexity["mean_perplexity"],
current_perplexity["mean_perplexity"],
Expand All @@ -98,8 +89,6 @@ def test_llama3_8B_fp8_decomposed(self):
]
)

self.save_perplexity(model_name, current_perplexity)

self.assertAlmostEqual(
baseline_perplexity["mean_perplexity"],
current_perplexity["mean_perplexity"],
Expand All @@ -126,8 +115,6 @@ def test_llama3_8B_fp8_non_decomposed(self):
]
)

self.save_perplexity(model_name, current_perplexity)

self.assertAlmostEqual(
baseline_perplexity["mean_perplexity"],
current_perplexity["mean_perplexity"],
Expand All @@ -151,8 +138,6 @@ def test_llama3_405B_f16_decomposed(self):
]
)

self.save_perplexity(model_name, current_perplexity)

self.assertAlmostEqual(
baseline_perplexity["mean_perplexity"],
current_perplexity["mean_perplexity"],
Expand Down Expand Up @@ -180,8 +165,6 @@ def test_llama3_405B_f16_non_decomposed(self):
]
)

self.save_perplexity(model_name, current_perplexity)

self.assertAlmostEqual(
baseline_perplexity["mean_perplexity"],
current_perplexity["mean_perplexity"],
Expand All @@ -208,8 +191,6 @@ def test_llama3_405B_fp8_decomposed(self):
]
)

self.save_perplexity(model_name, current_perplexity)

self.assertAlmostEqual(
baseline_perplexity["mean_perplexity"],
current_perplexity["mean_perplexity"],
Expand Down Expand Up @@ -237,8 +218,6 @@ def test_llama3_405B_fp8_non_decomposed(self):
]
)

self.save_perplexity(model_name, current_perplexity)

self.assertAlmostEqual(
baseline_perplexity["mean_perplexity"],
current_perplexity["mean_perplexity"],
Expand Down

0 comments on commit 79f2c77

Please sign in to comment.