timeseriesAI / tsai

Time series Timeseries Deep Learning Machine Learning Python Pytorch fastai | State-of-the-art Deep Learning library for Time Series and Sequences in Pytorch / fastai
https://timeseriesai.github.io/tsai/
Apache License 2.0
5.1k stars 639 forks source link

Beginner -- There is no picture in the running result #620

Closed bubu-li closed 1 year ago

bubu-li commented 1 year ago

from tsai.all import *

dsid = 'AppliancesEnergy' X, y, splits = get_regression_data(dsid, split_data=False) tfms = [None, [TSRegression()]] batch_tfms = TSStandardize(by_sample=True, by_var=True) dls = get_ts_dls(X, y, splits=splits, tfms=tfms, batch_tfms=batch_tfms, bs=32) dls.show_batch() learn = ts_learner(dls, InceptionTime, metrics=[mae, rmse], cbs=ShowGraph()) learn.lr_find()

When I run the above code locally, the expected picture of Loss-Learning Rate does not appear.( dls.show_batch() did not appear the picture) No errors but no pictures. image

oguiza commented 1 year ago

Hi @bubu-li , I've just run your code snippet locally and everything works fine. What version of tsai are you using? (You can use my_setup() and paste the output here). Could you also let me know how did you install tsai?

bubu-li commented 1 year ago

I run it with python. I know what's going on. I need to add these two statements to run with python.

from tsai.all import * import matplotlib.pyplot as plt

dsid = 'AppliancesEnergy' X, y, splits = get_regression_data(dsid, split_data=False)

tfms = [None, [TSRegression()]] batch_tfms = TSStandardize(by_sample=True, by_var=True) dls = get_ts_dls(X, y, splits=splits, tfms=tfms, batch_tfms=batch_tfms, bs=32) dls.one_batch()

dls.show_batch(sharey=True)

plt.show()

learn = ts_learner(dls, InceptionTime, metrics=[mae, rmse], cbs=ShowGraph(plot_metrics=True, final_losses=True)) learn.lr_find() plt.show()

oguiza commented 1 year ago

Does it work for you now? If so, you can close this issue.

oguiza commented 1 year ago

Closed due to lack of response.