<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Chiara Varini on Medium]]></title>
        <description><![CDATA[Stories by Chiara Varini on Medium]]></description>
        <link>https://medium.com/@c.varini?source=rss-95afa32fd6d2------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*0gy8oxSNlNcDii5gMFcQsQ.jpeg</url>
            <title>Stories by Chiara Varini on Medium</title>
            <link>https://medium.com/@c.varini?source=rss-95afa32fd6d2------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 15:07:20 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@c.varini/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Accelerated data analysis with RAPIDS]]></title>
            <link>https://medium.com/data-reply-it-datatech/accelerated-data-analysis-with-rapids-4d4697c8ddea?source=rss-95afa32fd6d2------2</link>
            <guid isPermaLink="false">https://medium.com/p/4d4697c8ddea</guid>
            <category><![CDATA[cudf]]></category>
            <category><![CDATA[rapid]]></category>
            <category><![CDATA[pandas]]></category>
            <category><![CDATA[dask]]></category>
            <category><![CDATA[data-analysis]]></category>
            <dc:creator><![CDATA[Chiara Varini]]></dc:creator>
            <pubDate>Thu, 14 Sep 2023 09:16:27 GMT</pubDate>
            <atom:updated>2023-09-14T09:16:27.632Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>Handling and transforming data have long been fundamental practices of most of ITC systems used by great industries delivering goods or services at scale. As time went by, however, the huge amount of data to analyze, clean and organize has increased a lot, coming to applications that use huge datasets (often several terabytes in scale). One of the main requirements about these apps is the possibility of transparently scaling as the number of data increases, and that leads to the need for more performance power.</p><p>In these scenarios, one of the best approaches to pursue is using specific hardware, such as GPUs (Graphic Processing Unit), assigning the compute-intensive parts to them, so that elaboration times can be reduced.</p><p>In 2018, NVIDIA and others (IBM, Anaconda, Oracle e Databricks) has presented RAPIDS: the aim of this product is to simplify and expand the usage of GPUs as integral part of the process that deals with data. In virtue of this, NVIDIA aims to carry on the so-called “GP-GPU” (general processing on a graphics processing unit), a very popular way to speed up code that relies heavily on matrix and huge dataset manipulations. The developers are offered an open-source software suite of libraries and APIs: thanks to parallel computing, this suite can be used to speed up the most part of the end-to-end data science and analytics pipelines.</p><p>Other frameworks like Modin and Vaex can be used to optimize the handling of DataFrame, but we won’t focus on them here.</p><p>This article wants to demonstrate how the advantages of using RAPIDS can effectively be found even in case of small datasets, if compared with Pandas and Dask: this is the proof that RAPIDS can be used since the beginning of the development, without waiting for big datasets, but just having an available NVIDIA GPU of course.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/630/1*DMJuHkjzmRNqx3-MP6npcg.gif" /><figcaption>Photo provided by <a href="https://www.smartworld.it/tecnologia/test-la-tecnologia-resizable-bar-nvidia-promette-un-maggiore-frame-rate.html">NVIDIA</a></figcaption></figure><h3>Technologies Overview</h3><p><strong>RAPIDS</strong></p><p>RAPIDS comes as a suite of open-source libraries and APIs, used to speed Python data science workloads up, by running them on GPUs rather than CPUs. RAPIDS exploits NVIDIA CUDA primitives for low-level compute optimization and exposing GPU parallelism and high-bandwidth memory speed through user-friendly Python interfaces. In this way, massively speed-up, drop-in replacements for the most popular Python data science libraries, such as Pandas (cuDF), Scikit-Learn (cuML) and NetworkX (cuGraph), are offered to the user. In addition, RAPIDS also supports multi-node, multi-GPU deployments, enabling vastly accelerated processing and training on much larger dataset sizes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/840/1*J--TtF7CDPp1tM4rtWj4Iw.png" /><figcaption>Photo provided by <a href="https://www.enterpriseai.news/2018/10/10/nvidia-platform-pushes-gpus-into-machine-learning-high-performance-data-analytics/">RAPIDS</a></figcaption></figure><p>Released with Apace 2.0 license, RAPIDS comes as the result of the work of an increasing community and the GPU Open Analytics Initiative (GOAI) partners, with a significant contribution by these latter in creating the first version of GPU DataFrame based on Apache Arrow data structures. The GPU DataFrame enabled the integration of GPU-accelerated data processing and machine learning libraries without incurring typical serialization and deserialization penalties and it allows to optimize the DataFrame memory occupation.</p><p>The main features of RAPIDS are:</p><ul><li><strong>Hassle-Free Integration:</strong> Accelerate your Python data science toolchain with minimal code changes and no new tools to learn.</li><li><strong>Reduced Training Time:</strong> Drastically improve your productivity with near-interactive data science.</li><li><strong>Top Model Accuracy:</strong> Increase machine learning model accuracy by iterating on models faster and deploying them more frequently.</li><li><strong>Open Source:</strong> Customizable, extensible, interoperable — the open-source software is supported by NVIDIA and built on Apache Arrow.</li></ul><p>In order to accelerate your data exploration: understanding the dataset, cleaning and manipulating data types and formats, filling in gaps in the data, and engineering features, the best choice seems to be cuDF.</p><p>cuDF provides a Pandas-like API, built on Apache Arrow (columnar memory format) to overcome certain limits that currently don’t make it usable in case of big datasets (i.e. handling the memory representation, missing data, dataframe concatenation …)</p><p>With all of this in mind, the main goal is providing an API that data engineers &amp; data scientists can be familiar with, so they can use it to easily accelerate their workflows without deepening into the details of CUDA programming. However, the main difference in terms of low-level representation, has inevitably led to slight differences between cuDF and Pandas (i.e. iteration and handling objects and data types and more).</p><p>The evolution of RAPIDS in these last years has now reached version 23.08.</p><p><strong>DASK</strong></p><p>Dask is a framework to handle the scalability of the main Python data analytics libraries as NumPy, Pandas, and Scikit-Learn, by exploiting the multi-core parallelization on distributed clusters when datasets exceed memory.</p><p>As opposed to cuDF, Dask uses Pandas as a black box: it doesn’t solve its performance and memory issues but is limited to executing parallel operations on DataFrame partitions, spreading them out across multiple processes and being careful to not work with too large pieces of data all at once, which can result in an unpleasant MemoryError.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*QXz64w4bR9w3-rRi.png" /><figcaption>Photo provided by <a href="https://www.javatpoint.com/dask-python">Dask</a></figcaption></figure><p>Dask and RAPIDS play nicely together via an integration provided by RAPIDS called Dask-cuDF, precisely because they aim to two different solutions for Pandas. Dask-cuDF extends Dask where necessary to allow its DataFrame partitions to be processed using cuDF GPU DataFrames instead of Pandas DataFrames. For instance, when you call dask_cudf.read_csv(…), your cluster’s GPUs do the work of parsing the CSV file(s) by calling cudf.read_csv().</p><p>So, basically, Dask appears to be very useful when it comes to parallelizing compute clusters, while RAPIDS does that on NVIDIA graphics cards: if a compute cluster of NVIDIA GPUs is available, using them both would be the best option. In other words, if your workflow is fast enough on a single GPU or your data comfortably fits in memory on a single GPU, you would want to use cuDF, but if you want to distribute your workflow across multiple GPUs, have more data than you can fit in memory on a single one, or want to analyze data spread across many files at once, you would want to use Dask-cuDF.</p><p>In this work, using Dask-cuDF has not been considered, because our aim is to demonstrate the utility of RAPIDS, mainly cuDF, even on DataFrame that are not that big, so that the performances would result in being like them of cuDF. We decided to compare the results differences between Dask and Pandas instead, due to the different approaches with RAPIDS.</p><h3>Tests</h3><p>This test has the dual function:</p><ol><li>show the potential of cuDF as compared to Pandas and Dask, even on small dataset.</li><li>highlight that the APIs provided by cuDF are completely similar to those of Pandas.</li></ol><p>The test is spilt into 2 parts: in the first one the reading of the data happens and each .csv file is saved in 3 different data structures once being read:</p><ul><li><strong>df</strong>: Pandas DataFrame</li><li><strong>cdf</strong>: cuDF DataFrame</li><li><strong>ddf</strong>: Dask DataFrame</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oxe9gQ-hnzDSLgTHDm5Aig.png" /></figure><p>In the second part of the test, simple but relevant operations are carried out on every dataset, such as:</p><ul><li><strong>Mean: </strong>performed on every not object column</li><li><strong>Sort</strong>: performed on int64 <em>duration</em> column</li><li><strong>Merge</strong>: performed on float64 <em>lat</em> column</li><li><strong>Filter</strong>: performed on object <em>name</em> column</li><li><strong>All</strong>: all-embracing test, incorporating all the above-mentioned operations</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aG21ZGMMi2zdpQOqGbrOKQ.png" /></figure><p>Test notes:</p><ul><li><em>Timer</em> is a proper class to measure computing time</li><li>Only a single partition has been used to Dask, because this has been the most proficient</li><li>The average data of 50 measurements has been considered for each operation</li><li>The test has been carried out on 3 dataset containing different types of data (int64, float64, object and Boolean)</li><li>The dimensions of the dataset above are respectively 1, 10 and 100 MB</li><li>Tests have been conducted using a GE66-Raider-11UG PC mounting:<br>- 16 x 11th Gen Intel® Core™ i7–11800H @ 2.30GHz<br>- 1 x NVIDIA GeForce RTX 3070 Laptop GPU<br>- Ubuntu 22.04.3 LTS Operating System</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/840/1*ZZhNR_ahHHmXWnN6pXN_zQ.png" /></figure><p>Box plot and speedup tables are shown below: they show that, even though we didn’t obtain surprising results in terms of speed up, RAPIDS offers a good choice starting with dataset of 1 MB. As the dimensions of the dataset increase, the speed up increases too, in comparison to Pandas and Dask, in particular 46x and 48x respectively.</p><h3>Results</h3><p><strong>1MB Dataset</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oiCok9MHhuwBe9ksALwJVA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rNCisAhPg8cE-DbI_VFVaQ.png" /></figure><p><strong>10MB Dataset</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OVIwIz0DHjWpIigNLA5wVw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HttGWxg-d7vZC35salgt5A.png" /></figure><p><strong>100MB Dataset</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lMl5iVTMhK2HvkbEEYgndA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ugR87TXPQvdKoxWuIzCP_A.png" /></figure><h3>Conclusion</h3><p>What has been done is an overview of some possible frameworks to use in the case of not so numerous datasets (some MB), in order to overcome the objective limits of Python and, in particular, of Pandas by optimizing the memory consumption and reducing the computing time.</p><p>CuDF, one the libraries offered by RAPIDS, has shown a 46x speedup even on not such big dataset (100MB) when compared to Pandas, but without any significant changes in terms of code.</p><p>So, swapping Pandas with a RAPIDS framework like cuDF, can help to speed up data analytics workflows, making the analysis process more effective and enjoyable. Additionally, RAPIDS libraries make it easy to chart all kinds of data–like time series, geospatial, and graphs–by using simple Python code.</p><p>Again, the idea is that speeding up increases significantly as the dataset size increases: additional benefits can be obtained by using Dask-cuDF in case a compute cluster of NVIDIA GPUs is available.</p><p>Integrations with other ETL technologies (like Spark) are currently being tested in addition to Dask, so further amazing results are expected.</p><h3>References</h3><ol><li><a href="https://medium.com/plotly/plotly-and-nvidia-partner-to-integrate-dash-and-rapids-8a8c53cd7daf">https://medium.com/plotly/plotly-and-nvidia-partner-to-integrate-dash-and-rapids-8a8c53cd7daf</a></li><li><a href="https://developer.nvidia.com/blog/accelerating-etl-for-recsys-on-gpus-with-nvtabular/">https://developer.nvidia.com/blog/accelerating-etl-for-recsys-on-gpus-with-nvtabular/</a></li><li><a href="https://nvidianews.nvidia.com/news/nvidia-introduces-rapids-open-source-gpu-acceleration-platform-for-large-scale-data-analytics-and-machine-learning">https://nvidianews.nvidia.com/news/nvidia-introduces-rapids-open-source-gpu-acceleration-platform-for-large-scale-data-analytics-and-machine-learning</a></li><li><a href="https://rapids.ai/learn-more/#about">https://rapids.ai/learn-more/#about</a></li><li><a href="https://towardsdatascience.com/scaling-pandas-comparing-dask-ray-modin-vaex-and-rapids-c74c85a4e59c">https://towardsdatascience.com/scaling-pandas-comparing-dask-ray-modin-vaex-and-rapids-c74c85a4e59c</a></li><li><a href="https://medium.com/plotly/plotly-and-nvidia-partner-to-integrate-dash-and-rapids-8a8c53cd7daf">https://medium.com/plotly/plotly-and-nvidia-partner-to-integrate-dash-and-rapids-8a8c53cd7daf</a></li><li><a href="https://insaid.medium.com/introduction-to-rapids-nvidia-603f841fc178">https://insaid.medium.com/introduction-to-rapids-nvidia-603f841fc178</a></li><li><a href="https://arrow.apache.org/">https://arrow.apache.org/</a></li><li><a href="https://developer.nvidia.com/blog/gpu-accelerated-analytics-rapids/">https://developer.nvidia.com/blog/gpu-accelerated-analytics-rapids/</a></li><li><a href="https://insaid.medium.com/introduction-to-rapids-nvidia-603f841fc178">https://insaid.medium.com/introduction-to-rapids-nvidia-603f841fc178</a></li><li><a href="https://docs.rapids.ai/api/cudf/stable/">https://docs.rapids.ai/api/cudf/stable/</a></li><li><a href="https://wesmckinney.com/blog/apache-arrow-pandas-internals/">https://wesmckinney.com/blog/apache-arrow-pandas-internals/</a></li><li><a href="https://docs.rapids.ai/api/cudf/stable/user_guide/pandas-comparison/">https://docs.rapids.ai/api/cudf/stable/user_guide/pandas-comparison/</a></li><li><a href="https://medium.com/rapids-ai/rapids-23-08-release-23db51c255f0">https://medium.com/rapids-ai/rapids-23-08-release-23db51c255f0</a></li><li><a href="https://github.com/rapidsai/cudf/tree/main/python/dask_cudf">https://github.com/rapidsai/cudf/tree/main/python/dask_cudf</a></li><li><a href="https://docs.rapids.ai/api/cudf/stable/user_guide/10min/">https://docs.rapids.ai/api/cudf/stable/user_guide/10min/</a></li><li><a href="https://developer.nvidia.com/blog/new-video-visualizing-census-data-with-rapids-cudf-and-plotly-dash/">https://developer.nvidia.com/blog/new-video-visualizing-census-data-with-rapids-cudf-and-plotly-dash/</a></li><li><a href="https://developer.nvidia.com/blog/gpus-for-etl-run-faster-less-costly-workloads-with-nvidia-rapids-accelerator-for-apache-spark-and-databricks/">https://developer.nvidia.com/blog/gpus-for-etl-run-faster-less-costly-workloads-with-nvidia-rapids-accelerator-for-apache-spark-and-databricks/</a></li><li><a href="https://rapids.ai/">https://rapids.ai/</a></li><li><a href="https://www.dask.org/">https://www.dask.org/</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4d4697c8ddea" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-reply-it-datatech/accelerated-data-analysis-with-rapids-4d4697c8ddea">Accelerated data analysis with RAPIDS</a> was originally published in <a href="https://medium.com/data-reply-it-datatech">Data Reply IT | DataTech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>