TimeseriesForcaster fails
See original GitHub issueBug Description
- there is no documentation and no example for TimeseriesForcaster
- I have read the source and figured out how to use it (I think!).
timeforcast.fit(...)
works for a while and then breaks:
InvalidArgumentError: Incompatible shapes: [128,1] vs. [99,1]
[[node mean_squared_error/SquaredDifference (defined at /usr/local/lib/python3.7/dist-packages/autokeras/utils/utils.py:85) ]] [Op:__inference_train_function_501327]
Function call stack:
train_function
Bug Reproduction
Code for reproducing the bug:
timeforcast = ak.TimeseriesForecaster(
column_names=["A", "B", "C"],
column_types={
"A": "numerical",
"B": "numerical",
"C": "numerical"
},
lookback = 30,
predict_until = 1,
predict_from = 10,
objective = "val_accuracy"
)
timeforcast.fit(
x = "normalized.csv",
y = "B",
batch_size = 128
)
The columns don’t matter, neither does the batch size or any of these specifics.
Data used by the code:
Any CSV full of floats, with columns A, B, and C. My actual data is sensitive and cannot be posted to a Github issue.
Expected Behavior
Training does not result in a runtime exception.
Setup Details
Include the details about the versions of:
- OS type and version: Unsure, some distro of Linux, running on Colab
- Python: 3.7
- autokeras: 1.0.12
- keras-tuner: ?
- scikit-learn: ?
- numpy: ?
- pandas: ?
- tensorflow: ?
Additional context
What I suspect is the issue is I am using the API incorrectly, and/or the API implementation is incomplete. Many of the claims in the source code inline documentation do not seem to be true.
What would resolve my issue is some guidance here:
I have a bunch of time series data (dataframe or csv input, I don’t care), about 400,000 samples. I want AutoKeras to discover a model arch and parameters that work well. I’ve been struggling to get training going (like all day), and now that it has, it throws an exception after several minutes of training.
Thank you very much.
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (1 by maintainers)
More info: varying the lookback parameter varies the exception values.
lookback = 30
->Incompatible shapes: [128,1] vs. [99,1]
lookback = 10
->Incompatible shapes: [128,1] vs. [119,1]
in general
lookback = L
->Incompatible shapes: [BATCH,1] vs. [(BATCH - L + 1),1]
I can’t vouch for whether it’s performing correctly or not, but setting the batch size to the lookback allows it to run for me.