minor fix to validation models discovery
Validate Operations / validate-operations (push) Has been cancelled
Validate Operations / validate-operations (push) Has been cancelled
This commit is contained in:
@@ -34,7 +34,7 @@ STAGE_COLORS = {
|
||||
STAGE_TITLES[7]: Fore.BLUE,
|
||||
}
|
||||
STAGE_COUNT = len(STAGE_TITLES)
|
||||
GENERATED_DIR_NAMES = ("inputs", "outputs", "raptor", "runner", "simulation")
|
||||
GENERATED_DIR_NAMES = ("inputs", "outputs", "pimcomp", "raptor", "runner", "simulation")
|
||||
|
||||
MODE_FULL = "full"
|
||||
MODE_COMPILE_ONLY = "compile_only"
|
||||
|
||||
@@ -21,6 +21,7 @@ from raptor_validation.validate_one import (
|
||||
PIMSIM_NOT_RUN,
|
||||
PIMSIM_SKIPPED,
|
||||
PIMSIM_UNSUPPORTED,
|
||||
GENERATED_DIR_NAMES,
|
||||
ProgressReporter,
|
||||
ValidationResult,
|
||||
clean_workspace_artifacts,
|
||||
@@ -34,6 +35,13 @@ DEFAULT_PIMCOMP_CONFIG = "arch-a"
|
||||
PIMCOMP_CONFIG_CHOICES = ("arch-a", "arch-b", "arch-c")
|
||||
|
||||
|
||||
def discover_onnx_files(root):
|
||||
return sorted(
|
||||
path for path in root.rglob("*.onnx")
|
||||
if not any(part in GENERATED_DIR_NAMES for part in path.relative_to(root).parts[:-1])
|
||||
)
|
||||
|
||||
|
||||
def run_validation_job(job):
|
||||
models, options = job
|
||||
completed = []
|
||||
@@ -199,7 +207,7 @@ def main():
|
||||
print(Fore.RED + f"Operations directory not found: {operations_dir}" + Style.RESET_ALL)
|
||||
sys.exit(1)
|
||||
|
||||
onnx_files = sorted(operations_dir.rglob("*.onnx"))
|
||||
onnx_files = discover_onnx_files(operations_dir)
|
||||
if not onnx_files:
|
||||
print(Fore.YELLOW + f"No .onnx files found under {operations_dir}" + Style.RESET_ALL)
|
||||
sys.exit(1)
|
||||
|
||||
Reference in New Issue
Block a user