diff --git a/README.md b/README.md index 59502f589..07a6726ef 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,9 @@ +# This fork is only to explore if the training process is working as expected + +Please read the debug notes here [debug_original_pt_trainer_notes.md](./debug_original_pt_trainer_notes.md). + +The original README.md is below: + # PowerTrader_AI Fully automated crypto trading powered by a custom price prediction AI and a structured/tiered DCA system. diff --git a/debug_original_pt_trainer_notes.md b/debug_original_pt_trainer_notes.md new file mode 100644 index 000000000..f3164335c --- /dev/null +++ b/debug_original_pt_trainer_notes.md @@ -0,0 +1,81 @@ +# Purpose + +This relates to a clarification question related to the training process documented in Issue #27 here: https://github.com/garagesteve1155/PowerTrader_AI/issues/27 + +The following is an extract of the console output from pt_trainer training filtered by lines containing "[DEBUG]" whilst training the BTC coin. + +# Observations + +``` +1. The 1hour timeframe trains on the same 25% of prices two times (restart count <= 2), then on restart count 3, it processes 100% of the 1hour prices. + +2. The trainer processes 7 timeframes (see seven groups of output below), but they are not the timeframes you expect. + + For example: + - group 1 process 25% of 1hour, then 25% of 1hour then all of 1hour + - group 2 process 25% of 1hour, then 25% of 2hour then all of 2hour + - group 3 process 25% of 1hour, then 25% of 4hour then all of 4hour + - group 4 process 25% of 1hour, then 25% of 8hour then all of 8hour + - group 5 process 25% of 1hour, then 25% of 12hour then all of 12hour + - group 6 process 25% of 1hour, then 25% of 1day then all of 1day + - group 7 process 25% of 1hour, then 25% of 1week then all of 1week +``` + +### The clarification is to check the below is what the author expected as the design doesn't seem correct. + +``` +[DEBUG] Training timeframe 1hour, restart count:0 +[DEBUG] Coin BTC-GBP: 25.0% of 13121 prices for timeframe 1hour have been processed. Restarting. +[DEBUG] Training timeframe 1hour, restart count:1 +[DEBUG] Coin BTC-GBP: 25.0% of 13121 prices for timeframe 1hour have been processed. Restarting. +[DEBUG] Training timeframe 1hour, restart count:2 +[DEBUG] Coin BTC-GBP: 100% of 13121 prices for timeframe 1hour have been processed. Saving training status then exiting. + + +[DEBUG] Training timeframe 1hour, restart count:0 +[DEBUG] Coin BTC-GBP: 25.0% of 13121 prices for timeframe 1hour have been processed. Restarting. +[DEBUG] Training timeframe 2hour, restart count:1 +[DEBUG] Coin BTC-GBP: 25.0% of 6474 prices for timeframe 2hour have been processed. Restarting. +[DEBUG] Training timeframe 2hour, restart count:2 +[DEBUG] Coin BTC-GBP: 100% of 6474 prices for timeframe 2hour have been processed. Saving training status then exiting. + + +[DEBUG] Training timeframe 1hour, restart count:0 +[DEBUG] Coin BTC-GBP: 25.0% of 13121 prices for timeframe 1hour have been processed. Restarting. +[DEBUG] Training timeframe 4hour, restart count:1 +[DEBUG] Coin BTC-GBP: 25.0% of 3150 prices for timeframe 4hour have been processed. Restarting. +[DEBUG] Training timeframe 4hour, restart count:2 +[DEBUG] Coin BTC-GBP: 100% of 3150 prices for timeframe 4hour have been processed. Saving training status then exiting. + + +[DEBUG] Training timeframe 1hour, restart count:0 +[DEBUG] Coin BTC-GBP: 25.0% of 13121 prices for timeframe 1hour have been processed. Restarting. +[DEBUG] Training timeframe 8hour, restart count:1 +[DEBUG] Coin BTC-GBP: 25.0% of 1619 prices for timeframe 8hour have been processed. Restarting. +[DEBUG] Training timeframe 8hour, restart count:2 +[DEBUG] Coin BTC-GBP: 100% of 1619 prices for timeframe 8hour have been processed. Saving training status then exiting. + + +[DEBUG] Training timeframe 1hour, restart count:0 +[DEBUG] Coin BTC-GBP: 25.0% of 13121 prices for timeframe 1hour have been processed. Restarting. +[DEBUG] Training timeframe 12hour, restart count:1 +[DEBUG] Coin BTC-GBP: 25.0% of 1050 prices for timeframe 12hour have been processed. Restarting. +[DEBUG] Training timeframe 12hour, restart count:2 +[DEBUG] Coin BTC-GBP: 100% of 1050 prices for timeframe 12hour have been processed. Saving training status then exiting. + + +[DEBUG] Training timeframe 1hour, restart count:0 +[DEBUG] Coin BTC-GBP: 25.0% of 13121 prices for timeframe 1hour have been processed. Restarting. +[DEBUG] Training timeframe 1day, restart count:1 +[DEBUG] Coin BTC-GBP: 25.0% of 1049 prices for timeframe 1day have been processed. Restarting. +[DEBUG] Training timeframe 1day, restart count:2 +[DEBUG] Coin BTC-GBP: 100% of 1049 prices for timeframe 1day have been processed. Saving training status then exiting. + + +[DEBUG] Training timeframe 1hour, restart count:0 +[DEBUG] Coin BTC-GBP: 25.0% of 13121 prices for timeframe 1hour have been processed. Restarting. +[DEBUG] Training timeframe 1week, restart count:1 +[DEBUG] Coin BTC-GBP: 24.8% of 149 prices for timeframe 1week have been processed. Restarting. +[DEBUG] Training timeframe 1week, restart count:2 +[DEBUG] Coin BTC-GBP: 100% of 149 prices for timeframe 1week have been processed. Saving training status then exiting. +``` diff --git a/pt_trainer.py b/pt_trainer.py index 0369182e5..450aadaed 100644 --- a/pt_trainer.py +++ b/pt_trainer.py @@ -272,6 +272,8 @@ def restart_program(): except Exception: pass +# Enabling DEBUG_PTTRAINER will print a couple of extra lines of debug during training to illustrate a potential issue. +DEBUG_PT_TRAINER = True the_big_index = 0 while True: @@ -371,6 +373,10 @@ def restart_program(): else: timeframe = tf_list[2]#droplet setting (create list for all timeframes) timeframe_minutes = minutes_list[2]#droplet setting (create list for all timeframe_minutes) + + # Print out the timeframe being selected for training + print(f"[DEBUG] Coin {coin_choice}: Training timeframe {timeframe}, restart count: {restarted_yet}") + start_time = int(time.time()) restarting = 'no' success_rate = 85 @@ -1269,6 +1275,12 @@ def restart_program(): which_candle_of_the_prediction_index += 1 try: if len(price_list2)>=int(len(price_list)*0.25) and restarted_yet < 2: + + # Print debug to indicate % of prices processed + # Given the if statement above, this will trigger three times + debug_pct_complete = round((price_list_index / len(price_list)) * 100.0, 1) + print(f"[DEBUG] Coin {coin_choice}: {debug_pct_complete}% of {len(price_list)} prices for timeframe {timeframe} have been processed. Restarting.") + restarted_yet += 1 restarting = 'yes' break @@ -1277,6 +1289,10 @@ def restart_program(): except: restarting = 'no' if len(price_list2) == len(price_list): + + # Print debug + print(f"[DEBUG] Coin {coin_choice}: 100% of {len(price_list)} prices for timeframe {timeframe} have been processed. Saving training status then exiting.") + the_big_index += 1 restarted_yet = 0 print('restarting')