Add dataset_path existence check in DatasetParams finalize_and_validate#2320
Open
idoudali wants to merge 2 commits intoidoudali/config-exceptionsfrom
Open
Add dataset_path existence check in DatasetParams finalize_and_validate#2320idoudali wants to merge 2 commits intoidoudali/config-exceptionsfrom
idoudali wants to merge 2 commits intoidoudali/config-exceptionsfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds early validation to catch invalid dataset_path values during config finalization, improving user-facing failures before training starts.
Changes:
- Added
dataset_pathexistence validation inDatasetParams.__finalize_and_validate__. - Added unit tests covering nonexistent paths, existing files/directories, and missing
dataset_path.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/oumi/core/configs/params/data_params.py |
Raises ConfigFileNotFoundError when dataset_path is set but does not exist. |
tests/unit/core/configs/params/test_data_params.py |
Adds tests validating the new dataset_path existence check behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
14e626c to
35745d5
Compare
3fa4bc3 to
cf2ca7e
Compare
35745d5 to
9c851f3
Compare
cf2ca7e to
5bb15aa
Compare
…rror handling Introduce dedicated config exception types and add explicit configuration checks to catch invalid or missing values early. Wire these failures into the CLI global handler so users get clearer, consistent error messages. Improve current file checks during configuration parsing. Fixes OPE-1848
9c851f3 to
e5f549f
Compare
oelachqar
reviewed
Mar 27, 2026
| # If `model_name` specifies a LoRA adapter dir without the base model | ||
| # present, set it to the base model name found in the adapter config, | ||
| # if present. Error otherwise. | ||
| if len(list(adapter_dir.glob("config.json"))) == 0: |
Contributor
There was a problem hiding this comment.
Maybe we can move this to a separate "load_model_config" function?
| + "\n".join(f"- {path}" for path in sorted(removed_paths)) | ||
| ) | ||
|
|
||
| try: |
Contributor
There was a problem hiding this comment.
For this one, it might be useful to get the stacktrack to know where the call originated from, i'd suggest skipping for now
Raise ConfigFileNotFoundError early when dataset_path points to a nonexistent file or directory, giving users a clear error before training begins. Fixes OPE-1849
5bb15aa to
f1d3d4f
Compare
oelachqar
approved these changes
Apr 14, 2026
e46d02e to
4804801
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Depends on #2319
Raise ConfigFileNotFoundError early when dataset_path points to a
nonexistent file or directory, giving users a clear error before
training begins.
Fixes OPE-1849
Related issues
Fixes # (issue)
Before submitting
Reviewers
At least one review from a member of
oumi-ai/oumi-staffis required.