Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
radekosmulski committed Apr 19, 2023
1 parent 36e9def commit f94ef51
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
execute=False,
)
@pytest.mark.notebook
def test_next_item_prediction(tb):
def test_next_item_prediction(tb, tmpdir):
tb.inject(
"""
f"""
import os, random
from datetime import datetime, timedelta
from merlin.datasets.synthetic import generate_data
Expand All @@ -34,18 +34,18 @@ def generate_date():
return date
df['checkin'] = [generate_date() for _ in range(df.shape[0])]
df['checkout'] = [generate_date() for _ in range(df.shape[0])]
df.to_csv('/tmpdir/train_set.csv')
df.to_csv('{tmpdir}/train_set.csv')
"""
)
tb.cells[4].source = tb.cells[4].source.replace("get_booking('/workspace/data')", "")
tb.cells[4].source = tb.cells[4].source.replace(
"read_csv('/workspace/data/train_set.csv'", "read_csv('/tmpdir/train_set.csv'"
"read_csv('/workspace/data/train_set.csv'", f"read_csv('{tmpdir}/train_set.csv'"
)
tb.cells[31].source = tb.cells[31].source.replace("epochs=5", "epochs=1")
tb.cells[37].source = tb.cells[37].source.replace("/workspace/ensemble", "/tmpdir/ensemble")
tb.cells[37].source = tb.cells[37].source.replace("/workspace/ensemble", f"{tmpdir}/ensemble")
tb.execute_cell(list(range(0, 38)))

with run_triton_server("/tmpdir/ensemble", grpc_port=8001):
with run_triton_server(f"{tmpdir}/ensemble", grpc_port=8001):
tb.execute_cell(list(range(38, len(tb.cells))))

tb.inject(
Expand Down

0 comments on commit f94ef51

Please sign in to comment.