refactor(demo): simplify visualizer wiring and typing
Apply Oracle-guided cleanup to make the demo pipeline contract explicit and remove defensive runtime indirection while preserving existing visualization behavior.
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
import inspect
|
||||
import logging
|
||||
import sys
|
||||
|
||||
@@ -90,7 +89,6 @@ if __name__ == "__main__":
|
||||
)
|
||||
|
||||
# Build kwargs based on what ScoliosisPipeline accepts
|
||||
sig = inspect.signature(ScoliosisPipeline.__init__)
|
||||
pipeline_kwargs = {
|
||||
"source": args.source,
|
||||
"checkpoint": args.checkpoint,
|
||||
@@ -108,10 +106,8 @@ if __name__ == "__main__":
|
||||
"silhouette_visualize_dir": args.silhouette_visualize_dir,
|
||||
"result_export_path": args.result_export_path,
|
||||
"result_export_format": args.result_export_format,
|
||||
"visualize": args.visualize,
|
||||
}
|
||||
if "visualize" in sig.parameters:
|
||||
pipeline_kwargs["visualize"] = args.visualize
|
||||
|
||||
pipeline = ScoliosisPipeline(**pipeline_kwargs)
|
||||
raise SystemExit(pipeline.run())
|
||||
except ValueError as err:
|
||||
|
||||
Reference in New Issue
Block a user