modedl ckpt tooltips
This commit is contained in:
@@ -1267,7 +1267,23 @@ class DataProvider:
|
||||
return df
|
||||
|
||||
except Exception as e:
|
||||
logger.error(f"Error generating 1s candles from ticks for {symbol}: {e}")
|
||||
# Handle Windows-specific invalid argument (e.g., bad timestamps) gracefully
|
||||
try:
|
||||
import errno
|
||||
if hasattr(e, 'errno') and e.errno == errno.EINVAL:
|
||||
logger.warning(f"Invalid argument while generating 1s candles for {symbol}; trimming tick buffer and falling back")
|
||||
try:
|
||||
if hasattr(self, 'cob_raw_ticks') and symbol in getattr(self, 'cob_raw_ticks', {}):
|
||||
buf = self.cob_raw_ticks[symbol]
|
||||
drop = max(1, len(buf)//2)
|
||||
for _ in range(drop):
|
||||
buf.popleft()
|
||||
except Exception:
|
||||
pass
|
||||
else:
|
||||
logger.error(f"Error generating 1s candles from ticks for {symbol}: {e}")
|
||||
except Exception:
|
||||
logger.error(f"Error generating 1s candles from ticks for {symbol}: {e}")
|
||||
return None
|
||||
|
||||
def _fetch_from_binance(self, symbol: str, timeframe: str, limit: int) -> Optional[pd.DataFrame]:
|
||||
|
||||
@@ -81,11 +81,21 @@ except Exception:
|
||||
from enhanced_realtime_training import EnhancedRealtimeTrainingSystem # type: ignore
|
||||
ENHANCED_TRAINING_AVAILABLE = True
|
||||
except Exception:
|
||||
EnhancedRealtimeTrainingSystem = None # type: ignore
|
||||
ENHANCED_TRAINING_AVAILABLE = False
|
||||
logging.warning(
|
||||
"EnhancedRealtimeTrainingSystem not found. Real-time training features will be disabled."
|
||||
)
|
||||
# Dynamic sys.path injection as last resort
|
||||
try:
|
||||
import sys, os
|
||||
current_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
nn_training_dir = os.path.normpath(os.path.join(current_dir, "..", "NN", "training"))
|
||||
if nn_training_dir not in sys.path:
|
||||
sys.path.insert(0, nn_training_dir)
|
||||
from enhanced_realtime_training import EnhancedRealtimeTrainingSystem # type: ignore
|
||||
ENHANCED_TRAINING_AVAILABLE = True
|
||||
except Exception:
|
||||
EnhancedRealtimeTrainingSystem = None # type: ignore
|
||||
ENHANCED_TRAINING_AVAILABLE = False
|
||||
logging.warning(
|
||||
"EnhancedRealtimeTrainingSystem not found. Real-time training features will be disabled."
|
||||
)
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user