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

1st integration with TimeGPT-1 (Beta), from Nixtla #5292

Merged
merged 27 commits into from
Aug 25, 2023
Merged

Conversation

DidierRLopes
Copy link
Collaborator

Description

  • Summary of the change / bug fix.

Integrate the new TimeGPT-1 (Beta) model from Nixtla.

  • Screenshot of the feature or the bug before/after fix, if applicable.

image

  • Relevant motivation and context.

TimeGPT-1 (Beta) is a new model that is early alpha from Nixtla. It was trained on the largest collection of data in history – over 100 billion rows of financial, weather, energy, and web data – and democratizes the power of time-series analysis.

  • List any dependencies that are required for this change.

nixtlats

How has this been tested?

  • Please describe the tests that you ran to verify your changes.

Tested multiple commands with different time series.

  • Need to try more different time series, to check all edge cases are handled
  • Need to test providing more than one time series
  • Provide instructions so we can reproduce.
  • Make sure affected commands still run in terminal
  • Ensure the SDK still works

Checklist:

Others

  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.

@DidierRLopes DidierRLopes added the feat L Large T-Shirt size Feature label Aug 7, 2023
@reviewpad reviewpad bot added feat M Medium T-Shirt size feature and removed feat L Large T-Shirt size Feature labels Aug 7, 2023
@jmaslek
Copy link
Collaborator

jmaslek commented Aug 8, 2023

  • nixtlats not added to reqs
  • api-key guide not updated in website/

@jmaslek jmaslek changed the base branch from develop to release/3.2.1 August 9, 2023 19:25
@jmaslek
Copy link
Collaborator

jmaslek commented Aug 9, 2023

So I loaded in an example stock load, (K0 ticker), which is saved to k0

Running the following:

2023 Aug 09, 15:42 (🐛) /forecast/ $ timegpt -d k0 --targetcol close --freq D --timecol date --ci 60,80

There was an error connecting to the API. Please try again later.

Error: list indices must be integers or slices, not str

In debug mode, it says a 500 error code from nixtla?

If I dont specify the --ci flag, teh default values give errors on is_integer:

2023 Aug 09, 15:43 (🐛) /forecast/ $ timegpt -d k0 --targetcol close --freq D --timecol date

Error: 'int' object has no attribute 'is_integer'

Could also use a better help message on --targetcol and --timecol, as not specifying them just defauklts to twice printed error:

2023 Aug 09, 15:44 (🐛) /forecast/ $ timegpt -d k0 --targetcol close --freq D

Error: 'ds'

Error: 'ds'

@jmaslek jmaslek changed the base branch from release/3.2.1 to develop August 9, 2023 20:35
@DidierRLopes
Copy link
Collaborator Author

Nice, thanks for feedback! @jmaslek

The API is in constant development by Azul (@FedericoGarza ) from Nixtla's team - were you using latest version?

When I see these "There was an error connecting to the API. Please try again later." it's usually on their side, and so it's important to know what args we are sending so they can replicate.

@DidierRLopes
Copy link
Collaborator Author

Screenshot 2023-08-09 at 3 21 25 PM

@jmaslek seems you were running an old version, had no problems with ko.

@DidierRLopes
Copy link
Collaborator Author

Fixed the other 2 issues you found:

Screenshot 2023-08-09 at 3 59 37 PM Screenshot 2023-08-09 at 4 04 33 PM

@jmaslek
Copy link
Collaborator

jmaslek commented Aug 23, 2023

Running into something weird. Loading in /fixedincome/fed --start 2020-01-01 -p weekly --export fedfunds.csv

Specifying the freq actually causes it to fail (you need to pull my change to load to double check)?

2023 Aug 23, 10:44 (🐛) /forecast/ $ timegpt -d fedfunds --timecol date --targetcol ff


2023 Aug 23, 10:44 (🐛) /forecast/ $ timegpt -d fedfunds --timecol date --targetcol ff --freq W

Error: status_code: 400, body: <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Bad Request</pre>
</body>
</html>


Error: not enough values to unpack (expected 2, got 0)

@jmaslek jmaslek marked this pull request as ready for review August 23, 2023 16:18
@DidierRLopes
Copy link
Collaborator Author

Got into the same issue. Just asked Nixtla team about it (CC @FedericoGarza ), but I think they are passing that freq to pandas.

image

@AzulGarza
Copy link
Contributor

hi @DidierRLopes and @jmaslek! Thanks for letting us know about this issue. We've released a new version of nixtlats, so nixtlats>=0.1.11 should work. We have the following CI/CD test, but let me know if updating the library does not work on your end. Thank you! ❤️

image

@jmaslek jmaslek added this pull request to the merge queue Aug 25, 2023
Merged via the queue into develop with commit 1036308 Aug 25, 2023
16 checks passed
@jmaslek jmaslek deleted the feature/timegpt branch August 25, 2023 15:34
the-praxs pushed a commit that referenced this pull request Sep 4, 2023
* integrate time gpt from Nixtla

* add to reqs

* add residuals to timegpt

* fix some bugs

* remove twitter functions

* remove twitter functions and all references to it

* start work to integrate date features

* add date_features to timegpt

* remove twitter functions

* remove twitter functions and all references to it

* Update deps for timegpt + askobb

* Update forecast load to set an index to date

* lint

* spell

* mypy

* mypy2

* blac k

* pylint

---------

Co-authored-by: James Maslek <jmaslek11@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat M Medium T-Shirt size feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants