TE Curve Verification Pipeline Familywise ONNX Report
Build familywise ONNX TE Curve Verification Pipeline reports.
- class scripts.reports.analysis.build_track2_familywise_onnx_report.ExportedModelEntry(dataset_id, input_mode, model_family, model_type, surface, run_name, run_instance_id, dataset_schema, onnx_model_path, python_model_path, training_config_path, source_output_directory, source_best_checkpoint_path, source_inventory_path)[source]
Store one exported ONNX model entry from a model inventory.
- Parameters:
dataset_id (str)
input_mode (str)
model_family (str)
model_type (str)
surface (str)
run_name (str)
run_instance_id (str)
dataset_schema (str)
onnx_model_path (Path)
python_model_path (Path)
training_config_path (Path)
source_output_directory (str)
source_best_checkpoint_path (str)
source_inventory_path (Path)
- dataset_id
Dataset identifier used by the source run.
- Type:
str
- input_mode
Input-mode contract used by the source run.
- Type:
str
- model_family
Base family requested by the report.
- Type:
str
- model_type
Training/export model type.
- Type:
str
- surface
Model surface, either
forward,backward, orglobal.- Type:
str
- run_name
Logical training run name.
- Type:
str
- run_instance_id
Immutable source run instance identifier.
- Type:
str
- dataset_schema
Dataset schema stored in the export inventory.
- Type:
str
- onnx_model_path
Project-resolved ONNX model path.
- Type:
pathlib.Path
- python_model_path
Project-resolved Python model path.
- Type:
pathlib.Path
- training_config_path
Project-resolved source-run training config path.
- Type:
pathlib.Path
- source_output_directory
Project-relative source output directory.
- Type:
str
- source_best_checkpoint_path
Project-relative source model path.
- Type:
str
- source_inventory_path
Project-resolved export inventory path.
- Type:
pathlib.Path
- class scripts.reports.analysis.build_track2_familywise_onnx_report.CurveEvaluationEntry(group_id, surface, dataset_index, source_file_path, direction_label, speed_rpm, torque_nm, oil_temperature_deg, angular_position_deg, target_curve_deg, prediction_curve_deg, plot_measured_angular_position_deg, plot_measured_curve_deg, plot_prediction_angular_position_deg, plot_prediction_curve_deg, metrics)[source]
Store one evaluated test curve and prediction payload.
- Parameters:
group_id (str)
surface (str)
dataset_index (int)
source_file_path (str)
direction_label (str)
speed_rpm (float)
torque_nm (float)
oil_temperature_deg (float)
angular_position_deg (ndarray)
target_curve_deg (ndarray)
prediction_curve_deg (ndarray)
plot_measured_angular_position_deg (ndarray)
plot_measured_curve_deg (ndarray)
plot_prediction_angular_position_deg (ndarray)
plot_prediction_curve_deg (ndarray)
metrics (dict[str, float])
- scripts.reports.analysis.build_track2_familywise_onnx_report.build_argument_parser()[source]
Build command-line arguments for the familywise report.
- Return type:
ArgumentParser
- scripts.reports.analysis.build_track2_familywise_onnx_report.parse_command_line_arguments()[source]
Parse command-line arguments.
- Return type:
Namespace
- scripts.reports.analysis.build_track2_familywise_onnx_report.load_yaml_dictionary(path_value)[source]
Load one YAML dictionary from disk.
- Parameters:
path_value (Path)
- Return type:
dict[str, Any]
- scripts.reports.analysis.build_track2_familywise_onnx_report.save_yaml_dictionary(path_value, payload)[source]
Save one YAML dictionary to disk.
- Parameters:
path_value (Path)
payload (dict[str, Any])
- Return type:
None
- scripts.reports.analysis.build_track2_familywise_onnx_report.format_project_path(path_value)[source]
Return a stable project-relative path string.
- Parameters:
path_value (str | Path)
- Return type:
str
- scripts.reports.analysis.build_track2_familywise_onnx_report.resolve_project_path(path_value)[source]
Resolve a repository-relative or absolute path.
- Parameters:
path_value (str | Path)
- Return type:
Path
- scripts.reports.analysis.build_track2_familywise_onnx_report.parse_group_specification(group_specification)[source]
Parse one dataset/input-mode group specification.
- Parameters:
group_specification (str)
- Return type:
tuple[str, str]
- scripts.reports.analysis.build_track2_familywise_onnx_report.resolve_inventory_path(dataset_id, input_mode)[source]
Resolve the exported model-development inventory for one group.
- Parameters:
dataset_id (str)
input_mode (str)
- Return type:
Path
- scripts.reports.analysis.build_track2_familywise_onnx_report.normalize_surface_name(surface_name)[source]
Normalize inventory and report surface labels.
- Parameters:
surface_name (str)
- Return type:
str
- scripts.reports.analysis.build_track2_familywise_onnx_report.load_group_model_entries(dataset_id, input_mode, model_family)[source]
Load and validate exported model entries for one dataset/input-mode group.
- Parameters:
dataset_id (str)
input_mode (str)
model_family (str)
- Return type:
dict[str, ExportedModelEntry]
- scripts.reports.analysis.build_track2_familywise_onnx_report.load_test_dataset(model_entry)[source]
Build the source-run test dataset for one exported model.
- Parameters:
model_entry (ExportedModelEntry)
- scripts.reports.analysis.build_track2_familywise_onnx_report.compute_curve_metrics(target_curve_deg, prediction_curve_deg)[source]
Compute TE curve metrics for one prediction.
- Parameters:
target_curve_deg (ndarray)
prediction_curve_deg (ndarray)
- Return type:
dict[str, float]
- scripts.reports.analysis.build_track2_familywise_onnx_report.average_metric_dictionary(metric_dictionary_list)[source]
Average curve-level metrics for one model.
- Parameters:
metric_dictionary_list (list[dict[str, float]])
- Return type:
dict[str, float]
- scripts.reports.analysis.build_track2_familywise_onnx_report.load_onnx_session(model_entry, provider_list)[source]
Load one ONNX Runtime session.
- Parameters:
model_entry (ExportedModelEntry)
provider_list (list[str])
- Return type:
onnxruntime.InferenceSession
- scripts.reports.analysis.build_track2_familywise_onnx_report.resolve_static_onnx_dimension(dimension_value)[source]
Return an ONNX dimension when it is a concrete integer.
- Parameters:
dimension_value (Any)
- Return type:
int | None
- scripts.reports.analysis.build_track2_familywise_onnx_report.build_temporal_sequence_window_view(padded_feature_matrix, sequence_length)[source]
Build a vectorized temporal sequence-window view.
- Parameters:
padded_feature_matrix (ndarray)
sequence_length (int)
- Return type:
ndarray
- scripts.reports.analysis.build_track2_familywise_onnx_report.predict_rank2_curve(session, input_feature_matrix)[source]
Predict one pointwise TE curve with a rank-2 ONNX input.
- Parameters:
session (onnxruntime.InferenceSession)
input_feature_matrix (ndarray)
- Return type:
ndarray
- scripts.reports.analysis.build_track2_familywise_onnx_report.predict_rank3_curve(session, input_feature_matrix, training_config)[source]
Predict one full TE curve for a temporal rank-3 ONNX input.
- Parameters:
session (onnxruntime.InferenceSession)
input_feature_matrix (ndarray)
training_config (dict[str, Any])
- Return type:
ndarray
- scripts.reports.analysis.build_track2_familywise_onnx_report.predict_curve(session, input_feature_matrix, training_config)[source]
Predict one TE curve with an ONNX Runtime session.
- Parameters:
session (onnxruntime.InferenceSession)
input_feature_matrix (ndarray)
training_config (dict[str, Any])
- Return type:
ndarray
- scripts.reports.analysis.build_track2_familywise_onnx_report.select_deterministic_prediction_curve(raw_prediction_curve_deg, target_curve_deg, training_config, mdn_playback_channel)[source]
Select the deterministic playback channel from multi-output predictions.
- Parameters:
raw_prediction_curve_deg (ndarray)
target_curve_deg (ndarray)
training_config (dict[str, Any])
mdn_playback_channel (str)
- Return type:
ndarray
- scripts.reports.analysis.build_track2_familywise_onnx_report.build_model_input_payload(curve_sample, session, training_config)[source]
Build input, target, and angular-position arrays for one model contract.
- Parameters:
curve_sample (dict[str, Any])
session (onnxruntime.InferenceSession)
training_config (dict[str, Any])
- Return type:
tuple[ndarray, ndarray, ndarray]
- scripts.reports.analysis.build_track2_familywise_onnx_report.build_plot_payload(curve_sample, prediction_curve_deg, prediction_angular_position_deg)[source]
Build full measured and model-aligned prediction arrays for plotting.
- Parameters:
curve_sample (dict[str, Any])
prediction_curve_deg (ndarray)
prediction_angular_position_deg (ndarray)
- Return type:
tuple[ndarray, ndarray, ndarray, ndarray]
- scripts.reports.analysis.build_track2_familywise_onnx_report.surface_accepts_direction(surface_name, direction_label)[source]
Return whether one model surface should evaluate one direction.
- Parameters:
surface_name (str)
direction_label (str)
- Return type:
bool
- scripts.reports.analysis.build_track2_familywise_onnx_report.evaluate_model_entry(group_id, model_entry, provider_list, mdn_playback_channel)[source]
Evaluate one exported ONNX model over its valid test curves.
- Parameters:
group_id (str)
model_entry (ExportedModelEntry)
provider_list (list[str])
mdn_playback_channel (str)
- Return type:
tuple[list[CurveEvaluationEntry], dict[str, float], dict[str, Any]]
- scripts.reports.analysis.build_track2_familywise_onnx_report.select_representative_curve_entries(curve_entry_list, curves_per_page)[source]
Select deterministic representative curves for one collage page.
- Parameters:
curve_entry_list (list[CurveEvaluationEntry])
curves_per_page (int)
- Return type:
list[CurveEvaluationEntry]
- scripts.reports.analysis.build_track2_familywise_onnx_report.save_surface_collage(collage_path, title_text, selected_curve_entry_list)[source]
Save one measured-versus-predicted curve collage.
- Parameters:
collage_path (Path)
title_text (str)
selected_curve_entry_list (list[CurveEvaluationEntry])
- Return type:
None
- scripts.reports.analysis.build_track2_familywise_onnx_report.save_model_inventory_csv(csv_path, model_entry_list)[source]
Save the model inventory used by the report.
- Parameters:
csv_path (Path)
model_entry_list (list[ExportedModelEntry])
- Return type:
None
- scripts.reports.analysis.build_track2_familywise_onnx_report.save_per_curve_metrics_csv(csv_path, curve_summary_list)[source]
Save one per-curve metric table.
- Parameters:
csv_path (Path)
curve_summary_list (list[dict[str, Any]])
- Return type:
None
- scripts.reports.analysis.build_track2_familywise_onnx_report.build_relative_markdown_path(target_path, markdown_directory)[source]
Build a Markdown-safe relative path.
- Parameters:
target_path (Path)
markdown_directory (Path)
- Return type:
str
- scripts.reports.analysis.build_track2_familywise_onnx_report.append_model_inventory_table(report_line_list, model_summary_list)[source]
Append a compact model inventory table to the report.
- Parameters:
report_line_list (list[str])
model_summary_list (list[dict[str, Any]])
- Return type:
None
- scripts.reports.analysis.build_track2_familywise_onnx_report.append_metric_table(report_line_list, model_summary_list)[source]
Append the aggregate metrics table.
- Parameters:
report_line_list (list[str])
model_summary_list (list[dict[str, Any]])
- Return type:
None
- scripts.reports.analysis.build_track2_familywise_onnx_report.build_report_markdown(report_path, model_family, group_summary_list, summary_path, model_inventory_csv_path, per_curve_metrics_csv_path, output_directory, curves_per_page, mdn_playback_channel)[source]
Build the Markdown report body.
- Parameters:
report_path (Path)
model_family (str)
group_summary_list (list[dict[str, Any]])
summary_path (Path)
model_inventory_csv_path (Path)
per_curve_metrics_csv_path (Path)
output_directory (Path)
curves_per_page (int)
mdn_playback_channel (str)
- Return type:
str