Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: updated FAQs #564

Merged
merged 5 commits into from
Dec 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 22 additions & 18 deletions nbs/docs/getting-started/5_faq.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -168,12 +168,15 @@
"<details>\n",
ngupta23 marked this conversation as resolved.
Show resolved Hide resolved
" <summary>What if my API key isn't validating?</summary>\n",
"\n",
"If when you validate your API key, it returns `False`\n",
"When you validate your API key and it returns `False`:\n",
"\n",
"* If you are targeting an Azure endpoint, getting `False` from the `NixtlaClient.validate_api_key` method is expected. You can skip this step when taregting an Azure endpoint and proceed diretly to forecasting instead.\n",
"* If you are not taregting an Azure endpoint, then you should check the following:\n",
" * Make sure you are using the latest version of the SDK (Python or R).\n",
" * Check that your API key is active in your dashboard by visiting https://dashboard.nixtla.io/\n",
" * Consider any firewalls your organization might have. There may be restricted access. If so, you can whitelist our endpoint https://api.nixtla.io/\n",
" * Consider any firewalls your organization might have. There may be restricted access. If so, you can whitelist our endpoint https://api.nixtla.io/. \n",
" - To use Nixtla's API, you need to let your system know that our endpoint is ok, so it will let you access it. Whitelisting the endpoint isn't something that Nixtla can do on our side. It's something that needs to be done on the user's system. This is a bit of an [overview on whitelisting](https://www.csoonline.com/article/569493/whitelisting-explained-how-it-works-and-where-it-fits-in-a-security-program.html).\n",
" - If you work in an organization, please work with an IT team. They're likely the ones setting the security and you can talk with them to get it addressed. If you run your own systems, then it's something you should be able to update, depending on the system you're using.\n",
"\n",
"</details>"
]
Expand Down Expand Up @@ -474,26 +477,27 @@
"<details>\n",
" <summary>What counts as an API call?</summary> \n",
"\n",
"An API call is a request made to TimeGPT to perform an action like forecasting or detecting anomalies, or to fetch the model's metadata.\n",
"An API call is a request made to TimeGPT to perform an action like forecasting or detecting anomalies. API Usage is as follows:\n",
"\n",
"For example, if we forecast monthly data using the `timegpt-1` model, then the first time doing this results in 2 API calls: we \n",
"- API call #1: fetch the model's metadata\n",
"- API call #2: perform the forecast action. \n",
"Calling the forecast method again, with the same frequency and model counts only as 1 API call.\n",
"### Forecasting:\n",
"1. When not requesting historical forecasts (`add_history=False`)\n",
" - If you do not set `num_partitions`, all calls to perform [forecasting](https://docs.nixtla.io/docs/getting-started-timegpt_quickstart), [finetuning](https://docs.nixtla.io/docs/tutorials-fine_tuning), or [cross-validation](https://docs.nixtla.io/docs/tutorials-cross_validation) increase the usage by 1. Note that addition of [exogenous variables](https://docs.nixtla.io/docs/tutorials-exogenous_variables), requesting [uncertainity quantification](https://docs.nixtla.io/docs/tutorials-uncertainty_quantification) or forecasting [multiple series](https://docs.nixtla.io/docs/tutorials-multiple_series_forecasting) does not increase the usage further.\n",
" - If the API call requires to send more than 200MB of data, the API will return an error and will require you to use the `num_partitions` parameter in order to partition your request. Every partition will count as an API call, hence the usage will increase by the value you set for `num_partitions` (e.g. for num_partitions=2, the usage will increase by 2).\n",
" If you set `num_partitions`, all calls to perform forecasting, finetuning, or cross-validation increase the usage by num_partitions.\n",
"2. When requesting [in-sample predictions](https://docs.nixtla.io/docs/tutorials-historical_forecast) (`add_history=True`), the usage from #1 above is multipled by 2.\n",
"\n",
"However, if we forecast on another frequency, or using the `timegpt-1-long-horizon` model, then 2 API calls are made, because new metadata must be fetched on top of running the forecast. \n",
"\n",
"We can also get historical forecasts using the `add_history=True` parameter in the `forecast` method. This leads to 2 API calls.\n",
"\n",
"Then, if the API call requires to send more than 200MB of data, the API will return an error and will require you to use the `num_partitions` parameter in order to partition your request. Every partition will count as an API call, thus for 2 partitions there will be 2 API calls.\n",
"**Examples**\n",
"1. A user uses TimeGPT to forecast daily data, using the `timegpt-1` model. How many API calls are made? (*Ans*: 1)\n",
"2. A user calls the `cross_validation` method on a dataset. How many API calls are made (*Ans*: 1)\n",
"3. A user decides to forecast on a longer horizon, so they use the `timegpt-1-long-horizon` model. How many API calls are made (*Ans*: 1)\n",
"4. A user needs to get the in-sample predicitons when forecasting using `add_history=True`. How many API calls are made (*Ans*: 2)\n",
"5. A user has a very large dataset, with a daily frequency, and they must set `num_partitions=4` when forecasting. How many API calls are made (*Ans*: 4)\n",
"6. A user has to set `num_partitions=4` and is also interesed in getting the in-sample predicitons (`add_history=True`) when forecasting. How many API calls are made (*Ans*: 8)\n",
"\n",
"If we perform [cross-validation](https://docs.nixtla.io/docs/tutorials-cross_validation), no matter the number of windows, it always counts as 1 API call.\n",
"\n",
"**Examples**\n",
"1. A user, for the first time, uses TimeGPT to forecast daily data, using the `timegpt-1` model. How many API calls are made? (*Ans*: 2)\n",
"2. The same user as above calls the `cross_validation` method on the same dataset, using the same model. How many API calls are made (*Ans*: 1)\n",
"3. That user now decides to forecast on a longer horizon, so they use the `timegpt-1-long-horizon` model. How many API calls are made (*Ans*: 2)\n",
"4. The user now gets a very large dataset, with a daily frequency, and they must set `num_partitions=4` when forecasting. How many API calls are made (*Ans*: 4)\n",
"### Anomaly Detection:\n",
"1. If you do not set `num_partitions`, all calls to perform [anomaly detection](https://docs.nixtla.io/docs/capabilities-anomaly-detection-quickstart) increase the usage by 1. Note that addition of [exogenous variables](https://docs.nixtla.io/docs/capabilities-anomaly-detection-add_exogenous_variables) does not increase the usage further.\n",
"2. If the API call requires to send more than 200MB of data, the API will return an error and will require you to use the `num_partitions` parameter in order to partition your request. Every partition will count as an API call, hence the usage will increase by the value you set for `num_partitions` (e.g. for num_partitions=2, the usage will increase by 2).\n",
"\n",
"</details>"
]
Expand Down
Loading