I've had quite a bit and back and forth with this ...
# support
t
I've had quite a bit and back and forth with this user, but things seemed to be working. Then got the below. Any thoughts if this is expected behavior? Thank you! I checked the API key in the admin dashboard and things seemed fine.
Edward Samokhvalov <edward.samokhvalov@gmail.com>
Can you pls check if this API key has any 'hanging' calls in process? I can see no error returned, but neither anything is returning too, so looks like it's frozen or smth, I have just increased the number fo curves from 200 to 600ish and that's it.
nixtla-tok-yg6aUGKQnHfzAJJjPpeprRWN92ObI577gGYbNAYD7h8ojuhQgCw1bY8T06Ul3q1YT4zb3iHL8AD05UWs
cause it's been running for many hours now and still hanging, like some calls are waiting for return from your side.
sorry for bothering you, but this could really help. thanks in advance!
1
k
shoot, I thought I had accepted this but apparently I didn't go through the whole registering process. Invitation is expired too. @Edu could I be invited again to check in on how the migrated API is running?
e
invite resent @kevin
k
awesome ty! Busy day today so I might not discover what's going on immediately, but it's on my backlog
🙏 1
1
we just chatted 1:1, but I didn't quite understand if this was still a problem for the user, or if they figured this one out. lmk!
t
This is what I got back from Edward. His questions now are around forecasting and TimeGPT, rather than web services, so I think things are resolved.
Everything's good, it works, technically.
Let me share this bit where I have timegpt projections of various stocks clustered. http://eduardsamokhvalov.tech/stuff/timegpt_index.html (you can click on one picture to get to html version with zoom).
But what makes me a little suspicious (that I'm doing something wrong) is the shape of the projections, it's smooth, it's kinda choppy.
May you have a look?
periods=90 days
def calculate_TimeGPT(df, periods, seasonality_mode):
from nixtla import NixtlaClient
random_delay()
# Prepare data for Nixtla TimeGPT
df = df.rename(columns={'ds': 'timestamp', 'y': 'value'})
df['timestamp'] = pd.to_datetime(df['timestamp'])
df = df[['timestamp', 'value']]
df.ffill(inplace=True) # so we don't have NaNs, unless there will be no prev bar to fill NaN with
# Instantiate NixtlaClient with the provided API key
nixtla_client = NixtlaClient(api_key=get_config()['nixtla_api_key'])
# Validate API key (optional, if needed for your use case)
nixtla_client.validate_api_key()
# Forecast the next 'periods' steps using Nixtla's TimeGPT model
while(True):
try:
timegpt_fcst_df = nixtla_client.forecast(df=df, h=periods, freq='D', time_col='timestamp', target_col='value')
break
except Exception as ex:
print(ex)
print('nixtla API error, making a random delay and trying again soon')
random_delay()
timegpt_fcst_df = nixtla_client.forecast(df=df, h=periods, freq='D', time_col='timestamp', target_col='value')
return timegpt_fcst_df
QUESTION 2
Also I get these messages on every call
WARNINGnixtla.nixtla clientThe specified horizon "h" exceeds the model horizon. This may lead to less accurate forecasts. Please consider using a smaller horizon.
INFOnixtla.nixtla clientRestricting input...
INFOnixtla.nixtla clientCalling Forecast Endpoint...
so how can I be aware what's max adequate forecast horizon for a model?
QUESTION 3
It says 'restricting input', could you clarify what does it mean exactly?
👍 1
k
Ah yeah, these are questions for other folks