# 配置 logging

logging.basicConfig(
    level=logging.DEBUG,
    format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',  # 日志格式
    handlers=[
        logging.FileHandler(f'app_{datetime.now().strftime("%Y%m%d")}.log'),  # 输出到文件,按日期命名,
        RichHandler(console=console, show_path=True, markup=True, rich_tracebacks=True, tracebacks_show_locals=True)
    ]
)

# 获取 logger
logger = logging.getLogger(__name__)

\mathcal{L}(q, k_+) = - \frac{\exp(s(q, k_+)/\tau)}{\exp(s(q, k_+)/\tau) + \sum_{i=1}^{K} \exp(s(q, k_i)/\tau)},