{"id":59526,"date":"2023-02-02T11:02:37","date_gmt":"2023-02-02T11:02:37","guid":{"rendered":"https:\/\/showbizztoday.com\/index.php\/2023\/02\/02\/unleashing-ml-innovation-at-spotify-with-ray\/"},"modified":"2023-02-02T11:02:37","modified_gmt":"2023-02-02T11:02:37","slug":"unleashing-ml-innovation-at-spotify-with-ray","status":"publish","type":"post","link":"https:\/\/showbizztoday.com\/index.php\/2023\/02\/02\/unleashing-ml-innovation-at-spotify-with-ray\/","title":{"rendered":"Unleashing ML Innovation at Spotify with Ray"},"content":{"rendered":"<p> [ad_1]<br \/>\n<\/p>\n<div>\n        <!-- post title --><\/p>\n<div class=\"posted-by\">\n            <img decoding=\"async\" src=\"https:\/\/engineering.atspotify.com\/wp-content\/themes\/theme-spotify\/images\/icon.png\" alt=\"\"\/><\/p>\n<p>&#13;<br \/>\n                <span class=\"date\">February 1, 2023<\/span>&#13;<br \/>\n                <span class=\"author\">&#13;<br \/>\n                    Published by Divita Vohra, Sr. Product Manager, Keshi Dai, Sr. ML Engineer, David Xia, Sr. ML Engineer, &amp; Praveen Ravichandran, Staff Research Scientist                 <\/span>&#13;\n            <\/p>\n<\/p><\/div>\n<p>        <!-- post details --><\/p>\n<div class=\"img-holder\">\n            <!-- post thumbnail --><\/p>\n<p>                                                <a href=\"https:\/\/engineering.atspotify.com\/2023\/02\/unleashing-ml-innovation-at-spotify-with-ray\/\" title=\"Unleashing ML Innovation at Spotify with Ray\" target=\"_blank\" rel=\"noopener\">&#13;<br \/>\n                        <img src=\"https:\/\/storage.googleapis.com\/production-eng\/1\/2023\/02\/Unleashing-ML-Innovation-Header.png\" class=\"attachment-post-thumbnail size-post-thumbnail wp-post-image\" alt=\"Unleashing ML innovation at Spotify.\" decoding=\"async\" srcset=\"https:\/\/storage.googleapis.com\/production-eng\/1\/2023\/02\/Unleashing-ML-Innovation-Header.png 1999w, https:\/\/storage.googleapis.com\/production-eng\/1\/2023\/02\/Unleashing-ML-Innovation-Header-250x123.png 250w, https:\/\/storage.googleapis.com\/production-eng\/1\/2023\/02\/Unleashing-ML-Innovation-Header-700x345.png 700w, https:\/\/storage.googleapis.com\/production-eng\/1\/2023\/02\/Unleashing-ML-Innovation-Header-768x378.png 768w, https:\/\/storage.googleapis.com\/production-eng\/1\/2023\/02\/Unleashing-ML-Innovation-Header-1536x756.png 1536w, https:\/\/storage.googleapis.com\/production-eng\/1\/2023\/02\/Unleashing-ML-Innovation-Header-120x59.png 120w\" sizes=\"(max-width: 1999px) 100vw, 1999px\"\/>                    <\/a><br \/>\n                        <!-- \/post thumbnail -->\n        <\/div>\n<p>        <!-- \/post title --><\/p>\n<p>As the sphere of machine studying (ML) continues to evolve and its impression on society and numerous points of our lives grows, it&#8217;s turning into more and more vital for practitioners and innovators to think about a broader vary of views when constructing ML fashions and functions. This want is driving the necessity for a extra versatile and scalable ML infrastructure.<\/p>\n<p>At Spotify, we strongly imagine in a various and collaborative strategy to constructing ML functions. Gone are the times when ML was the area of solely a small group of researchers and engineers. We need to democratize our ML efforts such that contributors of all backgrounds, together with engineers, knowledge scientists, and researchers, can leverage their distinctive views, abilities, and experience to additional ML at Spotify. As a consequence, we anticipate to see a rise in well-represented ML developments at Spotify within the coming years \u2014 and the suitable infrastructure will play a vital position in supporting this progress.<\/p>\n<p>Spotify based its machine studying (ML) platform in 2018 to offer a gold customary for dependable and accountable manufacturing ML. As an ML platform crew, we purpose to empower our customers to spend much less time sustaining bespoke ML infrastructure and extra time specializing in fixing enterprise issues by novel mannequin growth.\u00a0<\/p>\n<p>Our centralized infrastructure now serves over half of our inside ML practitioners and ML groups. Internal analysis has proven, nevertheless, that our platform instruments aren\u2019t at the moment completely fitted to all dimensions of ML practitioners. While nearly all of our ML engineers use our centralized tooling, fewer knowledge and analysis scientists do. We imagine fixing the next consumer wants may help <em>all<\/em><strong> <\/strong>dimensions of ML innovators at Spotify:<\/p>\n<ul>\n<li>Broadening manufacturing assist for ML frameworks past TensorFlow to assist novel ML options for Spotify\u00a0<\/li>\n<li>Providing a extra user-friendly manner for customers to entry GPU and distributed compute\u00a0<\/li>\n<li>Accelerating the consumer journey for ML analysis and prototyping\u00a0<\/li>\n<li>Providing options to productionize extra superior ML paradigms, reminiscent of reinforcement studying (RL) and graph neural networks (GNN) workflows<\/li>\n<\/ul>\n<h2>Spotify\u2019s ML infrastructure as we speak<\/h2>\n<p>Our objective for Spotify\u2019s ML Platform has all the time been to create a seamless consumer expertise for ML practitioners who need to take an ML software from growth to manufacturing. In early 2020, our <a href=\"https:\/\/engineering.atspotify.com\/2019\/12\/the-winding-road-to-better-machine-learning-infrastructure-through-tensorflow-extended-and-kubeflow\/\" target=\"_blank\" rel=\"noreferrer noopener\">ML Platform expanded<\/a> to cowl the ML manufacturing workflow for Spotify\u2019s ML practitioners with 4 core product choices:<\/p>\n<ul>\n<li><a href=\"https:\/\/engineering.atspotify.com\/2022\/01\/product-lessons-from-ml-home-spotifys-one-stop-shop-for-machine-learning\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>ML Home<\/strong><\/a><strong>,<\/strong> a spot the place ML engineers can retailer ML venture info and entry metadata associated to the ML software lifecycle<\/li>\n<li><strong>Jukebox,<\/strong> our answer for powering function engineering based mostly on TensorFlow Transform<\/li>\n<li><strong>Spotify Kubeflow,<\/strong> our managed model of the open-source Kubeflow Pipelines platform with TensorFlow Extended (TFX) because the ML workflow standardization<\/li>\n<li><strong>Salem,<\/strong> our customary for mannequin serving and on-device ML functions<\/li>\n<\/ul>\n<div class=\"wp-block-image is-style-default\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"321\" src=\"https:\/\/storage.googleapis.com\/production-eng\/1\/2023\/02\/Spotify-ML-Platform-700x321.png\" alt=\"Spotify's ML Platform\" class=\"wp-image-5693\" srcset=\"https:\/\/storage.googleapis.com\/production-eng\/1\/2023\/02\/Spotify-ML-Platform-700x321.png 700w, https:\/\/storage.googleapis.com\/production-eng\/1\/2023\/02\/Spotify-ML-Platform-250x115.png 250w, https:\/\/storage.googleapis.com\/production-eng\/1\/2023\/02\/Spotify-ML-Platform-768x353.png 768w, https:\/\/storage.googleapis.com\/production-eng\/1\/2023\/02\/Spotify-ML-Platform-1536x705.png 1536w, https:\/\/storage.googleapis.com\/production-eng\/1\/2023\/02\/Spotify-ML-Platform-120x55.png 120w, https:\/\/storage.googleapis.com\/production-eng\/1\/2023\/02\/Spotify-ML-Platform.png 1999w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\"\/><\/figure>\n<\/div>\n<h2>Lifecycle of an ML venture at Spotify\u00a0<\/h2>\n<p>ML at Spotify resembles a funnel. At the widest finish, we&#8217;ve a giant quantity of ML actions undertaken by knowledge and analysis scientists to rapidly show high-potential concepts. Their duties, instruments, and strategies are numerous and heterogeneous and tough to standardize \u2014 actually, it\u2019s suboptimal to standardize their strategies at this level within the lifecycle. As the funnel narrows and high-potential concepts show out, knowledge engineers and ML engineers take over. Standardizing their duties and instruments is an optimization each from a consumer expertise standpoint and from a enterprise perspective; ML engineers can spend much less time constructing redundant tooling, and our enterprise advantages from having confirmed, dependable, and progressive ML concepts launched to manufacturing sooner.<\/p>\n<p>We constructed our platform for ML engineers first as a result of their use circumstances and desires have been simpler to standardize. But that focus got here at a value: it meant much less flexibility for innovation on the earlier phases of the lifecycle.<\/p>\n<p>In 2022, our crew got down to refresh the two-to-three-year technique and imaginative and prescient for Spotify\u2019s ML Platform. A giant element of that technique was to raised serve the wants of innovators centered on the sooner phases of the ML lifecycle and allow a seamless transition from growth to manufacturing.<\/p>\n<h2>The subsequent evolution of Spotify\u2019s ML infrastructure\u00a0<\/h2>\n<p>At Spotify, ML practitioners all share the same ML consumer journey. They need to begin their ML initiatives by prototyping on their native machines or in a pocket book, and so they want entry to massive computing sources like dozens of CPUs or GPUs. They like to simply create and scale end-to-end ML workflows in Python, entry a various set of contemporary ML libraries, and seamlessly combine with the remainder of the Spotify engineering ecosystem with minimal code adjustments and infrastructure data.<\/p>\n<div class=\"wp-block-image is-style-default\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"375\" src=\"https:\/\/storage.googleapis.com\/production-eng\/1\/2023\/02\/Current-vs-future-ML-Infra-700x375.png\" alt=\"\" class=\"wp-image-5694\" srcset=\"https:\/\/storage.googleapis.com\/production-eng\/1\/2023\/02\/Current-vs-future-ML-Infra-700x375.png 700w, https:\/\/storage.googleapis.com\/production-eng\/1\/2023\/02\/Current-vs-future-ML-Infra-250x134.png 250w, https:\/\/storage.googleapis.com\/production-eng\/1\/2023\/02\/Current-vs-future-ML-Infra-768x411.png 768w, https:\/\/storage.googleapis.com\/production-eng\/1\/2023\/02\/Current-vs-future-ML-Infra-1536x822.png 1536w, https:\/\/storage.googleapis.com\/production-eng\/1\/2023\/02\/Current-vs-future-ML-Infra-120x64.png 120w, https:\/\/storage.googleapis.com\/production-eng\/1\/2023\/02\/Current-vs-future-ML-Infra.png 1999w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\"\/><figcaption class=\"wp-element-caption\"><em>The bigger ML practitioner umbrella at Spotify refers back to the following roles: analysis scientists, knowledge scientists, knowledge engineers, and ML engineers centered on ML-related duties.<\/em><\/figcaption><\/figure>\n<\/div>\n<p>To higher meet the wants of our customers and enhance productiveness throughout your complete ML lifecycle, we&#8217;d like versatile infrastructure that meets nearly all of our customers the place they already are. We want a platform that helps day-one Spotifiers really feel productive \u2014 no matter in the event that they\u2019re an information scientist in customer support testing concepts quick or an ML engineer on a complicated personalization crew focused on hardening manufacturing workflows. Our present platform expertise is closely weighted in direction of a single consumer journey: an ML engineer utilizing TensorFlow\/TFX for supervised studying manufacturing functions. To higher assist our goal market of a broader vary of constituents, we have to decrease the barrier to entry and embrace extra numerous ML tooling whereas sustaining scalability and efficiency in end-to-end ML workflows.<\/p>\n<h2>Introducing Ray<\/h2>\n<p>After in depth prototyping and investigation, we imagine Ray addresses these wants.<\/p>\n<p><a href=\"https:\/\/www.ray.io\/\" target=\"_blank\" rel=\"noreferrer noopener\">Ray<\/a> is an open-source, unified framework for scaling AI and Python functions. It\u2019s tailor-made for ML growth with its wealthy ML ecosystem integration. It simply scales compute-heavy workloads reminiscent of function preprocessing, deep studying, hyperparameter tuning, and batch predictions \u2014 all with minimal code adjustments. <a href=\"https:\/\/www.anyscale.com\/blog\/training-one-million-machine-learning-models-in-record-time-with-ray\" target=\"_blank\" rel=\"noreferrer noopener\">Ray is extensively adopted throughout the ML trade<\/a>. OpenAI cofounder and CTO Greg Brockman <a href=\"https:\/\/www.youtube.com\/watch?v=CqiL5QQnN64&amp;t=510s\" target=\"_blank\" rel=\"noreferrer noopener\">stated at Ray Summit 2022<\/a>, \u201cWe\u2019re using [Ray] to train our largest models. So it has been very, very helpful for us in terms of just being able to scale up to a pretty unprecedented scale and to not go crazy.\u201d With Ray, ML builders now not must utterly change their code and framework of selection to realize scale for manufacturing functions, easing the transition from native growth to a distributed computing surroundings.<\/p>\n<h2>Incorporating Ray into the Spotify ecosystem\u00a0<\/h2>\n<p>We constructed a centralized Spotify-Ray platform as a result of we would like our ML practitioners to resolve ML issues and never need to commit their time to managing Ray or underlying infrastructure. The platform consists of server-side infrastructure, client-side SDK and CLI, and integrations with the remainder of the Spotify ecosystem. We designed it to cater to the wants of all forms of ML practitioners, not solely ML engineers. We optimized for accessibility, flexibility, availability, and efficiency.<\/p>\n<div class=\"wp-block-image is-style-default\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1999\" height=\"1573\" src=\"https:\/\/storage.googleapis.com\/production-eng\/1\/2023\/02\/Initial-Architecture-Spotify-Ray.png\" alt=\"\" class=\"wp-image-5696\" srcset=\"https:\/\/storage.googleapis.com\/production-eng\/1\/2023\/02\/Initial-Architecture-Spotify-Ray.png 1999w, https:\/\/storage.googleapis.com\/production-eng\/1\/2023\/02\/Initial-Architecture-Spotify-Ray-250x197.png 250w, https:\/\/storage.googleapis.com\/production-eng\/1\/2023\/02\/Initial-Architecture-Spotify-Ray-700x551.png 700w, https:\/\/storage.googleapis.com\/production-eng\/1\/2023\/02\/Initial-Architecture-Spotify-Ray-768x604.png 768w, https:\/\/storage.googleapis.com\/production-eng\/1\/2023\/02\/Initial-Architecture-Spotify-Ray-1536x1209.png 1536w, https:\/\/storage.googleapis.com\/production-eng\/1\/2023\/02\/Initial-Architecture-Spotify-Ray-120x94.png 120w\" sizes=\"auto, (max-width: 1999px) 100vw, 1999px\"\/><figcaption class=\"wp-element-caption\"><em>The preliminary structure design of Spotify\u2019s managed Ray platform. Spotify-Ray empowers novel ML options through streamlined acceleration of myriad fashionable ML libraries, utilizing ML Platform\u2019s centralized managed infrastructure as a basis.<\/em><\/figcaption><\/figure>\n<\/div>\n<h3>Accessibility<\/h3>\n<p>We wished customers to have an incredible onboarding expertise with a gradual studying curve. We optimized for <a href=\"https:\/\/en.wikipedia.org\/wiki\/Progressive_disclosure\" target=\"_blank\" rel=\"noreferrer noopener\">progressive disclosure<\/a> of complexity, offering wise defaults for frequent use circumstances and versatile abstractions over underlying Ray and Kubernetes complexity that accommodate each new customers and \u201cpower users\u201d alike. This lets ML practitioners deal with their enterprise logic immediately. With a single CLI command, customers can create their very own Ray cluster with preinstalled ML instruments, ready-to-run pocket book tutorials, <a href=\"https:\/\/code.visualstudio.com\" target=\"_blank\" rel=\"noreferrer noopener\">VS Code<\/a> server for in-browser enhancing, and SSH entry.<\/p>\n<pre class=\"wp-block-code has-black-color has-text-color has-background\" style=\"background-color:#d9dcde\"><code>$ sp-ray create cluster my-cluster \n -n ray-playground \n    --with-tutorials \n    --vscode-server \n    --gpus-per-worker 1\n\nCreated cluster my-cluster in namespace ray-playground\nUploaded tutorial notebooks\nsp-ray model          0.3.0\nserver ray model      2.2.0\nserver python model   3.8.13\nservice account         ...\nhead IP                 1.2.3.4\nserver                  ray:\/\/1.2.3.4:10001\ndashboard               http:\/\/1.2.3.4:8265\npocket book server         http:\/\/1.2.3.4:8081\nOpenVSCode server       http:\/\/1.2.3.4:3000\nstaff                 1\n\nhead group\n  replicas              1\n  CPUs                  15\n  GPUs                  0\n  reminiscence                48Gi\n\nemployee teams\n  employee\n    replicas            1\n    CPUs                15\n    GPUs                1\n    GPU kind            t4\n    reminiscence              48Gi\n<\/code><\/pre>\n<p>Users can checklist, describe, scale, customise, and delete Ray clusters too.<\/p>\n<pre class=\"wp-block-code has-black-color has-text-color has-background\" style=\"background-color:#d9dcde\"><code>\n$ sp-ray get cluster -n ray-playground\nNAME                      CREATED                 WORKERS\nmy-cluster        2 seconds in the past     1\n\n# present helpful, human-readable cluster data\n$ sp-ray describe cluster -n ray-playground my-cluster\nsp-ray model          0.3.0\nserver ray model      2.2.0\nserver python model   3.8.13\nservice account         ...\nhead IP                 1.2.3.4\nserver                  ray:\/\/1.2.3.4:10001\ndashboard               http:\/\/1.2.3.4:8265\npocket book server         http:\/\/1.2.3.4:8081\nOpenVSCode server       http:\/\/1.2.3.4:3000\nstaff                 1\n\nhead group\n  replicas              1\n  CPUs                  15\n  GPUs                  0\n  reminiscence                48Gi\n\nemployee teams\n  employee\n    replicas            1\n    CPUs                15\n    GPUs                1\n    GPU kind            t4\n    reminiscence              48Gi\n\n# simple to customise primary choices\n$ sp-ray create cluster my-cluster \n    --cpus-in-head 4 \n    --memory-in-head 10Gi \n    --gpus-per-worker 1 \n    --worker-gpu-type a100\n\n# scale employee teams\n$ sp-ray scale cluster -n ray-playground my-cluster \n    --worker-group group1 --replicas N\n\n# permit K8s YAML for superior config like a number of employee teams\n$ sp-ray create cluster -n ray-playground my-cluster \n    --file ray-cluster.yaml\n\n$ sp-ray delete cluster -n ray-playground my-cluster<\/code><\/pre>\n<p>Under the hood, we use <a href=\"https:\/\/cloud.google.com\/kubernetes-engine\" target=\"_blank\" rel=\"noreferrer noopener\">Google Kubernetes Engine<\/a> (GKE) and the open-source <a href=\"https:\/\/github.com\/ray-project\/kuberay\" target=\"_blank\" rel=\"noreferrer noopener\">KubeRay<\/a> operator. Our CLI creates a customized Kubernetes Ray cluster useful resource that tells KubeRay to create a brand new Ray cluster. Users begin with a shared, playground namespace to study and experiment with minimal setup. Once they\u2019re prepared, they create their namespace. Our multi-tenancy crew administration course of grants permissions, configures sources, and manages contributors. It generates all Kubernetes sources based mostly on a crew configuration file and deploys them to the cluster to arrange the namespace.<\/p>\n<figure class=\"wp-block-image size-full is-style-default\"><img loading=\"lazy\" decoding=\"async\" width=\"1999\" height=\"1967\" src=\"https:\/\/storage.googleapis.com\/production-eng\/1\/2023\/02\/Computational-GKE-Instance-1.png\" alt=\"\" class=\"wp-image-5697\" srcset=\"https:\/\/storage.googleapis.com\/production-eng\/1\/2023\/02\/Computational-GKE-Instance-1.png 1999w, https:\/\/storage.googleapis.com\/production-eng\/1\/2023\/02\/Computational-GKE-Instance-1-250x246.png 250w, https:\/\/storage.googleapis.com\/production-eng\/1\/2023\/02\/Computational-GKE-Instance-1-700x689.png 700w, https:\/\/storage.googleapis.com\/production-eng\/1\/2023\/02\/Computational-GKE-Instance-1-768x756.png 768w, https:\/\/storage.googleapis.com\/production-eng\/1\/2023\/02\/Computational-GKE-Instance-1-1536x1511.png 1536w, https:\/\/storage.googleapis.com\/production-eng\/1\/2023\/02\/Computational-GKE-Instance-1-120x118.png 120w\" sizes=\"auto, (max-width: 1999px) 100vw, 1999px\"\/><\/figure>\n<p>In addition to the CLI, we created a Python SDK with equal options. The SDK lets customers programmatically handle their Ray clusters.<\/p>\n<pre class=\"wp-block-code has-black-color has-text-color has-background\" style=\"background-color:#d9dcde\"><code>import time\nfrom datetime import datetime\nfrom typing import Final\n\nfrom spotify_ray.logger import LOGGER\nfrom spotify_ray.fashions.ray_cluster import RayCluster\n\nCLUSTER_NAME: Final[str] = f\"sp-ray-test-{datetime.now().strftime('%Y-%m-%d-%H-%M-%S')}\"\nNAMESPACE: Final[str] = \"hyperkube\"\nNUM_WORKERS: Final[int] = 1\n\n\ndef foremost():\n    # Create new cluster\n    cluster = RayCluster.create_cluster(\n        identify=CLUSTER_NAME,\n        namespace=NAMESPACE,\n        cpus_in_head=1,\n        memory_in_head=\"2Gi\",\n        cpus_per_worker=1,\n        memory_per_worker=\"2Gi\",\n        worker_replicas=NUM_WORKERS,\n        await_ready=True,  # makes the operate block till cluster is prepared\n    )\n\n    LOGGER.data(f\"Cluster head IP: ${cluster.head_ip}\")\n    LOGGER.data(\"Cluster has ${cluster.num_workers} staff\")\n\n    cluster.scale_worker_group(worker_group=\"employee\", replicas=2)\n\n    time.sleep(60)\n\n    # Get an current cluster\n    cluster = RayCluster.get_cluster(identify=CLUSTER_NAME, namespace=NAMESPACE)\n\n    cluster.delete()\n\n\nif __name__ == \"__main__\":\n    foremost()<\/code><\/pre>\n<h3>Flexibility<\/h3>\n<p>Users can simply make use of state-of-the-art ML libraries and choose computing sources to assist their workloads for analysis and prototyping. As a results of utilizing Ray, our platform helps all the main ML frameworks like PyTorch, TensorFlow, and XGBoost. Computing useful resource configuration is abstracted in a unified and user-friendly manner. If customers don\u2019t need the default computing sources, they will simply customise them. For instance, they will request a particular kind and variety of GPUs.<\/p>\n<h3>Availability<\/h3>\n<p>We construct on prime of managed GKE\u2019s availability as an alternative of managing Kubernetes clusters ourselves. We isolate workloads by giving every Ray employee its personal GKE node, and we isolate groups by giving every their very own Kubernetes namespace.<\/p>\n<h3>Performance<\/h3>\n<p>We leverage GKE\u2019s <a href=\"https:\/\/cloud.google.com\/blog\/products\/containers-kubernetes\/introducing-container-image-streaming-in-gke\" target=\"_blank\" rel=\"noreferrer noopener\">picture streaming<\/a> function to hurry up picture pulls. We\u2019ve decreased the time it takes to drag massive GPU-based container photographs from a number of minutes to only a few seconds.<\/p>\n<h3>A Ray-based path to manufacturing<\/h3>\n<p>In the identify of constructing a minimal viable model of Spotify-Ray, we selected to prioritize early-stage prototyping and experimentation \u2014 the \u201cmouth\u201d of the <a href=\"https:\/\/docs.google.com\/document\/d\/1SKB-EWMpGU5UshRzIDPXKLSJurofrsM6xyBmWK1FVc0\/edit#heading=h.ox6rhtav0rij\" target=\"_blank\" rel=\"noreferrer noopener\">funnel<\/a>, in different phrases. However, we see promise in Ray because the spine of a strong path to manufacturing for ML practitioners at Spotify. With Spotify-Ray\u2019s native <a href=\"https:\/\/engineering.atspotify.com\/2022\/03\/why-we-switched-our-data-orchestration-service\/\" target=\"_blank\" rel=\"noreferrer noopener\">Flyte<\/a> integration and high-level APIs within the works to streamline and speed up canonical MLOps duties, e.g., knowledge loading, artifact logging, experiment monitoring, and pipeline orchestration, we imagine Ray can considerably shorten the time-to-production for ML functions at Spotify. We\u2019re excited to work along with our inside ML practitioners to realize this imaginative and prescient.\u00a0\u00a0<\/p>\n<div class=\"wp-block-image is-style-default\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"441\" src=\"https:\/\/storage.googleapis.com\/production-eng\/1\/2023\/02\/Problems-Solutions-Spotify-Ray-700x441.png\" alt=\"\" class=\"wp-image-5698\" srcset=\"https:\/\/storage.googleapis.com\/production-eng\/1\/2023\/02\/Problems-Solutions-Spotify-Ray-700x441.png 700w, https:\/\/storage.googleapis.com\/production-eng\/1\/2023\/02\/Problems-Solutions-Spotify-Ray-250x157.png 250w, https:\/\/storage.googleapis.com\/production-eng\/1\/2023\/02\/Problems-Solutions-Spotify-Ray-768x484.png 768w, https:\/\/storage.googleapis.com\/production-eng\/1\/2023\/02\/Problems-Solutions-Spotify-Ray-1536x967.png 1536w, https:\/\/storage.googleapis.com\/production-eng\/1\/2023\/02\/Problems-Solutions-Spotify-Ray-120x76.png 120w, https:\/\/storage.googleapis.com\/production-eng\/1\/2023\/02\/Problems-Solutions-Spotify-Ray.png 1999w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\"\/><figcaption class=\"wp-element-caption\"><em>A abstract of how Ray addresses Spotify ML practitioner wants.<\/em><\/figcaption><\/figure>\n<\/div>\n<h2>Use case: Graph studying for content material suggestions<\/h2>\n<p>In a current analysis venture, <a href=\"https:\/\/research.atspotify.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">Spotify\u2019s Tech Research<\/a> crew, a beforehand underinvested ML Platform finish consumer, experimented with utilizing graph studying applied sciences for suggestions. Unlike previous analysis initiatives which are sometimes prototyped with advert hoc tooling after which applied for manufacturing situations, the graph studying implementation wanted to be production-ready to rapidly assess GNN for Spotify\u2019s enterprise use circumstances. Our ML researchers wanted infrastructure that was versatile and straightforward to productionize rapidly. This prompted Tech Research to make use of graph studying on Spotify-Ray to generate content material suggestions.\u00a0<\/p>\n<p>Following promising offline outcomes on inside datasets, the Tech Research crew ran an A\/B take a look at to know how <a href=\"https:\/\/www.youtube.com\/watch?v=79MRwEB5AhA&amp;list=PLqYw1C4YGfr0byz1XMD95YMDR-so4qy1e&amp;index=8\" target=\"_blank\" rel=\"noreferrer noopener\">GNN-based algorithms<\/a> modified our house web page\u2019s \u201cShows you might like\u201d suggestions. Conducting these A\/B checks was difficult because the GNN workflows are completely different from typical ML workflows. Tech Research adopted Spotify-Ray for his or her infrastructural wants to beat these challenges and applied a set of parts to coach and deploy GNN fashions at scale.<\/p>\n<ul>\n<li><em>Data creation (graph development)\u00a0<\/em><br \/>Constructing graphs for real-world functions is an iterative course of and requires instruments that may simply remodel massive quantities of information with easy Python capabilities. We leveraged Ray Datasets to create the graph from our knowledge warehouse. Ray Datasets present versatile APIs to carry out frequent transformations reminiscent of mapping on distributed knowledge.<\/li>\n<\/ul>\n<ul>\n<li><em>Feature preprocessing <br \/><\/em>The graph constructed within the earlier step consisted of nodes and edges together with corresponding options. We leveraged Ray <a href=\"https:\/\/docs.ray.io\/en\/latest\/ray-air\/getting-started.html\" target=\"_blank\" rel=\"noopener\">AIR<\/a>\u2019s default preprocessors and prolonged their base API to carry out function transformations reminiscent of standardization, categorical transforms, bucketing, and so on.\u00a0<\/li>\n<li><em>Graph studying \u00a0 <br \/><\/em>We feed the graph and preprocessed options right into a graph studying algorithm applied in <a href=\"https:\/\/pyg.org\/\" target=\"_blank\" rel=\"noopener\">PyG<\/a>. Ray trainers simply prolong to completely different ML frameworks like PyG and permit us to seamlessly distribute our coaching.\u00a0<\/li>\n<li><em>Inference at scale and analysis<\/em><em><br \/><\/em>Finally, we applied customized predictors for batch prediction and evaluators utilizing Ray Datasets.\u00a0<\/li>\n<\/ul>\n<p>Using the above parts, this crew constructed an end-to-end pipeline for producing present suggestions utilizing GNN-based fashions and efficiently launched an A\/B take a look at <em>in lower than three months<\/em><strong><em>, <\/em><\/strong>a feat that was extraordinarily difficult for Tech Research up to now given the prior supported ML infrastructure. The A\/B take a look at resulted in important metric enhancements and improved consumer expertise on our house web page\u2019s \u201cShows you might like.\u201d\u00a0<\/p>\n<p>Spotify\u2019s ML practitioners\u2019 demand for PyTorch has grown significantly, notably for rising use circumstances within the NLP and GNN areas. We plan to make use of Ray to assist and scale PyTorch to fulfill this rising demand and assist our numerous customers really feel productive, irrespective of their position on the crew.<\/p>\n<p>While bringing in a brand new framework carries the chance of fragmentation, with higher foundational constructing blocks in place, we will work towards making a extra versatile, consultant, and accountable ML platform expertise that comprehensively unleashes ML innovation at Spotify.\u00a0<\/p>\n<p>Our work bringing Ray into the Spotify ecosystem wouldn&#8217;t have been doable with out the implausible work of the ML Workflows crew at Spotify, our teammates from ML Platform, and beneficiant collaboration with the Anyscale crew. Thank you to the people whose work made unleashing ML innovation at Spotify doable: Jonathan Jin, Mike Seid, Joshua Baer, Richard Liaw, Dmitri Gekhtman, Abdullah Mobeen, Maria Cipollone, Olga Ianiuk, Sara Leary, Grace Glenn, Omar Delarosa, Maisha Lopa, Shawn Lin, Andrew Martin, and <a href=\"https:\/\/www.union.ai\/\" target=\"_blank\" rel=\"noreferrer noopener\">Union.ai<\/a> for his or her assist on <a href=\"https:\/\/docs.flyte.org\/projects\/cookbook\/en\/stable\/auto\/integrations\/kubernetes\/ray_example\/index.html\" target=\"_blank\" rel=\"noreferrer noopener\">Flyte integration<\/a>.\u00a0<\/p>\n<p><em>PyTorch, the PyTorch brand, and any associated marks are emblems of The Linux Foundation.<\/em><\/p>\n<p><em>TensorFlow, the TensorFlow brand, and any associated marks are emblems of Google Inc.<\/em><\/p>\n<p><\/p>\n<p>        Tags: <a href=\"https:\/\/engineering.atspotify.com\/tag\/machine-learning\/\" rel=\"tag noopener\" target=\"_blank\">machine studying<\/a><br \/> \n            <\/div>\n<p><script async defer crossorigin=\"anonymous\"\n    src=\"https:\/\/connect.facebook.net\/en_US\/sdk.js#xfbml=1&#038;autoLogAppEvents=1&#038;version=v7.0&#038;appId=256751791017051\">\n<\/script><br \/>\n<br \/>[ad_2]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>[ad_1] &#13; February 1, 2023&#13; &#13; Published by Divita Vohra, Sr. Product Manager, Keshi Dai, Sr. ML Engineer, David Xia, Sr. ML Engineer, &amp; Praveen Ravichandran, Staff Research Scientist &#13; &#13; As the sphere of machine studying (ML) continues to evolve and its impression on society and numerous points of our lives grows, it&#8217;s turning [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":59528,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[38],"tags":[],"class_list":{"0":"post-59526","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-spotify"},"_links":{"self":[{"href":"https:\/\/showbizztoday.com\/index.php\/wp-json\/wp\/v2\/posts\/59526","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/showbizztoday.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/showbizztoday.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/showbizztoday.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/showbizztoday.com\/index.php\/wp-json\/wp\/v2\/comments?post=59526"}],"version-history":[{"count":0,"href":"https:\/\/showbizztoday.com\/index.php\/wp-json\/wp\/v2\/posts\/59526\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/showbizztoday.com\/index.php\/wp-json\/wp\/v2\/media\/59528"}],"wp:attachment":[{"href":"https:\/\/showbizztoday.com\/index.php\/wp-json\/wp\/v2\/media?parent=59526"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/showbizztoday.com\/index.php\/wp-json\/wp\/v2\/categories?post=59526"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/showbizztoday.com\/index.php\/wp-json\/wp\/v2\/tags?post=59526"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}