Closed joelchen closed 1 year ago
Removing async does not resolve this issue:
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /Users/joelchen/.cargo/git/checkouts/tangram-cb663c32440b0d24/443190a/crates/core/predict.rs:977:71
stack backtrace:
0: 0x1005537b4 - std::backtrace_rs::backtrace::libunwind::trace::h449592924b3bd63f
at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
1: 0x1005537b4 - std::backtrace_rs::backtrace::trace_unsynchronized::ha2aaeafed0c31c90
at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
2: 0x1005537b4 - std::sys_common::backtrace::_print_fmt::h58db85a17304976f
at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys_common/backtrace.rs:66:5
3: 0x1005537b4 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h10cf06316d33e2a9
at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys_common/backtrace.rs:45:22
4: 0x100570400 - core::fmt::write::h1faf18c959c3a8df
at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/fmt/mod.rs:1190:17
5: 0x10054dbd0 - std::io::Write::write_fmt::h86ab231360bc97d2
at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/io/mod.rs:1657:15
6: 0x100555bd4 - std::sys_common::backtrace::_print::h771b4aab9b128422
at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys_common/backtrace.rs:48:5
7: 0x100555bd4 - std::sys_common::backtrace::print::h637de99a9f76e8a7
at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys_common/backtrace.rs:35:9
8: 0x100555bd4 - std::panicking::default_hook::{{closure}}::h36e628ffaf3cd44f
at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:295:22
9: 0x10055584c - std::panicking::default_hook::h3ee1564a7544e58f
at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:314:9
10: 0x100556234 - std::panicking::rust_panic_with_hook::h191339fbd2fe2360
at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:698:17
11: 0x100555f84 - std::panicking::begin_panic_handler::{{closure}}::h91c230befd9929e3
at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:586:13
12: 0x100553c9c - std::sys_common::backtrace::__rust_end_short_backtrace::haaaeebb1d37476b3
at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys_common/backtrace.rs:138:18
13: 0x100555cf8 - rust_begin_unwind
at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:584:5
14: 0x1005861a8 - core::panicking::panic_fmt::h4fe1013b011ef602
at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/panicking.rs:143:14
15: 0x1005860c4 - core::panicking::panic::he60bb304466ccbaf
at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/panicking.rs:48:5
16: 0x10031b9a8 - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &mut F>::call_once::h5d7b5ec3ed46c84a
17: 0x10030295c - <alloc::vec::Vec<T> as alloc::vec::spec_from_iter::SpecFromIter<T,I>>::from_iter::hba64e4f67e876890
18: 0x100317fe4 - modelfox_core::predict::predict::h85cadbfd39ca5d40
19: 0x10021f4c8 - modelfox::Model<Input,Output>::predict_one::h6c9862339072c977
20: 0x100208670 - application::Application::predict::h048350696a1eea7d
21: 0x10020b3ec - application::main::h074bf85d067cff82
22: 0x1002f10ec - std::sys_common::backtrace::__rust_begin_short_backtrace::hb061c91a98b4a8fb
23: 0x1002ea07c - std::rt::lang_start::{{closure}}::hc777d8a057c4991c
24: 0x100553060 - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h8eb3ac20f80eabfa
at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/ops/function.rs:259:13
25: 0x100553060 - std::panicking::try::do_call::ha6ddf2c638427188
at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:492:40
26: 0x100553060 - std::panicking::try::hda8741de507c1ad0
at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:456:19
27: 0x100553060 - std::panic::catch_unwind::h82424a01f258bd39
at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panic.rs:137:14
28: 0x100553060 - std::rt::lang_start_internal::{{closure}}::h67e296ed5b030b7b
at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/rt.rs:128:48
29: 0x100553060 - std::panicking::try::do_call::hd3dd7e7e10f6424e
at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:492:40
30: 0x100553060 - std::panicking::try::ha0a7bd8122e3fb7c
at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:456:19
31: 0x100553060 - std::panic::catch_unwind::h809b0e1092e9475d
at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panic.rs:137:14
32: 0x100553060 - std::rt::lang_start_internal::h358b6d58e23c88c7
at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/rt.rs:128:20
33: 0x10021e6b4 - _main
It happened again using the latest main branch:
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /Users/joelchen/.cargo/git/checkouts/modelfox-e35e97cb1dd1c244/8e7bd80/crates/core/predict.rs:977:54
Feature value is INFINITY.
@joelchen Do you have any information on how you were able to produce an infinite feature value? In general, this should not possible.
@nitsky My calculations for some of the feature values of type f64 somehow yielded INFINITY, so I assigned zero to the feature value if it is INFINITY. ModelFox may put a guard for NAN and INFINITY instead.
Happened in one of my applications: