Skip to content

Commit

Permalink
undo adding a test
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-garvey committed Nov 13, 2023
1 parent e631023 commit 45685d3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions python/turbine_models/model_builder.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
from transformers import AutoModel, AutoTokenizer, AutoConfig
from abc import ABC, abstractmethod
import torch
import shark_turbine.aot as aot

class HFBuilder():
class TransformerBuilder():
"""
A model builder that uses Hugging Face's transformers library to build a PyTorch model.
Expand Down
2 changes: 0 additions & 2 deletions tests/examples/aot_mlp_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,13 @@ def _run(local_path: str):
path = REPO_DIR / local_path
subprocess.check_call([sys.executable, str(path)])


class AOTMLPTest(unittest.TestCase):
def testMLPExportSimple(self):
_run("examples/aot_mlp/mlp_export_simple.py")

def testMLPExportSimple(self):
_run("examples/aot_mlp/mlp_export_dynamic.py")


if __name__ == "__main__":
logging.basicConfig(level=logging.DEBUG)
unittest.main()
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import unittest
from transformers import AutoModel, AutoTokenizer
from turbine_models.model_builder import HFBuilder
from turbine_models.model_builder import TransformerBuilder
from hf_dict import model_dict
import torch

Expand All @@ -10,7 +10,7 @@ class TestHFBuilder(unittest.TestCase):
def create_test(model_name, model_data):
def test(self):
example_input = torch.ones(*model_data.input_shape, dtype=model_data.torch_dtype)
builder = HFBuilder(example_input, model_name, auto_tokenizer=None)
builder = TransformerBuilder(example_input, model_name, auto_tokenizer=None)
compiled_module = builder.get_compiled_module()
self.assertIsNotNone(compiled_module)
return test
Expand Down

0 comments on commit 45685d3

Please sign in to comment.