Getty Images

Swiss retailer uses open source Ray tool to scale AI models

Ricardo uses Anyscale's Ray for scaling its product classification models. Ray helps enterprises scale their applications from a laptop to the cloud.

After more than 20 years in the retail business, Switzerland-based online marketplace Ricardo wanted to fix some of the problems its users had buying and selling items. Ultimately, Ricardo settled on a system based on the Ray open source Python framework developed by AI vendor Anyscale.

Like most such marketplaces, Ricardo previously used a category business model in which the items sellers listed for sale were placed under different categories. However, sometimes end users clicked on the wrong categories and were unable to find the items they wanted.

Also, since Switzerland has four official languages, sometimes customers were describing the product they wanted in a language that was different from what the website was picking up.

To solve these problems, Ricardo wanted to switch from grouping items into categories to grouping them into product types. The retailer wanted to use machine learning to detect the product type using the item's image and title.

Creating recommender models

First, the retailer used the data that it had to find more than 300 product types. Next, it had to create different recommender models, which assign attributes to each product type that will show up when customers type in a specific item they're looking for.

"It's much easier to build recommender models if you have this information of product types and attributes instead of categories, because it enables so much down the road," said Tobias Kaymak, senior data engineer at Ricardo.

It's much easier to build recommender models if you have this information of product types and attributes instead of categories, because it enables so much down the road.
Tobias KaymakSenior data engineer, Ricardo

To do this, the team at Ricardo wanted to use natural language processing to pull information from the titles of the products and use Google Vision AI to detect images.

The first machine learning model the company created was easy, Kaymak said. The real challenge came when the retailer had to create about 299 more machine learning models for the other product types.

"Doing this 300 times -- or deploying 300 microservices, and then thinking about the future and having more product types -- doesn't really scale," Kaymak said.

To fix this problem, the team started researching vendors that could help them perform this scale of work.

Fixing the problem of scale with Anyscale and Ray

Through his research, Kaymak came across an online video about Anyscale, a vendor that uses Ray to enable enterprises to run distributed computing projects.

distributed computing projects enable organizations to divide AI models and projects across different machines on the cloud.

Anyscale, founded in 2019 and based in San Francisco, helps enterprises speed up the production of their AI application on any cloud or at any scale. Ray enables developers to scale applications from a laptop to the cloud without the need for complex infrastructure, according to the vendor.

"At the end of the day, this is about enabling companies to succeed with AI by scaling their AI applications, productionizing their AI applications," without having to become experts in building or maintaining an AI infrastructure, Anyscale CEO Robert Nishihara said.

Tobias Kaymak, senior data engineer, RicardoTobias Kaymak

Intrigued by Ray and Anyscale, Kaymak contacted the vendor, and within three months, Ricardo was using the open source product in its Kubernetes cluster.

One aspect of Ray that appealed to Ricardo was that it is Open Source.

"We also prefer open source because in case something happens, open source usually gets support from other people as well," Kaymak said.

Although other vendors offer open source products that may not require enterprises to perform operations -- like Apache Kafka, an open source framework used to build real-time streaming data pipelines -- Anyscale Ray is a relatively new and fast-evolving tool that is driving the open source component forward, Kaymak added.

Also, Ricardo usually uses a FastAPI framework for its services. When Kaymak realized that the FastAPI framework is part of Ray, he recognized it as something he already knew works.

"I didn't see any other framework that was offering these components in the market," Kaymak said.

Ricardo was also one of Anyscale's first customers on Google Cloud Platform (GCP), although the vendor built its product on AWS, Kaymak said.

"Because we run everything in GCP, we wanted to stay on there. They were supportive with that, and that was quite a nice experience," he added.

Challenges and moving forward

Using Ray did not come without challenges, especially since the technology is new, Kaymak said.

One challenge was that Ricardo was one of the few customers using the tool on GCP that wanted to use GPU acceleration. Trying to work that out with Anyscale while being headquartered in a different time zone was hard, Kaymak said.

However, Ricardo is happy with using Ray, and the vendor has since offered to manage its cluster with Ray software as a service component, according to Kaymak.

After using Anyscale for about six months, Ricardo is now shifting toward building more models with the vendor. Ricardo started with an attribute detection model using Ray, but now it's building a model in which everything is encapsulated within Anyscale.

Ricardo also plans on using some of Ray's other features, such as its training mode and hyperparameter tuning service, because the retailer now has more than 700 product types.

"We started with the screwdriver; we found the screwdriver to be very powerful," Kaymak said. "Now, we also found the drilling machine, but there's tons of other stuff in the toolbox we could use that we haven't touched yet."

Anyscale charges customers based on usage, according to Nishihara.

Dig Deeper on Machine learning platforms

Business Analytics
Data Management