NVIDIA-NeMo / NVIDIA-NeMo/Gym

Create Database Integration Tutorial

Open
#296 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

community-request documentation
Dominant language
Python
Stars
1.2k
Forks
349
Avg merge
1d 21h
Merged PRs (30d)
318

Description

Create Database Integration Tutorial

Background

Multiple users have asked how to handle database operations in NeMo Gym for stateful agentic tasks. This is a common need for agentic training.

Problem

We don't have documentation or examples showing how to:

  • Connect to a database from a resource server
  • Handle database state across multi-turn interactions
  • Manage concurrency for database operations during RL training (many parallel rollouts)
  • Use the session model to route requests to the same database/instance
Acceptance Criteria
  • Create a new resource server example
  • Show integration with a real database (PostgreSQL or similar)
  • Demonstrate session management for maintaining state across turns
  • Document concurrency considerations (connection pooling, transaction handling, etc.)
  • Add README with clear setup instructions
  • Create a tutorial walkthrough explaining the key patterns
  • Consider showing both:
    • Each session gets its own database instance/schema
    • Multiple sessions sharing a database with proper isolation
Priority

High - multiple users asking, common agentic use case

Notes

example_stateful_counter exists but only shows in-memory state, not real database integration

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the existing example_stateful_counter example to understand the resource-server and session patterns it documents. Add a real database integration tutorial and README covering setup, session state, concurrency, connection pooling, transactions, and both isolated and shared database approaches; done means all listed acceptance criteria are documented and reproducible.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgresql, python
Domain
backend, databases, documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.