Defining Vectorizable Helper Function given Posterior Draws (Forecasting with BVAR)

Hmmm, similar error out, i’m going through numba right now-apologies again I have not used this package before.

again I appreciate your help!

TypingError: Failed in nopython mode pipeline (step: nopython frontend)
Failed in nopython mode pipeline (step: nopython frontend)
Failed in nopython mode pipeline (step: nopython frontend)
No implementation of function Function(<function numba_funcify_Elemwise.<locals>.elemwise at 0x00000173031034C0>) found for signature:
 
elemwise(float64, readonly array(float64, 0d, C), array(float64, 0d, C))
 
There are 2 candidate implementations:
  - Of which 2 did not match due to:
  Overload in function 'numba_funcify_Elemwise.<locals>.ov_elemwise': File: pytensor\link\numba\dispatch\elemwise.py: Line 541.
    With argument(s): '(float64, readonly array(float64, 0d, C), array(float64, 0d, C))':
   Rejected as the implementation raised a specific error:
     TypingError: Failed in nopython mode pipeline (step: nopython frontend)
   No implementation of function Function(<intrinsic _vectorized>) found for signature:
    
_vectorized(type(CPUDispatcher(<function store_core_outputs at 0x00000173031267A0>)), Literal[str](gASVBgAAAAAAAAApKSmHlC4=
   ), Literal[str](gASVBAAAAAAAAAAphZQu
   ), Literal[str](gASVDQAAAAAAAACMB2Zsb2F0NjSUhZQu
   ), Literal[str](gASVCQAAAAAAAABLAEsAhpSFlC4=
   ), Tuple(), StarArgTuple(float64, readonly array(float64, 0d, C), array(float64, 0d, C)), UniTuple(Tuple() x 1), none)
    
   There are 2 candidate implementations:
         - Of which 1 did not match due to:
         Intrinsic in function '_vectorized': File: pytensor\link\numba\dispatch\vectorize_codegen.py: Line 74.
           With argument(s): '(type(CPUDispatcher(<function store_core_outputs at 0x00000173031267A0>)), Literal[str](gASVBgAAAAAAAAApKSmHlC4=
         ), Literal[str](gASVBAAAAAAAAAAphZQu
         ), Literal[str](gASVDQAAAAAAAACMB2Zsb2F0NjSUhZQu
         ), Literal[str](gASVCQAAAAAAAABLAEsAhpSFlC4=
         ), Tuple(), StarArgTuple(float64, readonly array(float64, 0d, C), array(float64, 0d, C)), UniTuple(Tuple() x 1), none)':
          Rejected as the implementation raised a specific error:
            TypingError: Vectorized inputs must be arrays.
     raised from C:\Users\broth\Anaconda3\envs\pymc_env\Lib\site-packages\pytensor\link\numba\dispatch\vectorize_codegen.py:130
         - Of which 1 did not match due to:
         Intrinsic in function '_vectorized': File: pytensor\link\numba\dispatch\vectorize_codegen.py: Line 74.
           With argument(s): '(type(CPUDispatcher(<function store_core_outputs at 0x00000173031267A0>)), unicode_type, unicode_type, unicode_type, unicode_type, Tuple(), StarArgTuple(float64, readonly array(float64, 0d, C), array(float64, 0d, C)), UniTuple(Tuple() x 1), none)':
          Rejected as the implementation raised a specific error:
            TypingError: input_bc_patterns must be literal.
     raised from C:\Users\broth\Anaconda3\envs\pymc_env\Lib\site-packages\pytensor\link\numba\dispatch\vectorize_codegen.py:100
   
   During: resolving callee type: Function(<intrinsic _vectorized>)
   During: typing of call at C:\Users\broth\Anaconda3\envs\pymc_env\Lib\site-packages\pytensor\link\numba\dispatch\elemwise.py (501)
   
   
   File "..\Anaconda3\envs\pymc_env\Lib\site-packages\pytensor\link\numba\dispatch\elemwise.py", line 501:
       def elemwise_wrapper(*inputs):
           return _vectorized(
           ^

  raised from C:\Users\broth\Anaconda3\envs\pymc_env\Lib\site-packages\numba\core\typeinfer.py:1091

During: resolving callee type: Function(<function numba_funcify_Elemwise.<locals>.elemwise at 0x00000173031034C0>)
During: typing of call at C:\Users\broth\AppData\Local\Temp\tmpu1e9orlz (79)


File "..\AppData\Local\Temp\tmpu1e9orlz", line 79:
def numba_funcified_fgraph(nominal_tensor_variable, nominal_tensor_variable_2, nominal_tensor_variable_1, nominal_tensor_variable_6, nominal_tensor_variable_3, nominal_tensor_variable_4, nominal_tensor_variable_7, nominal_tensor_variable_5):
    <source elided>
    # Composite{(i1 + log(i0) + i2)}(Det.0, 1.8378770664093453, dot.0)
    tensor_variable_38 = elemwise_4(tensor_variable_29, tensor_constant_9, tensor_variable_33)
    ^

During: resolving callee type: type(CPUDispatcher(<function numba_funcified_fgraph at 0x00000173028D98A0>))
During: typing of call at C:\Users\broth\AppData\Local\Temp\tmpzmw16avz (30)

During: resolving callee type: type(CPUDispatcher(<function numba_funcified_fgraph at 0x00000173028D98A0>))
During: typing of call at C:\Users\broth\AppData\Local\Temp\tmpzmw16avz (30)

During: resolving callee type: type(CPUDispatcher(<function numba_funcified_fgraph at 0x00000173028D98A0>))
During: typing of call at C:\Users\broth\AppData\Local\Temp\tmpzmw16avz (30)


File "..\AppData\Local\Temp\tmpzmw16avz", line 30:
def scan(n_steps, outer_in_1, outer_in_2, outer_in_3, outer_in_4, outer_in_5, outer_in_6, outer_in_7, outer_in_8, outer_in_9, outer_in_10, outer_in_11, outer_in_12, outer_in_13):
    <source elided>

        (inner_out_0, inner_out_1, inner_out_2, inner_out_3, inner_out_4, inner_out_5, inner_out_6) = scan_inner_func(np.asarray(outer_in_1[i]), np.asarray(outer_in_2[i]), np.asarray(outer_in_3[i]), np.asarray(outer_in_4_sitsot_storage[(i) % outer_in_4_len]), np.asarray(outer_in_5_sitsot_storage[(i) % outer_in_5_len]), outer_in_11, outer_in_12, outer_in_13)
        ^

During: resolving callee type: type(CPUDispatcher(<function scan at 0x00000173030CA520>))
During: typing of call at C:\Users\broth\AppData\Local\Temp\tmp0xzb18i5 (401)

During: resolving callee type: type(CPUDispatcher(<function scan at 0x00000173030CA520>))
During: typing of call at C:\Users\broth\AppData\Local\Temp\tmp0xzb18i5 (401)


File "..\AppData\Local\Temp\tmp0xzb18i5", line 401:
def numba_funcified_fgraph(_unconstrained_point, data):
    <source elided>
    # Scan{forward_kalman_pass, while_loop=False, inplace=all}(Shape_i{0}.0, Composite{...}.0, Composite{...}.1, data, SetSubtensor{:stop}.0, SetSubtensor{:stop}.0, Composite{...}.0, Composite{...}.0, Composite{...}.0, Composite{...}.0, Shape_i{0}.0, DropDims{axis=0}.0, Composite{(0.5 * (i0 + i1))}.0, DimShuffle{order=[2,1]}.0)
    tensor_variable_237, tensor_variable_238, tensor_variable_239, tensor_variable_240, tensor_variable_241, tensor_variable_242, loglike_obs = scan(tensor_variable_6, tensor_variable_7, tensor_variable_8, data, tensor_variable_222, tensor_variable_223, tensor_variable_124, tensor_variable_116, tensor_variable_108, tensor_variable_100, tensor_variable_6, tensor_variable_55, tensor_variable_225, tensor_variable_54)
    ^

During: resolving callee type: type(CPUDispatcher(<function numba_funcified_fgraph at 0x00000173064C4A40>))
During: typing of call at C:\Users\broth\Anaconda3\envs\pymc_env\Lib\site-packages\nutpie\compile_pymc.py (448)

During: resolving callee type: type(CPUDispatcher(<function numba_funcified_fgraph at 0x00000173064C4A40>))
During: typing of call at C:\Users\broth\Anaconda3\envs\pymc_env\Lib\site-packages\nutpie\compile_pymc.py (448)

During: resolving callee type: type(CPUDispatcher(<function numba_funcified_fgraph at 0x00000173064C4A40>))
During: typing of call at C:\Users\broth\Anaconda3\envs\pymc_env\Lib\site-packages\nutpie\compile_pymc.py (448)

During: resolving callee type: type(CPUDispatcher(<function numba_funcified_fgraph at 0x00000173064C4A40>))
During: typing of call at C:\Users\broth\Anaconda3\envs\pymc_env\Lib\site-packages\nutpie\compile_pymc.py (448)

During: resolving callee type: type(CPUDispatcher(<function numba_funcified_fgraph at 0x00000173064C4A40>))
During: typing of call at C:\Users\broth\Anaconda3\envs\pymc_env\Lib\site-packages\nutpie\compile_pymc.py (448)

During: resolving callee type: type(CPUDispatcher(<function numba_funcified_fgraph at 0x00000173064C4A40>))
During: typing of call at C:\Users\broth\Anaconda3\envs\pymc_env\Lib\site-packages\nutpie\compile_pymc.py (448)```