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

freqAI bug causing failures on 2nd backtest #11005

Merged
merged 1 commit into from
Dec 3, 2024
Merged

Conversation

xmatthias
Copy link
Member

Summary

if we don't call freqai_set_targets() - we can't get .find_labels() either (nested in get_unique_classes_from_labels() - as there won't be targets assigned to the dataframe.
This overwrites the data loaded from the metadata file to dk.unique_class_list and dk.label_list - causing them to be empty - and subsequently, failures like the following:

  File freqtrade/freqai/freqai_interface.py", line 901, in backtesting_fit_live_predictions        
    dk.full_df.at[index, f"{label}_mean"] = self.dk.data["labels_mean"][                                                                     
                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                     
KeyError: '&-target'  

closes #10997

Quick changelog

  • update indentation to not run get_unique_classes_from_labels() if set_freqai_targets() hasn't been ran.

@xmatthias xmatthias added Bug Confirmed Bugs / problematic behavior. freqAI Issues and PR's related to freqAI labels Nov 28, 2024
@xmatthias xmatthias requested a review from robcaulk November 28, 2024 18:56
@coveralls
Copy link

Coverage Status

coverage: 94.397% (+0.009%) from 94.388%
when pulling a619968 on fix/freqai_bug
into 9ff4298 on develop.

@robcaulk robcaulk merged commit 3855d44 into develop Dec 3, 2024
31 checks passed
@xmatthias xmatthias deleted the fix/freqai_bug branch December 3, 2024 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Confirmed Bugs / problematic behavior. freqAI Issues and PR's related to freqAI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

freqAI strategy backtest result cannot load successfully in visualize result of freqUI.
4 participants