A serverless reinforcement learning training platform that integrates OpenFaaS with OpenAI Gym. Decomposes RL training pipelines (rollout collection, reward aggregation, policy updates) into elastic, cost-efficient serverless functions — enabling scalable RL experimentation without managing long-lived training servers.
Burst data collection and evaluation across many function instances during training peaks, then scale to zero outside training windows.
Compose training stages — environment step, rollout collection, reward calculation, policy update — into independently deployable serverless functions.
Pay for compute only when work runs. Scale-to-zero between training bursts eliminates idle GPU/CPU costs common in dedicated training clusters.
Metrics and logs accessible through the OpenFaaS Gateway and Prometheus stack, simplifying distributed training diagnostics at scale.
A serverless MAPE-inspired loop for RL: Measure rollouts, Analyse rewards, Plan updates, Execute policy changes — each stage implemented as an OpenFaaS function.
Orchestrates training pipelines via OpenFaaS Gateway. Queues rollout requests, fans out invocations, and collects Prometheus metrics for training state.
Gym episodes and steps executed in parallel stateless function instances. Trajectories and episode summaries persisted externally in S3/MinIO.
Replay buffers, model checkpoints, and episode summaries persisted in S3/DB, enabling stateless function design with full training resumability.
Scale out environment interaction across hundreds of short-lived worker functions where data collection and evaluation dominate training compute.
Spin up competing RL configurations and policies as independent function graphs. Collect comparative metrics without dedicated experiment infrastructure.
Plug RL training into CI/CD pipelines. Store artifacts centrally and drive training experiments via event triggers from data pipelines or model registries.
faas-cli.
github.com/SidAg26/FaaSTrainGym
On-Demand Cold Start Frequency Reduction with Off-Policy Reinforcement Learning in Serverless Computing
Agarwal, S. et al. — International Conference on Computational Intelligence, Data Science and Applications (ICCIDA) 2024
View Paper