Using pm.CustomDist and got error:TypeError: rv_op() got an unexpected keyword argument 'mu'

oh! now I see, thank you so much, it worked.

here is one more thing, i try to do the sampling, but it failed and says:
Some of the observed values of variable likelihood are associated with a non-finite logp: here is the full error, it is a bit long: :sweat_smile:


point={'L_R_mu_interval__': array([0.]), 'L_R_sigma_interval__': array([0.]), 'mu_mean_base': array([0., 0.]), 'mu_sd_base_log__': array([0., 0.]), 'sigma_mean_base': array([0., 0.]), 'sigma_sd_base_log__': array([0., 0.]), 'mu_mean_delta': array([0., 0.]), 'mu_sd_delta_log__': array([0., 0.]), 'sigma_mean_delta': array([0., 0.]), 'sigma_sd_delta_log__': array([0., 0.]), 'ndt_mean': array([0., 0.]), 'ndt_sigma': array([0., 0.]), 'mu_i_base_pr': array([[0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.]]), 'sigma_i_base_pr': array([[0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.]]), 'mu_i_delta_pr': array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
        0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
        0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
       [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
        0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
        0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]), 'sigma_i_delta_pr': array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
        0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
        0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
       [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
        0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
        0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]), 'ndt_i_pr': array([[0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.],
       [0., 0.]])}

The variable likelihood has the following parameters:
0: [45120] [id A] <Vector(int64, shape=(1,))>
1: AdvancedSubtensor [id B] <Vector(float64, shape=(?,))>
 β”œβ”€ Join [id C] <Tensor3(float64, shape=(2, 47, 2))> 'mu'
 β”‚  β”œβ”€ 0 [id D] <Scalar(int8, shape=())>
 β”‚  β”œβ”€ Add [id E] <Tensor3(float64, shape=(1, 47, 2))>
 β”‚  β”‚  β”œβ”€ ExpandDims{axes=[0, 1]} [id F] <Tensor3(float64, shape=(1, 1, 2))>
 β”‚  β”‚  β”‚  └─ mu_mean_base [id G] <Vector(float64, shape=(2,))>
 β”‚  β”‚  └─ ExpandDims{axis=0} [id H] <Tensor3(float64, shape=(1, 47, 2))>
 β”‚  β”‚     └─ Mul [id I] <Matrix(float64, shape=(47, 2))>
 β”‚  β”‚        β”œβ”€ Exp [id J] <Matrix(float64, shape=(1, 2))>
 β”‚  β”‚        β”‚  └─ ExpandDims{axis=0} [id K] <Matrix(float64, shape=(1, 2))>
 β”‚  β”‚        β”‚     └─ mu_sd_base_log__ [id L] <Vector(float64, shape=(2,))>
 β”‚  β”‚        └─ mu_i_base_pr [id M] <Matrix(float64, shape=(47, 2))>
 β”‚  └─ Add [id N] <Tensor3(float64, shape=(1, 47, 2))>
 β”‚     β”œβ”€ ExpandDims{axes=[0, 1]} [id O] <Tensor3(float64, shape=(1, 1, 2))>
 β”‚     β”‚  └─ mu_mean_base [id G] <Vector(float64, shape=(2,))>
 β”‚     β”œβ”€ ExpandDims{axis=0} [id P] <Tensor3(float64, shape=(1, 47, 2))>
 β”‚     β”‚  └─ Mul [id I] <Matrix(float64, shape=(47, 2))>
 β”‚     β”‚     └─ Β·Β·Β·
 β”‚     β”œβ”€ ExpandDims{axes=[0, 1]} [id Q] <Tensor3(float64, shape=(1, 1, 2))>
 β”‚     β”‚  └─ mu_mean_delta [id R] <Vector(float64, shape=(2,))>
 β”‚     └─ DimShuffle{order=[x,1,0]} [id S] <Tensor3(float64, shape=(1, 47, ?))>
 β”‚        └─ Dot22 [id T] <Matrix(float64, shape=(?, 47))> 'mu_i_delta_tilde'
 β”‚           β”œβ”€ Dot22 [id U] <Matrix(float64, shape=(?, ?))> 'L_S_mu'
 β”‚           β”‚  β”œβ”€ AllocDiag{offset=0, axis1=0, axis2=1} [id V] <Matrix(float64, shape=(?, ?))>
 β”‚           β”‚  β”‚  └─ Exp [id W] <Vector(float64, shape=(2,))> 'mu_sd_delta'
 β”‚           β”‚  β”‚     └─ mu_sd_delta_log__ [id X] <Vector(float64, shape=(2,))>
 β”‚           β”‚  └─ Cholesky{lower=True, destructive=False, on_error='raise'} [id Y] <Matrix(float64, shape=(?, ?))>
 β”‚           β”‚     └─ Add [id Z] <Matrix(float64, shape=(?, ?))>
 β”‚           β”‚        β”œβ”€ [[1. 0.]
 [0. 1.]] [id BA] <Matrix(float64, shape=(2, 2))>
 β”‚           β”‚        β”œβ”€ AdvancedSetSubtensor [id BB] <Matrix(float64, shape=(?, ?))>
 β”‚           β”‚        β”‚  β”œβ”€ Alloc [id BC] <Matrix(float64, shape=(2, 2))>
 β”‚           β”‚        β”‚  β”‚  β”œβ”€ 0.0 [id BD] <Scalar(float64, shape=())>
 β”‚           β”‚        β”‚  β”‚  β”œβ”€ 2 [id BE] <Scalar(int8, shape=())>
 β”‚           β”‚        β”‚  β”‚  └─ 2 [id BE] <Scalar(int8, shape=())>
 β”‚           β”‚        β”‚  β”œβ”€ Sub [id BF] <Vector(float64, shape=(1,))> 'L_R_mu'
 β”‚           β”‚        β”‚  β”‚  β”œβ”€ Sigmoid [id BG] <Vector(float64, shape=(1,))>
 β”‚           β”‚        β”‚  β”‚  β”‚  └─ L_R_mu_interval__ [id BH] <Vector(float64, shape=(1,))>
 β”‚           β”‚        β”‚  β”‚  └─ Sub [id BI] <Vector(float64, shape=(1,))>
 β”‚           β”‚        β”‚  β”‚     β”œβ”€ [1.] [id BJ] <Vector(float64, shape=(1,))>
 β”‚           β”‚        β”‚  β”‚     └─ Sigmoid [id BG] <Vector(float64, shape=(1,))>
 β”‚           β”‚        β”‚  β”‚        └─ Β·Β·Β·
 β”‚           β”‚        β”‚  β”œβ”€ [0] [id BK] <Vector(uint8, shape=(1,))>
 β”‚           β”‚        β”‚  └─ [1] [id BL] <Vector(uint8, shape=(1,))>
 β”‚           β”‚        └─ Transpose{axes=[1, 0]} [id BM] <Matrix(float64, shape=(?, ?))>
 β”‚           β”‚           └─ AdvancedSetSubtensor [id BB] <Matrix(float64, shape=(?, ?))>
 β”‚           β”‚              └─ Β·Β·Β·
 β”‚           └─ mu_i_delta_pr [id BN] <Matrix(float64, shape=(2, 47))>
 β”œβ”€ cond_idx [id BO] <Vector(int32, shape=(?,))>
 β”œβ”€ subj_idx [id BP] <Vector(int32, shape=(?,))>
 └─ time_idx [id BQ] <Vector(int32, shape=(?,))>
2: AdvancedSubtensor [id BR] <Vector(float64, shape=(?,))>
 β”œβ”€ Exp [id BS] <Tensor3(float64, shape=(2, 47, 2))> 'sigma'
 β”‚  └─ Join [id BT] <Tensor3(float64, shape=(2, 47, 2))> 'sigma_stack'
 β”‚     β”œβ”€ 0 [id D] <Scalar(int8, shape=())>
 β”‚     β”œβ”€ Add [id BU] <Tensor3(float64, shape=(1, 47, 2))>
 β”‚     β”‚  β”œβ”€ ExpandDims{axes=[0, 1]} [id BV] <Tensor3(float64, shape=(1, 1, 2))>
 β”‚     β”‚  β”‚  └─ sigma_mean_base [id BW] <Vector(float64, shape=(2,))>
 β”‚     β”‚  └─ ExpandDims{axis=0} [id BX] <Tensor3(float64, shape=(1, 47, 2))>
 β”‚     β”‚     └─ Mul [id BY] <Matrix(float64, shape=(47, 2))>
 β”‚     β”‚        β”œβ”€ Exp [id BZ] <Matrix(float64, shape=(1, 2))>
 β”‚     β”‚        β”‚  └─ ExpandDims{axis=0} [id CA] <Matrix(float64, shape=(1, 2))>
 β”‚     β”‚        β”‚     └─ sigma_sd_base_log__ [id CB] <Vector(float64, shape=(2,))>
 β”‚     β”‚        └─ sigma_i_base_pr [id CC] <Matrix(float64, shape=(47, 2))>
 β”‚     └─ Add [id CD] <Tensor3(float64, shape=(1, 47, 2))>
 β”‚        β”œβ”€ ExpandDims{axes=[0, 1]} [id CE] <Tensor3(float64, shape=(1, 1, 2))>
 β”‚        β”‚  └─ sigma_mean_base [id BW] <Vector(float64, shape=(2,))>
 β”‚        β”œβ”€ ExpandDims{axis=0} [id CF] <Tensor3(float64, shape=(1, 47, 2))>
 β”‚        β”‚  └─ Mul [id BY] <Matrix(float64, shape=(47, 2))>
 β”‚        β”‚     └─ Β·Β·Β·
 β”‚        β”œβ”€ ExpandDims{axes=[0, 1]} [id CG] <Tensor3(float64, shape=(1, 1, 2))>
 β”‚        β”‚  └─ sigma_mean_delta [id CH] <Vector(float64, shape=(2,))>
 β”‚        └─ DimShuffle{order=[x,1,0]} [id CI] <Tensor3(float64, shape=(1, 47, ?))>
 β”‚           └─ Dot22 [id CJ] <Matrix(float64, shape=(?, 47))> 'sigma_i_delta_tilde'
 β”‚              β”œβ”€ Dot22 [id CK] <Matrix(float64, shape=(?, ?))> 'L_S_sigma'
 β”‚              β”‚  β”œβ”€ AllocDiag{offset=0, axis1=0, axis2=1} [id CL] <Matrix(float64, shape=(?, ?))>
 β”‚              β”‚  β”‚  └─ Exp [id CM] <Vector(float64, shape=(2,))> 'sigma_sd_delta'
 β”‚              β”‚  β”‚     └─ sigma_sd_delta_log__ [id CN] <Vector(float64, shape=(2,))>
 β”‚              β”‚  └─ Cholesky{lower=True, destructive=False, on_error='raise'} [id CO] <Matrix(float64, shape=(?, ?))>
 β”‚              β”‚     └─ Add [id CP] <Matrix(float64, shape=(?, ?))>
 β”‚              β”‚        β”œβ”€ [[1. 0.]
 [0. 1.]] [id BA] <Matrix(float64, shape=(2, 2))>
 β”‚              β”‚        β”œβ”€ AdvancedSetSubtensor [id CQ] <Matrix(float64, shape=(?, ?))>
 β”‚              β”‚        β”‚  β”œβ”€ Alloc [id BC] <Matrix(float64, shape=(2, 2))>
 β”‚              β”‚        β”‚  β”‚  └─ Β·Β·Β·
 β”‚              β”‚        β”‚  β”œβ”€ Sub [id CR] <Vector(float64, shape=(1,))> 'L_R_sigma'
 β”‚              β”‚        β”‚  β”‚  β”œβ”€ Sigmoid [id CS] <Vector(float64, shape=(1,))>
 β”‚              β”‚        β”‚  β”‚  β”‚  └─ L_R_sigma_interval__ [id CT] <Vector(float64, shape=(1,))>
 β”‚              β”‚        β”‚  β”‚  └─ Sub [id CU] <Vector(float64, shape=(1,))>
 β”‚              β”‚        β”‚  β”‚     β”œβ”€ [1.] [id BJ] <Vector(float64, shape=(1,))>
 β”‚              β”‚        β”‚  β”‚     └─ Sigmoid [id CS] <Vector(float64, shape=(1,))>
 β”‚              β”‚        β”‚  β”‚        └─ Β·Β·Β·
 β”‚              β”‚        β”‚  β”œβ”€ [0] [id BK] <Vector(uint8, shape=(1,))>
 β”‚              β”‚        β”‚  └─ [1] [id BL] <Vector(uint8, shape=(1,))>
 β”‚              β”‚        └─ Transpose{axes=[1, 0]} [id CV] <Matrix(float64, shape=(?, ?))>
 β”‚              β”‚           └─ AdvancedSetSubtensor [id CQ] <Matrix(float64, shape=(?, ?))>
 β”‚              β”‚              └─ Β·Β·Β·
 β”‚              └─ sigma_i_delta_pr [id CW] <Matrix(float64, shape=(2, 47))>
 β”œβ”€ cond_idx [id BO] <Vector(int32, shape=(?,))>
 β”œβ”€ subj_idx [id BP] <Vector(int32, shape=(?,))>
 └─ time_idx [id BQ] <Vector(int32, shape=(?,))>
3: AdvancedSubtensor [id CX] <Vector(float64, shape=(?,))>
 β”œβ”€ Mul [id CY] <Matrix(float64, shape=(47, 2))> 'ndt_i'
 β”‚  β”œβ”€ Exp [id CZ] <Matrix(float64, shape=(47, 2))>
 β”‚  β”‚  └─ Switch [id DA] <Matrix(float64, shape=(47, 2))>
 β”‚  β”‚     β”œβ”€ Lt [id DB] <Matrix(bool, shape=(47, 2))>
 β”‚  β”‚     β”‚  β”œβ”€ Add [id DC] <Matrix(float64, shape=(47, 2))>
 β”‚  β”‚     β”‚  β”‚  β”œβ”€ ExpandDims{axis=0} [id DD] <Matrix(float64, shape=(1, 2))>
 β”‚  β”‚     β”‚  β”‚  β”‚  └─ ndt_mean [id DE] <Vector(float64, shape=(2,))>
 β”‚  β”‚     β”‚  β”‚  └─ Mul [id DF] <Matrix(float64, shape=(47, 2))>
 β”‚  β”‚     β”‚  β”‚     β”œβ”€ ExpandDims{axis=0} [id DG] <Matrix(float64, shape=(1, 2))>
 β”‚  β”‚     β”‚  β”‚     β”‚  └─ ndt_sigma [id DH] <Vector(float64, shape=(2,))>
 β”‚  β”‚     β”‚  β”‚     └─ ndt_i_pr [id DI] <Matrix(float64, shape=(47, 2))>
 β”‚  β”‚     β”‚  └─ [[-1.]] [id DJ] <Matrix(float32, shape=(1, 1))>
 β”‚  β”‚     β”œβ”€ Sub [id DK] <Matrix(float64, shape=(47, 2))>
 β”‚  β”‚     β”‚  β”œβ”€ Log [id DL] <Matrix(float64, shape=(47, 2))>
 β”‚  β”‚     β”‚  β”‚  └─ Mul [id DM] <Matrix(float64, shape=(47, 2))>
 β”‚  β”‚     β”‚  β”‚     β”œβ”€ [[0.5]] [id DN] <Matrix(float64, shape=(1, 1))>
 β”‚  β”‚     β”‚  β”‚     └─ Erfcx [id DO] <Matrix(float64, shape=(47, 2))>
 β”‚  β”‚     β”‚  β”‚        └─ Mul [id DP] <Matrix(float64, shape=(47, 2))>
 β”‚  β”‚     β”‚  β”‚           β”œβ”€ [[-0.70710679]] [id DQ] <Matrix(float64, shape=(1, 1))>
 β”‚  β”‚     β”‚  β”‚           └─ Add [id DC] <Matrix(float64, shape=(47, 2))>
 β”‚  β”‚     β”‚  β”‚              └─ Β·Β·Β·
 β”‚  β”‚     β”‚  └─ Mul [id DR] <Matrix(float64, shape=(47, 2))>
 β”‚  β”‚     β”‚     β”œβ”€ [[0.5]] [id DN] <Matrix(float64, shape=(1, 1))>
 β”‚  β”‚     β”‚     └─ Sqr [id DS] <Matrix(float64, shape=(47, 2))>
 β”‚  β”‚     β”‚        └─ Add [id DC] <Matrix(float64, shape=(47, 2))>
 β”‚  β”‚     β”‚           └─ Β·Β·Β·
 β”‚  β”‚     └─ Log1p [id DT] <Matrix(float64, shape=(47, 2))>
 β”‚  β”‚        └─ Mul [id DU] <Matrix(float64, shape=(47, 2))>
 β”‚  β”‚           β”œβ”€ [[-0.5]] [id DV] <Matrix(float64, shape=(1, 1))>
 β”‚  β”‚           └─ Erfc [id DW] <Matrix(float64, shape=(47, 2))>
 β”‚  β”‚              └─ Mul [id DX] <Matrix(float64, shape=(47, 2))>
 β”‚  β”‚                 β”œβ”€ [[0.70710679]] [id DY] <Matrix(float64, shape=(1, 1))>
 β”‚  β”‚                 └─ Add [id DC] <Matrix(float64, shape=(47, 2))>
 β”‚  β”‚                    └─ Β·Β·Β·
 β”‚  └─ [[0.22698 ... .24872  ]] [id DZ] <Matrix(float64, shape=(47, 2))>
 β”œβ”€ subj_idx [id BP] <Vector(int32, shape=(?,))>
 └─ time_idx [id BQ] <Vector(int32, shape=(?,))>
The parameters evaluate to:
0: [45120]
1: [0. 0. 0. ... 0. 0. 0.]
2: [1. 1. 1. ... 1. 1. 1.]
3: [0.11349 0.11349 0.11349 ... 0.12436 0.12436 0.12436]
Some of the observed values of variable likelihood are associated with a non-finite logp:
 value = 0.013057221998227633 -> logp = -inf
 value = 0.12245559233225234 -> logp = -inf
 value = 0.12279559233225235 -> logp = -inf
 value = 0.1324055923322523 -> logp = -inf
 value = 0.13028559233225234 -> logp = -inf
 value = 0.13515559233225233 -> logp = -inf
 value = 0.09796559233225233 -> logp = -inf
 value = 0.12287559233225231 -> logp = -inf
 value = 0.10151559233225232 -> logp = -inf
 value = 0.0845055923322523 -> logp = -inf
 value = 0.10644559233225231 -> logp = -inf
 value = 0.1179155923322523 -> logp = -inf
 value = 0.1217555923322523 -> logp = -inf
 value = 0.1133155923322523 -> logp = -inf
 value = 0.10489559233225232 -> logp = -inf
 value = 0.1310855923322523 -> logp = -inf





I see this post have the same error, but after browsing it I still have no cluehttps://discourse.pymc.io/t/some-of-the-observed-values-are-associated-with-a-non-finite-logp/12909