🐛 Bug Description
When I Run Prediction, I met This problem【model is not fitted yet! 】
I run this code in jupyter lab, When I run this code for the second time, The code runs correctly.
To Reproduce
Steps to reproduce the behavior:
Here is the code.
from qlib.workflow.record_temp import SignalRecord, PortAnaRecord, SigAnaRecord
rid = '61cc4cd94ae24137ac196d7e82c8e666'
# backtest and analysis
with R.start(experiment_name='PatchTsT', recorder_id=rid, resume=True): #
# get model
model = R.load_object("trained_model")
# signal-based analysis
rec = R.get_recorder()
sar = SigAnaRecord(rec)
sar.generate()
# prediction
sr = SignalRecord(model, dataset, rec)
sr.generate()
ba_rid = rec.id
# portfolio-based analysis: backtest
par = PortAnaRecord(rec, port_analysis_config, "day")
par.generate()
🐛 Bug Description
When I Run Prediction, I met This problem【model is not fitted yet! 】
I run this code in jupyter lab, When I run this code for the second time, The code runs correctly.
To Reproduce
Steps to reproduce the behavior:
Here is the code.