Conversation
This reverts commit b237e33. Signed-off-by: Igor Gitman <igitman@nvidia.com>
📝 WalkthroughWalkthroughThis pull request removes the VLMEvalKit integration from NeMo Skills, eliminating documentation, module exports, dataset utilities, evaluation metrics, inference implementations, and pipeline logic that supported VLMEvalKit-based evaluation workflows. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@nemo_skills/pipeline/utils/eval.py`:
- Around line 115-122: The current block overwrites the previously resolved
input_file with a global data_dir, breaking datasets located outside data_dir;
instead, when data_dir is truthy only compute the unmounted check path (use
data_dir_unmounted = pipeline_utils.get_unmounted_path(cluster_config, data_dir)
and set check_path = f"{data_dir_unmounted}/{benchmark.replace('.',
'/')}/{split}.jsonl") and do not reassign input_file (leave the already-resolved
input_file/unmounted_path logic intact); update the code around the data_dir
branch to only set check_path from data_dir_unmounted and preserve the existing
input_file variable.
- Around line 97-104: The current branch sets input_file to the
container-mounted path even when cluster_config["executor"] == "none" and
local_data_path exists; change logic in the not is_on_cluster block so that when
executor == "none" you use the host/unmounted path (unmounted_path) as
input_file. Locate the block using pipeline_utils.is_mounted_filepath,
input_file, unmounted_input_file, unmounted_path and adjust: if local_data_path
is not None and executor == "none" assign input_file = unmounted_path (or
compute unmounted_path via local_data_path or pipeline_utils.get_unmounted_path)
instead of the mounted f"{data_path}/..."; keep existing get_unmounted_path
fallback for the non-local case.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 4420c18f-469e-4e1b-9400-2659573c997f
📒 Files selected for processing (16)
docs/evaluation/eval-kit.mddocs/evaluation/index.mdnemo_skills/dataset/eval_kit/__init__.pynemo_skills/dataset/utils.pynemo_skills/evaluation/evaluator/audio.pynemo_skills/evaluation/metrics/eval_kit_metrics.pynemo_skills/evaluation/metrics/map_metrics.pynemo_skills/evaluation/metrics/translation_metrics.pynemo_skills/inference/eval/eval_kit.pynemo_skills/inference/factory.pynemo_skills/inference/generate.pynemo_skills/inference/mcore_skills.pynemo_skills/pipeline/eval.pynemo_skills/pipeline/utils/eval.pynemo_skills/pipeline/utils/generation.pyrequirements/eval-kit.txt
💤 Files with no reviewable changes (11)
- docs/evaluation/index.md
- docs/evaluation/eval-kit.md
- nemo_skills/evaluation/metrics/eval_kit_metrics.py
- nemo_skills/evaluation/metrics/map_metrics.py
- nemo_skills/dataset/eval_kit/init.py
- nemo_skills/inference/factory.py
- nemo_skills/inference/eval/eval_kit.py
- requirements/eval-kit.txt
- nemo_skills/dataset/utils.py
- nemo_skills/inference/generate.py
- nemo_skills/inference/mcore_skills.py
| if not is_on_cluster: | ||
| if pipeline_utils.is_mounted_filepath(cluster_config, data_path) or cluster_config["executor"] == "none": | ||
| input_file = f"{data_path}/{benchmark.replace('.', '/')}/{split}.jsonl" | ||
| unmounted_path = pipeline_utils.get_unmounted_path(cluster_config, input_file) | ||
|
|
||
| unmounted_path = str(unmounted_path) | ||
| # When data_dir is specified, use it for both input_file and the existence check | ||
| # data_dir is always assumed to be a mounted path | ||
| if data_dir: | ||
| data_dir_unmounted = pipeline_utils.get_unmounted_path(cluster_config, data_dir) | ||
| input_file = f"{data_dir}/{benchmark.replace('.', '/')}/{split}.jsonl" | ||
| check_path = f"{data_dir_unmounted}/{benchmark.replace('.', '/')}/{split}.jsonl" | ||
| else: | ||
| check_path = unmounted_path | ||
| # checking if data file exists (can check locally as well) | ||
| if is_on_cluster: | ||
| if not pipeline_utils.cluster_path_exists(cluster_config, check_path): | ||
| raise ValueError( | ||
| f"Data file {check_path} does not exist on cluster. " | ||
| "Please check the benchmark and split parameters. " | ||
| "Did you forget to run prepare data commands or add data_dir argument?" | ||
| ) | ||
| if local_data_path is not None: | ||
| unmounted_path = f"{local_data_path}/{benchmark.replace('.', '/')}/{split}.jsonl" | ||
| else: | ||
| unmounted_input_file = pipeline_utils.get_unmounted_path(cluster_config, input_file) | ||
| unmounted_path = str(Path(__file__).parents[3] / unmounted_input_file.replace("/nemo_run/code/", "")) |
There was a problem hiding this comment.
Use the host path for remapped datasets when executor == "none".
_resolve_data_path() converts external roots into /nemo_run/code/..., but this branch still feeds that mounted path into input_file even when local_data_path is present. For the "none" executor the command is emitted/run outside the container, so the existence check passes on the host path and generation later tries to open a container-only path.
Suggested fix
- if pipeline_utils.is_mounted_filepath(cluster_config, data_path) or cluster_config["executor"] == "none":
- input_file = f"{data_path}/{benchmark.replace('.', '/')}/{split}.jsonl"
- if local_data_path is not None:
- unmounted_path = f"{local_data_path}/{benchmark.replace('.', '/')}/{split}.jsonl"
+ if cluster_config["executor"] == "none" and local_data_path is not None:
+ input_file = f"{local_data_path}/{benchmark.replace('.', '/')}/{split}.jsonl"
+ unmounted_path = input_file
+ elif pipeline_utils.is_mounted_filepath(cluster_config, data_path):
+ input_file = f"{data_path}/{benchmark.replace('.', '/')}/{split}.jsonl"
+ if local_data_path is not None:
+ unmounted_path = f"{local_data_path}/{benchmark.replace('.', '/')}/{split}.jsonl"🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@nemo_skills/pipeline/utils/eval.py` around lines 97 - 104, The current branch
sets input_file to the container-mounted path even when
cluster_config["executor"] == "none" and local_data_path exists; change logic in
the not is_on_cluster block so that when executor == "none" you use the
host/unmounted path (unmounted_path) as input_file. Locate the block using
pipeline_utils.is_mounted_filepath, input_file, unmounted_input_file,
unmounted_path and adjust: if local_data_path is not None and executor == "none"
assign input_file = unmounted_path (or compute unmounted_path via
local_data_path or pipeline_utils.get_unmounted_path) instead of the mounted
f"{data_path}/..."; keep existing get_unmounted_path fallback for the non-local
case.
| # When data_dir is specified, use it for both input_file and the existence check | ||
| # data_dir is always assumed to be a mounted path | ||
| if data_dir: | ||
| data_dir_unmounted = pipeline_utils.get_unmounted_path(cluster_config, data_dir) | ||
| input_file = f"{data_dir}/{benchmark.replace('.', '/')}/{split}.jsonl" | ||
| check_path = f"{data_dir_unmounted}/{benchmark.replace('.', '/')}/{split}.jsonl" | ||
| else: | ||
| check_path = unmounted_path |
There was a problem hiding this comment.
Don't overwrite the resolved dataset path with the global data_dir.
The code above has already computed the correct input_file / unmounted_path pair for mounted paths, copied extra datasets, and local runs. Replacing both values here with data_dir throws that resolution away, so benchmarks whose files live outside data_dir — and local executor runs that need the mounted /nemo_run/code/... path — now point at the wrong file.
Suggested fix
- # When data_dir is specified, use it for both input_file and the existence check
- # data_dir is always assumed to be a mounted path
- if data_dir:
- data_dir_unmounted = pipeline_utils.get_unmounted_path(cluster_config, data_dir)
- input_file = f"{data_dir}/{benchmark.replace('.', '/')}/{split}.jsonl"
- check_path = f"{data_dir_unmounted}/{benchmark.replace('.', '/')}/{split}.jsonl"
- else:
- check_path = unmounted_path
+ check_path = unmounted_path📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| # When data_dir is specified, use it for both input_file and the existence check | |
| # data_dir is always assumed to be a mounted path | |
| if data_dir: | |
| data_dir_unmounted = pipeline_utils.get_unmounted_path(cluster_config, data_dir) | |
| input_file = f"{data_dir}/{benchmark.replace('.', '/')}/{split}.jsonl" | |
| check_path = f"{data_dir_unmounted}/{benchmark.replace('.', '/')}/{split}.jsonl" | |
| else: | |
| check_path = unmounted_path | |
| check_path = unmounted_path |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@nemo_skills/pipeline/utils/eval.py` around lines 115 - 122, The current block
overwrites the previously resolved input_file with a global data_dir, breaking
datasets located outside data_dir; instead, when data_dir is truthy only compute
the unmounted check path (use data_dir_unmounted =
pipeline_utils.get_unmounted_path(cluster_config, data_dir) and set check_path =
f"{data_dir_unmounted}/{benchmark.replace('.', '/')}/{split}.jsonl") and do not
reassign input_file (leave the already-resolved input_file/unmounted_path logic
intact); update the code around the data_dir branch to only set check_path from
data_dir_unmounted and preserve the existing input_file variable.
This reverts commit b237e33.
That pr broke gpu tests (and likely slurm tests as well)
Summary by CodeRabbit