Solved by Jordan_Howell in post #7 
              
              
                I (and when I say I, I mean a friend) figured this out late yesterday. I had to change the function and we’re not sure why changing the simple math enabled it to run.  But in case anyone wants a custom function that maximizes the Tweedie QLL, the below works: 
def QLL(predicted, observed):
    p = t…