models icon indicating copy to clipboard operation
models copied to clipboard

"05-Retrieval-Model.ipynb" - how to feed multiple train files, and generate prediction in triton [QST]

Open lightsailpro opened this issue 3 years ago • 1 comments

❓ Questions & Help

Details

In this example - https://github.com/NVIDIA-Merlin/models/blob/main/examples/05-Retrieval-Model.ipynb, if I use "workflow.fit_transform(dataset).to_parquet(output_path="./processed/", shuffle=shuffle, out_files_per_proc=10)",to generate 10 train files to avoid OOM error, can I just simply call model.fit multiple times to feed all train files? e.g. model.fit(train0, validation_data=train1, batch_size=4096, epochs=3) model.fit(train1, validation_data=train2, batch_size=4096, epochs=3) ..........

Also, at the end of the example, the doc mentioned the inference using triton but without detail. The links listed are very generic, do you have the complete triton example code for generating prediction from the saved model in this example? Thanks for your help.

lightsailpro avatar Jun 27 '22 15:06 lightsailpro

@lightsailpro, thank you for your question! In the notebook, we define the train/valid dataset as follows:

train = Dataset(os.path.join(output_path, "train", "*.parquet"))

You can see that we used the pattern *.parquet to select all parquet files present in the specified output path (all 10 files in your case). So the train iterator already includes data from all files.

For the triton inference example, you can check this PoC that shows how to deploy a multi-stage recommender system.

I hope that answers your questions!

sararb avatar Jul 21 '22 19:07 sararb

@lightsailpro I am closing this issue since we did not hear from you, if you still have a question feel free to reopen this ticket or a new one.

rnyak avatar Sep 13 '22 21:09 rnyak