[Bug] Invalid ModelOptions, Preproc and RTSP group options still raise RuntimeError or ValueError with no Neat error code
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 50/100
Línea de trabajo
Start with the listed validation sites in src/model/ModelPack.cpp, src/model/InputPlanner.cpp, src/nodes/groups/RtspDecodedInput.cpp, src/nodes/groups/RtspEncodedInput.cpp, and src/nodes/sima/Preproc.cpp; read docs/reference/error-codes.md for the expected error contract. Reproduce the listed invalid options and trace how existing coded failures are raised in the same paths. Done means each listed refusal raises NeatError with an appropriate misconfig.* code while retaining its current message.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
What happened?
#1437 fixed the cases listed in #1397: three model-managed PreprocOptions checks, the RTSP explicit-caps checks and BoxDecode decoder mismatches. Those now raise NeatError with a misconfig.* code. Other option checks in the same files were not in #1397 and still raise a plain Python RuntimeError or ValueError with error_code unset:
| option | where it fails | exception | thrown at (develop 88f15097) |
|---|---|---|---|
inference_terminal.last_stage_index = 99 |
Model.run |
RuntimeError: Inference terminal policy index out of range: requested=99 infer_size=1 |
src/model/ModelPack.cpp:2892 |
inference_terminal.last_stage_name = "no_such_stage" |
Model.run |
RuntimeError: Inference terminal policy could not resolve terminal stage by name='no_such_stage' ... |
src/model/ModelPack.cpp:2906 |
preprocess.quantization_step = nan |
Model() |
ValueError: preprocess.quantization_step must be finite and positive |
src/model/InputPlanner.cpp:662 |
preprocess.rescale_factor = nan |
Model() |
ValueError: preprocess.rescale_factor must be finite |
src/model/InputPlanner.cpp:659 |
RtspDecodedInputOptions with source_fps = 30, h264_fps = 25 |
groups.rtsp_decoded_input |
ValueError: RtspDecodedInput: source_fps conflicts with h264_fps |
src/nodes/groups/RtspDecodedInput.cpp:30 |
RtspDecodedInputOptions with video_rate_fps = 15, use_videorate = False |
groups.rtsp_decoded_input |
ValueError: RtspDecodedInput: video_rate_fps requires use_videorate=true |
src/nodes/groups/RtspDecodedInput.cpp:89 |
Next to these, other refusals in the same areas do carry a code. decoder_raw_output without caps on the same RTSP group gives misconfig.caps at the factory. BoxDecode thresholds out of range give misconfig.pipeline_shape at the first Model.run.
A wider probe run on 0.7.0+develop.80a7d2108031 found the same for:
inference_terminal.last_plugin_idtypo andlast_processor = "GPU"(RuntimeErroratModel.run,ModelPack.cpp:2918and:2930)preprocess.normalize.stddevcontaining 0,preprocess.resize.shorter_sidewithout Crop, a negativepreprocess.layout_convert.permentry (ValueErroratModel(),InputPlanner.cpp:212,:649,:45)RtspDecodedInputoutput_caps.fpsconflicting withsource_fps, anduse_videoratewith no fps set (ValueErrorat the factory,RtspDecodedInput.cpp:93and:102)- the
RtspEncodedInputsource_fps/h264_fpsconflict (ValueErrorat the factory,RtspEncodedInput.cpp:34) - a typo in a model-managed Preproc
output_dtype(RuntimeError: Preproc: unsupported output_dtype token 'INT9'atpreproc(),src/nodes/sima/Preproc.cpp:253). The same typo on a standalone Preproc givesmisconfig.pipeline_shapeatGraph.build.
docs/reference/error-codes.md says Neat surfaces typed failures through NeatError, each with a stable error code, and tells users not to parse what(). It lists misconfig.option_out_of_range for "An option is invalid for the current input contract."
Expected: each of these is a NeatError with a misconfig.* code, for example misconfig.option_out_of_range, keeping its current message.
How can we reproduce it?
import numpy as np, pyneat
YOLO = "yolov8s_w8a8_mpk.tar.gz"
img = pyneat.Tensor.from_numpy(np.zeros((480, 640, 3), np.uint8), copy=True,
image_format=pyneat.PixelFormat.RGB)
def options():
opt = pyneat.ModelOptions()
opt.preprocess.kind = pyneat.InputKind.Image
opt.preprocess.preset = pyneat.NormalizePreset.COCO_YOLO
return opt
def show(label, f):
try:
f()
print(label, "accepted")
except Exception as e:
print(label, type(e).__name__, getattr(e, "error_code", None), str(e).splitlines()[0][:150])
def terminal(field, value):
opt = options()
term = opt.inference_terminal
setattr(term, field, value)
opt.inference_terminal = term
return lambda: pyneat.Model(YOLO, opt).run([img], timeout_ms=30000)
def preprocess(field, value):
opt = options()
p = opt.preprocess
setattr(p, field, value)
opt.preprocess = p
return lambda: pyneat.Model(YOLO, opt)
def rtsp(**fields):
o = pyneat.RtspDecodedInputOptions()
o.url = "rtsp://127.0.0.1:1/none"
for k, v in fields.items():
setattr(o, k, v)
return lambda: pyneat.groups.rtsp_decoded_input(o)
show("inference_terminal.last_stage_index=99", terminal("last_stage_index", 99))
show("inference_terminal.last_stage_name='no_such_stage'", terminal("last_stage_name", "no_such_stage"))
show("preprocess.quantization_step=nan", preprocess("quantization_step", float("nan")))
show("preprocess.rescale_factor=nan", preprocess("rescale_factor", float("nan")))
show("rtsp source_fps=30 h264_fps=25", rtsp(source_fps=30, h264_fps=25))
show("rtsp video_rate_fps=15 use_videorate=False", rtsp(source_fps=30, video_rate_fps=15, use_videorate=False))
show("model path missing (control, has a code)", lambda: pyneat.Model("/tmp/none_mpk.tar.gz"))
yolov8s_w8a8_mpk.tar.gz is the Model Browser yolov8s w8a8 package. No RTSP server is needed: the group factory refuses the options before connecting.
Environment
- Core
0.7.0+develop.72585178f1d1, PyNeat from the same build. The wider probe run was on0.7.0+develop.80a7d2108031. Line numbers are at develop88f15097. - Modalix DevKit, firmware
3.0.1_master_B2798, Python 3.13.5.
Impact and workaround
Code that handles configuration errors through pyneat.NeatError and error_code, as the error-code page recommends, does not catch these. The messages themselves name the field.
Related: #1397 (closed by #1437), #1398 (standalone Preproc refusals). Open PR #1619 adds new misconfig.caps checks to RtspDecodedInput but does not change the checks above.
- Lenguaje dominante
- C++
- Estrellas
- 7
- Forks
- 1
- Merge medio
- 1 d 10 h
- PR fusionados (30 d)
- 163
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de sima-neat/core
-
documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
sima-neat/core#1724 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
sima-neat/core#1722 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
sima-neat/core#1715 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
sima-neat/core#1712 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
documentation
Dificultad 1/5 Menos de una hora Aptitud para principiantes 83/100
sima-neat/core#1710 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de sima-neat/core
Issues similares
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
Los mantenedores suelen responder en 1 día
-
ColumnDecimal::Append(Int128) stores a value outside the Decimal(P, S) range with no error: cut to 32/64 bits, or with too many digitsPosiblemente ocupada @RUSHIT305 la tomó hoy. Abiertobug data-types
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
ClickHouse/clickhouse-cpp#645 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug compatibility difficulty:easy prio:normal
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
NatronGitHub/openfx-misc#524 ·
Los mantenedores suelen responder en 1 día
-
[内容提案] 现在C++模块的CMake支持有更新,需要进行同步Abiertodocumentation enhancement help wanted P0
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Awesome-Embedded-Learning-Studio/Tutorial_AwesomeModernCPP#359 ·
Los mantenedores suelen responder en 1 día
-
DXF import: INSERT ignores the BLOCK base pointPosiblemente ocupada @Kevinzhou03 la tomó hoy. AbiertoType: Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
openscad/openscad#7360 · 2 comentarios ·
Los mantenedores suelen responder en 1 día