model is not fitted yet!
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 48.7k
- Forks
- 7.7k
- PR merge metrics
- No merged PRs in 30d
Description
🐛 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()
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading qlib.workflow.record_temp.SignalRecord and the R.load_object("trained_model") call in the provided Jupyter Lab snippet. Run the reproduction from a fresh session and compare the first and second executions, including the recorder and model state. Done means the prediction path works on its first execution or the issue is narrowed to a documented failure point.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- jupyter, python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100