  Open Radio Access Network (RAN) architectures will enable interoperability,
openness, and programmatic data-driven control in next generation cellular
networks. However, developing scalable and efficient data-driven algorithms
that can generalize across diverse deployments and optimize RAN performance is
a complex feat, largely unaddressed as of today. Specifically, the ability to
design efficient data-driven algorithms for network control and inference
requires at a minimum (i) access to large, rich, and heterogeneous datasets;
(ii) testing at scale in controlled but realistic environments, and (iii)
software pipelines to automate data collection and experimentation. To
facilitate these tasks, in this paper we propose OpenRAN Gym, a practical,
open, experimental toolbox that provides end-to-end design, data collection,
and testing workflows for intelligent control in next generation Open RAN
systems. OpenRAN Gym builds on software frameworks for the collection of large
datasets and RAN control, and on a lightweight O-RAN environment for
experimental wireless platforms. We first provide an overview of OpenRAN Gym
and then describe how it can be used to collect data, to design and train
artificial intelligence and machine learning-based O-RAN applications (xApps),
and to test xApps on a softwarized RAN. Then, we provide an example of two
xApps designed with OpenRAN Gym and used to control a large-scale network with
7 base stations and 42 users deployed on the Colosseum testbed. OpenRAN Gym and
its software components are open source and publicly-available to the research
community.
