Skip to content

Commit

Permalink
Update unit tests to remove num_rows in read_parquet() (#891)
Browse files Browse the repository at this point in the history
  • Loading branch information
edknv authored Mar 31, 2023
1 parent 9a6b842 commit 46846ed
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -327,9 +327,10 @@
}
],
"source": [
"batch = df_lib.read_parquet(\n",
" os.path.join(INPUT_DATA_DIR, \"valid.parquet\"), num_rows=3, columns=[\"userId\", \"movieId\"]\n",
"valid = df_lib.read_parquet(\n",
" os.path.join(INPUT_DATA_DIR, \"valid.parquet\"), columns=[\"userId\", \"movieId\"]\n",
")\n",
"batch = valid[:3]\n",
"print(batch)"
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -516,11 +516,11 @@
"df_lib = get_lib()\n",
"input_cols = workflow.input_schema.column_names\n",
"# read in data for request\n",
"batch = df_lib.read_parquet(\n",
"data = df_lib.read_parquet(\n",
" os.path.join(sorted(glob.glob(original_data_path + \"/*.parquet\"))[-1]),\n",
" num_rows=3,\n",
" columns=input_cols\n",
")\n",
"batch = data[:3]\n",
"batch = batch[[x for x in batch.columns if x not in ['label']]]\n",
"batch"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,11 +270,11 @@
"df_lib = get_lib()\n",
"input_cols = workflow.input_schema.column_names\n",
"# read in data for request\n",
"batch = df_lib.read_parquet(\n",
"data = df_lib.read_parquet(\n",
" os.path.join(sorted(glob.glob(original_data_path + \"/*.parquet\"))[-1]),\n",
" num_rows=3,\n",
" columns=input_cols\n",
")\n",
"batch = data[:3]\n",
"batch"
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ def test_func():
from merlin.dataloader.tf_utils import configure_tensorflow
configure_tensorflow()
df_lib = get_lib()
batch = df_lib.read_parquet(
train = df_lib.read_parquet(
os.path.join("/tmp/data/processed_nvt/", "train", "part_0.parquet"),
num_rows=1,
columns=["user_id_raw"],
)
batch = train[:1]
from merlin.systems.triton.utils import run_ensemble_on_tritonserver
response = run_ensemble_on_tritonserver(
"/tmp/examples/poc_ensemble", ensemble.graph.input_schema, batch, outputs, "executor_model"
Expand Down

0 comments on commit 46846ed

Please sign in to comment.