Skip to content

Commit

Permalink
Merge branch 'testing' of https://github.com/unifyai/demos into testing
Browse files Browse the repository at this point in the history
  • Loading branch information
vedpatwardhan committed Jan 19, 2024
2 parents f5282b9 + fd2a160 commit 5017457
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/_demo-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
fail-fast: false
matrix:
modules: [alexnet_demo, bert_demo, image_segmentation_with_ivy_unet, mmpretrain_to_jax, resnet_demo, torch_to_jax]
modules: [torch_to_jax]

steps:
- name: Clean repository
Expand Down
6 changes: 3 additions & 3 deletions examples_and_demos/torch_to_jax.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@
}
],
"source": [
"!pip install -q ivy\n",
"!pip install -q transformers\n",
"!pip install -q dm-haiku"
"!pip install ivy\n",
"!pip install transformers\n",
"!pip install dm-haiku"
]
},
{
Expand Down
7 changes: 7 additions & 0 deletions tests/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,18 @@ def __init__(self, *args, **kwargs):

@classmethod
def setUp(cls):
print("starting kernel manager")
cls.km = KernelManager()
cls.km.start_kernel(
extra_arguments=["--pylab=inline"], stderr=open(os.devnull, "w")
)
print("started kernel manager")
cls.kc = cls.km.blocking_client()
print("created blocking client")
cls.kc.start_channels()
print("started channels")
cls.kc.execute_interactive("import os;os.environ['IVY_ROOT']='.ivy'")
print("executed first cell")

@classmethod
def tearDown(cls):
Expand All @@ -39,6 +44,7 @@ def invert_config(self):
self.config = inverted_config

def test_notebook(self):
print("inside test_notebook")
cells_to_ignore = []
for cell_number, cell_content in enumerate(self.file.cells):
outputs = []
Expand Down Expand Up @@ -141,6 +147,7 @@ def startTest(self, test):

suite = unittest.TestLoader().loadTestsFromTestCase(NotebookTest)
runner = IterativeTestRunner(verbosity=2)
print("REACHED BEFORE RUN")
result = runner.run(suite)

if result.wasSuccessful():
Expand Down

0 comments on commit 5017457

Please sign in to comment.