ServiceNow / TACTiS

TACTiS-2: Better, Faster, Simpler Attentional Copulas for Multivariate Time Series, from ServiceNow Research
Apache License 2.0
110 stars 19 forks source link

Specify Numpy version in requirements.txt #13

Closed ocss884 closed 1 year ago

ocss884 commented 1 year ago

Hi! I found the following error raised in generate_backtesting_datasets() when I ran any demo having this function.

setting an array element with a sequence requested array has an inhomogeneous shape after 1 dimensions The detected shape was (1918,)+inhomogeneous part

I follow the solution here to downgrade my Numpy version from 1.24.1 to 1.21.6 then it is solved. My coworker is using numpy=1.23.4 with no problem running the demo. Seems this error only occurs in the newest numpy>=1.24.

marcotet commented 1 year ago

Thanks for heads up. I'll check whether I can make the code compatible with both versions of Numpy. But I agree that specifying a version number is good practice.

marcotet commented 1 year ago

I added a workaround (#14) to make sur that Tactis is compatible with NumPy versions >=1.24 and versions <=1.23. I prefer not having users have to select a specific NumPy version if I can avoid it, since doing so can restrict applications which use many different libraries together.