Hello,
We have around 750 million pair products in s3. We want to go through ML model for each pair and generate its matching score. We are using specialized EC2 instances with inferencia chips. Hence our model is precompiled to load into these type of machines alone. Now the question is
- Looked at cloud provider API, which creates EC2 clusters with scheduler and workers. Is it possible to configure scheduler to run in different type instances and specialized instances for workers?
- We would like to load the model into workers before any processing. Should I use workers command to load them?
- We are thinking to write Athena query using aws wrangler to get them as dataframe (around 5 million product pairs) iterators and feed them into a method that process each dataframe in sequentially. So, we will write code to fetch dataframe on the dask client and submit a dataframe to EC2 cluster. Is this right approach or any other better appraoch available? Now, client is holding responsible of holding logic to chuck and process them. Hence I need to maintain journal to keep track of submitting dataframes. I need to take care of client failure to restart client from the place where it left. Is it correct approach? What will happen if during one of dataframe processing, scheduler fails due to some network issue or so?
Please provide some insights to design this requirement.
@senthil-bungee Hi and welcome to Discourse! Thanks for following up here from this Stack Overflow question!
- Looked at cloud provider API, which creates EC2 clusters with scheduler and workers. Is it possible to configure scheduler to run in different type instances and specialized instances for workers?
Maybe @jacobtomlinson can help confirm?
- We would like to load the model into workers before any processing. Should I use workers command to load them?
- We are thinking to write Athena query using aws wrangler to get them as dataframe (around 5 million product pairs) iterators and feed them into a method that process each dataframe in sequentially. So, we will write code to fetch dataframe on the dask client and submit a dataframe to EC2 cluster. Is this right approach or any other better appraoch available? Now, client is holding responsible of holding logic to chuck and process them. Hence I need to maintain journal to keep track of submitting dataframes. I need to take care of client failure to restart client from the place where it left. Is it correct approach? What will happen if during one of dataframe processing, scheduler fails due to some network issue or so?
A minimal, reproducible (if possible) example might help here. For example, where is the model stored before loading? Even some sample functions to illustrate the workflow will help a lot.
It may also be worth opening new topics for both of these questions, to allow for better and more dedicated discussions.