AgreenaCarbon is now Verra registered: A game-changing milestone for regenerative agriculture
10,000 times better: Scaling machine learning inference with Anyscale and Ray
)
)
How do you take powerful machine learning models, designed to understand the intricate details of agriculture, and deploy them to analyse millions of hectares with lightning speed? At Agreena, this wasn't just a question – it was a necessity for our mission to empower sustainable farming through digital MRV. This blog post unveils the journey of building our next-generation inference platform, a system engineered with Anyscale and Ray to deliver unprecedented scalability and efficiency. Prepare to discover how we moved from potential to planetary impact.
- Nischal HP, Director of Data Science and Data Engineering
At Agreena, our mission is to empower farmers across Europe and beyond to adopt regenerative practices, improving environmental health and decarbonising our agriculture and food systems. Scaling regenerative agriculture requires insights about farming practices in every country we operate in - 20 across Europe. That’s where our machine learning (ML) platform comes in.
The internal Data Team leverages remote sensing technology (satellite imagery) and advanced machine learning algorithms to measure, report, and verify (MRV) regenerative agricultural practices. This provides reliable verification of key agricultural indicators such as cover crop presence, tillage type, crop classification, and field boundaries. Beyond these, we also generate high-value data layers that provide insights into global environmental factors like deforestation, biodiversity, and soil health — all accessible through APIs.
Processing and analysing the sheer volume of remote sensing data required for accurate MRV at scale is a monumental challenge. Generating insights for millions of fields across diverse geographies demands a platform capable of provisioning vast amounts of computing and data volumes while maintaining computational efficiency. The complexity of our machine learning models, coupled with the need for rapid data processing, pushed us to rethink our infrastructure.
To overcome these infrastructure challenges, we developed a new ML platform leveraging Anyscale and Ray software. This approach enables us to efficiently scale our remote sensing workloads at a planetary scale, significantly speeding up our ability to move new analyses from development into production without sacrificing quality or increasing complexity. This article dives into the challenges we faced, our adoption of Anyscale and Ray, and how this new platform is transforming the way we handle geospatial ML workloads.
Summary
Switching to the new ML platform has unlocked game-changing improvements for our data science and geospatial analytics workflows. The most important benefits are:
Drastic improvement in scalability - 3 months to 1 hour: Previously, computing insights for 24 million hectares would have taken nearly 3 months using our legacy system. Now, our new Ray-powered platform completes the same analysis in just one hour, allowing us to scale from processing 35 thousand hectares per day to 24 million hectares per hour.
Enhanced cost efficiency - 78% decrease in cost: We can now process 24 million hectares in just one hour, whereas our legacy system processed only 35 thousand hectares daily. Leveraging AWS Spot Instances and efficient resource allocation has greatly reduced infrastructure expenses, aligning with our sustainability objectives. This represents a 10,000 times efficiency improvement while substantially reducing operational costs.
Accelerated ML model deployment - months to weeks: By eliminating handover sessions, code refactoring, and knowledge silos, we've shortened our model development cycle dramatically — from months down to mere weeks. Data scientists can now swiftly move models from research to production.
Instant data accessibility - from hours of async compute to seconds: Previously, insights required hours of asynchronous processing before users could access them. By precomputing insights, our new platform now serves data instantly — delivering information through APIs and Geographic Information Systems (GIS) in mere seconds rather than hours.
The challenge
At Agreena, we have a team of data scientists producing state-of-the-art (SOTA) models that drive our MRV insights. In the research stage, considerations like stability, monitoring, and compute resources take a backseat.
)
Fig 4. Depicts the time sensitive approach to deliver MRV insights to our users. A great deal of details goes into preserving consistent results between cycles.
Disparate research and engineering environments can result in lengthy rewrite cycles of prototype code as well as knowledge silos. Deploying models at a scale that can process millions of hectares, therefore, requires a streamlined process to production and a robust, scalable platform, which is easy to use for data scientists and engineers, has monitoring built in, and does not cost the entire budget. And as a climate-focused company, we’re also mindful of the carbon emissions of our data pipelines, making efficient use of compute essential.
)
Fig 5. Depicts the development cycle associated with AI based features at Agreena
Within the remote sensing domain, we face an additional data challenge. Satellite imagery is complex, requiring processing across various spatial resolutions, projections, and formats. This multispectral source records measurements down to 10x10m pixels every 5 days, requiring terabytes (TB) of storage for country-level coverage over an agricultural season.
)
Fig 6. Data is multi-spectral, with different bands at different pixel resolutions. Imagery across all bands is captured every 5 days, which leads to a large volume of data. [2]
Our previous setup was designed for smaller-scale, field-by-field processing, originally optimised for bespoke farm-level MRV. However, we quickly outgrew this approach when our maximum processing capacity reached only 1,000 fields per day, which was far from sufficient for our worldwide ambitions. To overcome these limitations, we’ve switched to a solution that can process entire satellite tiles in advance.
)
Fig 7. 110x110km tiles are used to segment large areas of land. Overlaps are maintained to ensure full land coverage. Due to the curvature of the Earth, these can sometimes overlap drastically. A single tile requires 800MB to store with Sentinel-2.
Introducing the Agreena ML platform
At Agreena, we have reimagined the traditional machine learning development cycle to streamline remote sensing operations at scale. We set out to remove bottlenecks in taking ML projects to production. We needed to enable our data scientists to scale training and inference effortlessly and efficiently, ensuring optimal resource utilisation without needing expertise in distributed computing or complex deployment workflows.
Achieving this vision required fundamentally rethinking the design of our platform. Rather than compelling data scientists to write custom code for distributed processing or depend on dedicated ML engineering teams, we developed a system that allows them to focus primarily on model development while Anyscale handle the infrastructure complexity.
A smarter approach to scaling ML
Our primary focus has been on efficiently scaling machine learning while maximising compute utilisation with minimal complexity. To achieve this, we adopted Ray, an open-source distributed computing framework developed by UC Berkeley’s RISELab. Unlike traditional distributed systems like Apache Spark, Ray is purpose-built for AI and machine learning, facilitating seamless parallelisation and high-performance scaling across diverse cloud environments. By leveraging Ray, we not only optimised our compute resources — ensuring efficient use of both CPU-intensive and GPU-intensive workloads — but also streamlined execution, thereby reducing lead times as a natural by-product.
Ray’s declarative resource configuration allows different ML components to request only the compute they need, eliminating inefficiencies and unnecessary resource allocation.
Ray is trusted by industry leaders such as OpenAI, Uber, and Amazon for handling large-scale AI projects, reinforcing its credibility for geospatial ML workloads.
To further optimise our operations, we partnered with Anyscale, the creators of Ray, leveraging their fully managed solution while maintaining our infrastructure securely within AWS. Anyscale’s tooling and expertise help us efficiently manage Ray-based workloads, reducing operational complexity, minimising boilerplate code, and accelerating iteration cycles. As a result, we’ve dramatically improved scalability while reducing the time from research to production.
Key features and benefits
Our aim for this year is to generate multi-year insights across Europe, encompassing 460 million hectares and 37 million fields. This would have been unfeasible under our previous field-based approach and the legacy platform. Given its processing speed, it would have taken approximately 36 years to accomplish what we expect to complete within weeks with our new tail-based approach on the Ray-based ML platform.
To meet this ambitious goal, our platform offers:
Cost efficiency and sustainability: We design our workloads to be stateless and fault-tolerant, enabling us to efficiently leverage AWS Spot Instances and dynamically optimise resource allocation. This approach significantly reduces infrastructure costs and minimises our carbon footprint, aligning closely with both AWS’s Well-Architected Sustainability Framework [1] and Agreena’s commitment to climate-positive agriculture through sustainable data processing at scale.
Dynamic scalability: We implemented dynamic scalability using Ray’s intelligent autoscaler, enabling real-time allocation of computing resources based on workload demands. By clearly distinguishing CPU-intensive tasks from GPU-intensive tasks, and specifying memory and compute requirements rather than fixed concurrency limits, Ray provisions exactly the resources each job requires—ensuring GPU resources are used only when necessary, maximising efficiency. Our flexible architecture dynamically adapts to AWS Spot Instance availability, automatically accelerating processing speeds when more Spot Instances become available and gracefully slowing down when fewer Spot Instances are accessible.
Intelligent resource allocation: Taking full advantage of AWS Spot Instances, our platform achieves a 50% cost reduction, 6x faster processing speeds, and optimised computing efficiency. The autoscaler dynamically selects the most suitable machine types for each task, allowing simultaneous use of multiple Spot instance types.
)
Fig 8. Resources used by a single job that processes satellite imagery for 60 million hectares of land (12 million hectares x 5 years).
Faster ML model deployment: Anyscale provides a developer workspace, allowing data scientists to work on the same platform as production. This eliminates handovers and code refactoring, enabling a seamless transition from research to production within weeks instead of months.
How it works
Our new ML platform is designed around batch processing and precomputed insights, ensuring that results are readily available via APIs, GIS tools, or dashboards when needed. This eliminates delays and allows users to access processed insights in seconds, rather than waiting for on-demand processing.
The inference pipeline in our system is logically divided into data ingestion and prediction tasks. These independent tasks enable us to allocate resources efficiently, tailoring them to specific functions. This architecture allows us to leverage a cluster of multiple machines, managed with Ray's autoscaler, for optimal efficiency.
User experience - why do precomputed insights matter?
By shifting to precomputed insights, we’ve transformed the user experience. Previously, a user requesting information about cover crops or tillage type practices had to wait for real-time processing - often hours. Our Ray-powered ML pipeline processes entire country-scale datasets in advance, allowing users to access insights instantaneously.
The best technology feels invisible. By eliminating wait times, we’ve made agricultural data effortlessly accessible, letting farmers, agronomists, and researchers focus on decision-making rather than data processing.
)
Fig 9. Internal data visualiser. Allows users to quickly explore precomputed insights.
)
Fig 10. Data Team API Catalog. Allows internal developers to access precomputed data layers.
Platform architecture overview
When we began reimagining our ML platform, we faced a daunting challenge: How do we process satellite imagery for 460 million hectares of European farmland and make those insights instantly available to users?
Our back-of-the-envelope calculation revealed the accurate scale of what we needed to accomplish:
37 million agricultural fields to analyse
Each field requires multiple satellite images across various time points
Estimated processing time - 36 years at our previous capacity
Addressing this required us to fundamentally rethink our platform architecture.
We chose Ray for its scalability, elasticity, and ease of adoption, complemented by a minimal set of established solutions optimised for large-scale processing. When crafting tools for data scientists, we prioritised keeping the development environment closely aligned with production, minimising discrepancies between these environments while maintaining necessary isolation.
Key components of our ML platform include:
Data science workspace – Provides an optimised environment for data scientists and remote sensing specialists to analyse the data, experiment, train, and deploy ML models without infrastructure overhead.
Preprocessing & ML pipelines – Efficiently processes raw satellite data at scale, running parallel analyses to ensure timely insights.
Storage layer (data mesh) – Organise, maintain and democratise access to high-integrity geospatial data, eliminating silos and enabling seamless access.
Serving layer – Delivers precomputed insights via APIs, GIS tools, and dashboards, ensuring instant accessibility for end-users.
Shared ML platform (Anyscale + Ray) – Acts as the connective tissue between research and production, enabling rapid deployment of new insights.
This architecture enables rapid scaling, cost efficiency, and superior data accessibility, ensuring our ML platform can support the future of AI-driven agriculture.
)
Fig 11. Remote sensing ML platform overview.
Looking ahead
Now that we have a robust, scalable ML platform, we plan to focus on the following:
Expand our agriculture insights across Europe.
Continue to roll out new capabilities that enrich our agricultural insights portfolio.
Caching our geospatial data for quicker access and infra costs reduction.
Further automate parts of the system.
Optimising our infrastructure and workloads to improve resource utilisation, reduce carbon emissions, and strengthen our commitment to sustainable, climate-positive agriculture.
With Anyscale and Ray at the core of our ML infrastructure, we are well-positioned to push the boundaries of remote sensing and AI-driven agriculture.
Conclusion
By transitioning from a field-by-field approach to a highly scalable Ray-based ML platform on AWS, we have transformed our ability to process remote sensing agricultural data at scale.
Our adoption of Anyscale and Ray has enabled us to:
✅ Scale from 30,000 fields/day to 24 million hectares/hour—a 10,000x increase in inference scalability, significantly accelerating our ability to generate insights.
✅ Reduce infrastructure costs by 78% through the optimised use of AWS Spot Instances and dynamic resource allocation.
✅ Accelerate ML model deployment from months to weeks, empowering data scientists to transition models rapidly from research into production.
✅ Deliver instantaneous agricultural insights by shifting from asynchronous compute jobs that used to take hours to precomputed datasets readily available through APIs.
This shift is not just an infrastructure upgrade—it’s a paradigm shift in how we approach geospatial machine learning. With our new ML platform in place, we are ready to tackle the next frontier of AI-powered environmental monitoring.
Resources:
[1] AWS AWS Well-Architected Framework, SUS05-BP02 Use instance types with the least impact https://docs.aws.amazon.com/wellarchitected/latest/sustainability-pillar/sus_sus_hardware_a3.html#implementation-steps
[2] Colour Vision for Copernicus, page 1 https://esamultimedia.esa.int/docs/EarthObservation/Sentinel-2_ESA_Bulletin161.pdf