Skip to content

Issues with documentation for NeMo RL + Nemo Gym training tutorial #356

Closed as duplicate

Description

@shashank3959

Describe the bug

There are a few issues with this tutorial in documentation https://docs.nvidia.com/nemo/gym/latest/tutorials/rl-training-with-nemo-rl.html#setup-nemo-rl-and-nemo-gym

  1. [Bug] The resource server name references "resources_servers/library_judge_math/configs/bytedtsinghua_dapo17k.yaml", but it should be "resources_servers/math_with_judge/configs/bytedtsinghua_dapo17k.yaml"

  2. [Bug] It appears some steps for adding MLFLow tracking are missing. I consistently get

(Penguin) root@pool0-01787:/lustre/fs1/portfolios/coreai/projects/coreai_dlalgo_llm/users/shashankv/nemo-gym/RL/3rdpart
y/Penguin-workspace/Penguin# config_paths="responses_api_models/openai_model/configs/openai_model.yaml,\
resources_servers/math_with_judge/configs/bytedtsinghua_dapo17k.yaml"
ng_prepare_data "+config_paths=[${config_paths}]" \
    +output_dirpath=data/bytedtsinghua_dapo17k \
    +mode=train_preparation +should_download=true


####################################################################################################
#
# Load and validate server instance configs
#
####################################################################################################

Found 3 server instance configs (1 agent configs):
- policy_model (responses_api_models)
- math_with_judge (resources_servers)
- math_with_judge_simple_agent (responses_api_agents)


Found 0 agent server instance configs WITHOUT datasets:


Found 1 agent server instance configs WITH datasets:
- math_with_judge_simple_agent
  - train (train)
  - validation (validation)


In scope dataset types for `train_preparation` mode: ['train', 'validation']
Found 1 agent server instance configs with in-scope datasets:
- math_with_judge_simple_agent
  - train (train)
  - validation (validation)


####################################################################################################
#
# Load datasets. Missing datasets **WILL** be downloaded.
#
####################################################################################################

FOUND the following datasets at their local paths:


MISSING the following datasets:
- math_with_judge_simple_agent
  - train (train)
  - validation (validation)


Downloading dataset `train` from `math_with_judge_simple_agent` using dataset_name='bytedtsinghua_dapo17k' version='0.0.1' artifact_fpath='dapo17k_bytedtsinghua_train.jsonl' output_fpath='resources_servers/math_with_judge/data/dapo17k_bytedtsinghua_train.jsonl'
Traceback (most recent call last):
  File "/opt/nemo_rl_venv/bin/ng_prepare_data", line 10, in <module>
    sys.exit(prepare_data())
             ^^^^^^^^^^^^^^
  File "/lustre/fs1/portfolios/coreai/projects/coreai_dlalgo_llm/users/shashankv/nemo-gym/RL/3rdparty/Penguin-workspace/Penguin/nemo_gym/train_data_utils.py", line 726, in prepare_data
    data_processor.run(global_config_dict)
  File "/lustre/fs1/portfolios/coreai/projects/coreai_dlalgo_llm/users/shashankv/nemo-gym/RL/3rdparty/Penguin-workspace/Penguin/nemo_gym/train_data_utils.py", line 324, in run
    self.load_datasets(config, server_instance_configs)
  File "/lustre/fs1/portfolios/coreai/projects/coreai_dlalgo_llm/users/shashankv/nemo-gym/RL/3rdparty/Penguin-workspace/Penguin/nemo_gym/train_data_utils.py", line 449, in load_datasets
    download_jsonl_dataset(download_config)
  File "/lustre/fs1/portfolios/coreai/projects/coreai_dlalgo_llm/users/shashankv/nemo-gym/RL/3rdparty/Penguin-workspace/Penguin/nemo_gym/gitlab_utils.py", line 87, in download_jsonl_dataset
    client = create_mlflow_client()
             ^^^^^^^^^^^^^^^^^^^^^^
  File "/lustre/fs1/portfolios/coreai/projects/coreai_dlalgo_llm/users/shashankv/nemo-gym/RL/3rdparty/Penguin-workspace/Penguin/nemo_gym/gitlab_utils.py", line 39, in create_mlflow_client
    config = MLFlowConfig.model_validate(global_config)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/nemo_rl_venv/lib/python3.12/site-packages/pydantic/main.py", line 705, in model_validate
    return cls.__pydantic_validator__.validate_python(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pydantic_core._pydantic_core.ValidationError: 2 validation errors for MLFlowConfig
mlflow_tracking_uri
  Field required [type=missing, input_value={'policy_model': {'respon...hon_version': '3.12.12'}, input_type=DictConfig]
    For further information visit https://errors.pydantic.dev/2.11/v/missing
mlflow_tracking_token
  Field required [type=missing, input_value={'policy_model': {'respon...hon_version': '3.12.12'}, input_type=DictConfig]
    For further information visit https://errors.pydantic.dev/2.11/v/missing
  1. [Ease of Use Improvement] In Setup NeMo RL and NeMo Gym, a virtual env is activated, yet another one is activated in the next step for Prepare NeMo Gym data. Its not clear if it should be deactivated between steps.

  2. [Ease of Use Improvement] Good to specify the rough time taken by each of the steps so the user knows what to expect.

  3. [Ease of Use Improvement] In the Single Node Training command, update the snippet to have the user specify WANDB_API_KEY at the top first, and then the rest of the command can simply be copied.

  4. [Bug] The config used in single node training section needs to be updated to reflect the correct names of the math judge resource server.

  5. [Bug] The config leads to

File "/opt/nemo_rl_venv/lib/python3.12/site-packages/ray/_private/worker.py", line 2882, in get                                                                                          values, debugger_breakpoint = worker.get_objects(object_refs, timeout=timeout)                                                                                                     
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/nemo_rl_venv/lib/python3.12/site-packages/ray/_private/worker.py", line 970, in get_objects
    raise value                                                                                                                                                                        ray.exceptions.ActorDiedError: The actor died because of an error raised in its creation task, ray::lm_policy-0-2:DTensorPolicyWorker.__init__() (pid=2791977, ip=10.65.6.13, actor_id=
79f3b3f4160dc05408ac436e01000000, repr=DTensorPolicyWorker[rank=2])                                                                                                                    
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                        
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                 
  File "/tmp/ray/session_2025-11-19_02-58-14_113925_2774443/runtime_resources/working_dir_files/_ray_pkg_4e26c8308e2fba8e/nemo_rl/models/policy/dtensor_policy_worker.py", line 190, in __init__                                                                                                                                                                              
    self.offload_optimizer_for_logprob = self.cfg["offload_optimizer_for_logprob"]
                                         ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                     
KeyError: 'offload_optimizer_for_logprob' 

To get around this, had to add a config policy.offload_optimizer_for_logprob: false

  1. [Ease of Use Improvement] In the single node training section, its not clear how many steps are needed to reach the expected reward of 0.8, and where it starts. The max_grpo_steps is configured to 3, which appears too little to see meaningful improvement.

  2. [Bug] In the single node training, my train/total_reward/mean actually started at 1, and during the course of 3 steps it ran, it actually decreased (1 --> 0.9375 --> 0.859). That doesn't look right, and rather confusing how it starts at 1.

Image

Steps/Code to reproduce bug

Follow https://docs.nvidia.com/nemo/gym/latest/tutorials/rl-training-with-nemo-rl.html#prepare-nemo-gym-data

Expected behavior
The tutorial works seamlessly

Other details
Uses NeMo/RL main with latest commit at c32778d

Activity

  1. shashank3959 commented on Nov 19, 2025

    @shashank3959
    ContributorAuthor

    Created a PR for the first issue: #355

  2. shashank3959 commented on Nov 19, 2025

    @shashank3959
    ContributorAuthor

    For the second issue: It appears that https://github.com/NVIDIA-NeMo/Gym/blob/main/nemo_gym/train_data_utils.py#L39 refers to download_jsonl_dataset() from nemo_gym/gitlab_utils.py, which in turn creates an mlflow client https://github.com/NVIDIA-NeMo/Gym/blob/main/nemo_gym/gitlab_utils.py#L87

    Ideally, instructions to download directly from HF are provided instead of setting up MLFlow

  3. added theissue type on Nov 19, 2025
  4. added
    training
    on Nov 19, 2025
  5. self-assigned this
    on Nov 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

training

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions