feat: phase 5 industrial grade hardening (ABI safety, security whitelisting, V2 metadata)
这个提交包含在:
@@ -139,6 +139,17 @@ def show_home():
|
||||
</div>
|
||||
""", unsafe_allow_html=True)
|
||||
|
||||
# 环境诊断与建议 (Phase 5)
|
||||
from src.env_detect import get_actionable_suggestions
|
||||
suggestions = get_actionable_suggestions()
|
||||
if suggestions:
|
||||
st.error("⚠️ 检测到环境瓶颈")
|
||||
for sug in suggestions:
|
||||
with st.expander(f"🛠️ {sug['target']} - {sug['reason']}"):
|
||||
st.code(sug['fix'], language="bash")
|
||||
else:
|
||||
st.success("✨ 系统环境全量兼容 (v2.0.4)")
|
||||
|
||||
col1, col2 = st.columns(2)
|
||||
with col1:
|
||||
st.subheader("🚀 核心能力")
|
||||
@@ -355,7 +366,14 @@ def show_scheduling():
|
||||
|
||||
if uploaded_file and st.session_state.pipeline:
|
||||
data = np.load(uploaded_file)
|
||||
wsd = WaterSoundData(raw_data=data, sample_rate=float(sample_rate))
|
||||
wsd = WaterSoundData(
|
||||
raw_data=data,
|
||||
sample_rate=float(sample_rate),
|
||||
sample_rate_unit="Hz",
|
||||
channel_layout="time_first",
|
||||
coordinate_system="WGS84",
|
||||
collect_time=datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
||||
)
|
||||
|
||||
# 自动映射 (Phase 2 简化版:直接使用元数据中的映射)
|
||||
scheduler = CoreScheduler()
|
||||
@@ -410,7 +428,7 @@ def show_scheduling():
|
||||
in_map,
|
||||
out_map,
|
||||
preprocessing=preprocessing,
|
||||
requirements=algo.get("inputs") or {},
|
||||
requirements=algo.get("inputs") or {}, # 包含 argtypes/restype 如果在 JSON 中定义
|
||||
output_specs=algo.get("outputs") or {},
|
||||
)
|
||||
elif algo_type == "matlab":
|
||||
@@ -478,7 +496,14 @@ def show_sea_trial():
|
||||
|
||||
if uploaded_file:
|
||||
data = np.load(uploaded_file)
|
||||
wsd = WaterSoundData(raw_data=data, sample_rate=float(sample_rate))
|
||||
wsd = WaterSoundData(
|
||||
raw_data=data,
|
||||
sample_rate=float(sample_rate),
|
||||
sample_rate_unit="Hz",
|
||||
channel_layout="time_first",
|
||||
coordinate_system="WGS84",
|
||||
collect_time=datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
||||
)
|
||||
|
||||
# 预设模板执行
|
||||
if st.button("开始一键巡检"):
|
||||
|
||||
在新工单中引用
屏蔽一个用户