Repository navigation
fix(experimentalist): read a dataset as the directory of tasks Harbor evaluates #1328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
callingmedic911
merged 4 commits into
main
from
aditya/experimentalist-dataset-task-layout-0542
Aug 14, 2026
Merged
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
71ca8ab
fix(experimentalist): read a dataset as the directory of tasks Harbor…
cursoragent a7df143
fix(experimentalist): fail doctor on a dataset that holds no tasks
cursoragent 6209ccd
Merge remote-tracking branch 'origin/main' into aditya/experimentalis…
cursoragent 9718c80
fix(experimentalist): read task.toml as a file when identifying a task
cursoragent File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
35 changes: 35 additions & 0 deletions
35
...st/src/nemo_experimentalist_plugin/experimentalist/components/evaluator/dataset_layout.py
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| """The dataset directory shape Harbor evaluates: a directory of task directories. | ||
|
|
||
| Harbor's ``DatasetConfig`` enumerates the *children* of a dataset path and keeps | ||
| the ones that are task directories. It never reads the dataset path itself as a | ||
| task, so a dataset whose tasks Harbor cannot enumerate is rejected by its job | ||
| config rather than by anything we validate first. | ||
|
|
||
| Preflight reads this contract as well and cannot import ``harbor`` — whether | ||
| harbor is importable is one of its own checks — so the rule lives here, in a | ||
| module that imports only the standard library. | ||
| """ | ||
|
|
||
| from pathlib import Path | ||
|
|
||
| TASK_CONFIG_FILENAME = "task.toml" | ||
| _TASK_TEMPLATE_DIRNAME = "task_template" | ||
|
|
||
|
|
||
| def is_task_dir(path: Path) -> bool: | ||
| """Return whether *path* is a Harbor task directory.""" | ||
| return path.is_dir() and (path / TASK_CONFIG_FILENAME).exists() | ||
|
|
||
|
|
||
| def find_task_dirs(dataset_path: Path) -> list[Path]: | ||
| """Return the task directories *dataset_path* holds, in a stable order. | ||
|
|
||
| A ``task_template`` child is the shape generated tasks are cut from, not a | ||
| task of the dataset, so it is left out. | ||
| """ | ||
| return sorted( | ||
| child for child in dataset_path.iterdir() if child.name != _TASK_TEMPLATE_DIRNAME and is_task_dir(child) | ||
| ) | ||
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.