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

[bug]: prophet: Does not work as expected. #150

Open
2 tasks done
TFMV opened this issue Jun 16, 2024 · 0 comments
Open
2 tasks done

[bug]: prophet: Does not work as expected. #150

TFMV opened this issue Jun 16, 2024 · 0 comments
Labels
bug-bigfunction Report a bug in a BigFunction

Comments

@TFMV
Copy link
Contributor

TFMV commented Jun 16, 2024

Check the bug has not already been reported

Edit function_name and the short error description in title above

  • I wrote the correct function name and a short error description in the title above

What happened and what did you expect?

When attempting to invoke the prophet function, I received the following error when using the provided example:

Number of arguments does not match for function bigfunctions.us.prophet. Supported signature: bigfunctions.us.prophet(JSON, FLOAT64, JSON) at [1:8]

After some experimentation, I was able to get a working example:

WITH sample_data AS (
SELECT
TO_JSON(ARRAY<STRUCT<ds STRING, y FLOAT64>>[
('2020-01-01', 1.0),
('2020-01-02', 2.0),
('2020-01-03', 3.0)
]) AS records,
CAST(3 AS FLOAT64) AS periods,
TO_JSON(STRUCT<daily_seasonality BOOL, yearly_seasonality BOOL>(TRUE, TRUE)) AS kwargs
)

SELECT
bigfunctions.us.prophet(
records,
periods,
kwargs
) AS forecasted_records
FROM
sample_data;

@TFMV TFMV added the bug-bigfunction Report a bug in a BigFunction label Jun 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-bigfunction Report a bug in a BigFunction
Projects
None yet
Development

No branches or pull requests

1 participant