You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/proposals/scenarios/example-restoration-ci/example-restoration-ci.md
+23-7Lines changed: 23 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -283,14 +283,16 @@ The proposed framework adds a validation layer around existing Ianvs examples.
283
283
Ianvs Repository
284
284
├── examples/
285
285
│ ├── llm_simple_qa/
286
+
│ │ └── scripts/
287
+
│ │ └── prepare_dataset.py
286
288
│ ├── example A/
287
289
│ ├── example B/
288
290
│ └── ...
289
291
│
290
292
├── tools/
291
293
│ └── example_validation/
292
294
| ├── data/
293
-
| | └── example_inventory.json
295
+
| | └── example_inventory.yaml
294
296
│ ├── validate_examples.py
295
297
│ ├── inventory.py
296
298
│ ├── static_validator.py
@@ -315,12 +317,13 @@ The responsibilities of the proposed files are:
315
317
| Path | Responsibility |
316
318
|---|---|
317
319
|`examples/`| Stores Ianvs example projects, including their runnable configurations, documentation, dependency references, dataset references, and algorithm-related files. These directories are the validation targets of the framework. |
318
-
|`tools/example_validation/data/example_inventory.json`| Stores the example inventory and classification metadata, including each example's path, validation level, dataset requirements, dependency requirements, model requirements, hardware requirements, and current status. |
320
+
|`examples/<example_name>/scripts/prepare_dataset.py`| Provides the standard dataset preparation entry point for examples that support automated dataset setup. It should download, generate, or normalize the required dataset into the documented directory structure from a clean environment. |
321
+
|`tools/example_validation/data/example_inventory.yaml`| Stores the example inventory and classification metadata, including each example's path, validation level, dataset requirements, dependency requirements, model requirements, hardware requirements, current status, expected dataset structure, and whether the dataset is external when automated preparation is unavailable. |
319
322
|`tools/example_validation/validate_examples.py`| Serves as the main entry point for local and CI validation. It should parse CLI arguments, load the inventory, select validation stages, invoke the validator modules, and coordinate report generation. |
320
323
|`tools/example_validation/inventory.py`| Loads and manages the example inventory. It should provide structured metadata access, helper logic for selecting changed or affected examples, and shared inventory operations used by the validation pipeline. |
321
324
|`tools/example_validation/static_validator.py`| Performs lightweight static checks without executing examples. It should detect problems such as missing files, invalid YAML, broken relative paths, hardcoded local paths, outdated repository layout references, README and configuration mismatches, local-only model paths, and CUDA-only assumptions. |
322
325
|`tools/example_validation/dependency_validator.py`| Validates whether example dependencies are properly declared and installable. It should check dependency file presence, package installation behavior, Python version compatibility, and dependency-related failures that block clean-environment execution. |
323
-
|`tools/example_validation/dataset_validator.py`| Validates dataset-related requirements and lightweight data structure correctness. It should check dataset path consistency, external dataset documentation, and format validity for files such as JSONL. |
326
+
|`tools/example_validation/dataset_validator.py`| Validates dataset-related requirements and lightweight data structure correctness. It should check dataset path consistency, `prepare_dataset.py` availability when automation is supported, declared dataset structure in the inventory, `external` classification when automation is unavailable, and format validity for files such as JSONL. |
324
327
|`tools/example_validation/smoke_test_runner.py`| Runs lightweight execution tests for selected examples to confirm that they can start and complete a minimal validation run in CI without requiring full benchmark workloads where possible. |
325
328
|`tools/example_validation/report_generator.py`| Converts validation results into human-readable CI summaries and example health reports, including failure classifications, reproduction commands, and suggested next actions for contributors and maintainers. |
326
329
|`docs/example_validation/validation_rules.md`| Documents the validation rules implemented by the framework, including what each validator checks, why the rule exists, and how maintainers should interpret its result. |
* README references the standard `prepare_dataset.py` flow when the example supports automated dataset setup
420
431
* README contains JSONL format when applicable
421
432
* README contains model configuration instructions when applicable
422
433
* README paths match YAML paths
@@ -479,6 +490,7 @@ Static validation should be lightweight enough to run across relevant examples o
479
490
For `examples/llm_simple_qa`, static validation should also confirm:
480
491
481
492
* The README explains the example overview, setup steps, dependency installation, dataset preparation, JSONL format, model configuration, run command, expected output, and troubleshooting.
493
+
* Dataset preparation uses `prepare_dataset.py` when the example supports automated setup, and the documented dataset layout matches the structure declared in `example_inventory.yaml`.
482
494
* Model loading uses a portable model ID or a documented override mechanism instead of local-only paths.
483
495
* Device selection supports CUDA, MPS, and CPU fallback rather than assuming CUDA-only execution.
484
496
* Metric handling avoids crashes when no valid prediction-answer pairs exist, for example by returning `0.0` and logging a warning instead of triggering `ZeroDivisionError`.
@@ -541,12 +553,15 @@ Purpose:
541
553
542
554
Checks:
543
555
544
-
* Dataset path exists or is documented as external
556
+
* Dataset path exists or is declared in `example_inventory.yaml`
545
557
* Dataset path matches README and YAML references
558
+
*`prepare_dataset.py` exists for examples that support automated dataset setup
559
+
*`example_inventory.yaml` declares the expected dataset directory structure
560
+
* If automated dataset setup is unavailable, the example inventory marks the dataset as `external: true`
546
561
* JSONL files are not empty
547
562
* Each JSONL line is a complete JSON object
548
563
* Required fields are present
549
-
*Dataset generation script exists when data is not committed
564
+
*`prepare_dataset.py` produces or documents the expected dataset layout when data is not committed
550
565
551
566
For `examples/llm_simple_qa`, the expected dataset layout may be:
552
567
@@ -567,6 +582,7 @@ Each JSONL line should be one complete JSON object, for example:
0 commit comments