BUG: Invalid EMBEDDING_MAX_BATCH_SIZE Value Triggers ValueError in backend/config.py

未关闭
#244 5 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

@bnyashwanth 已经在做这个了。

开始于 2026年1月16日。

  • #247 来自 @bnyashwanth —— 未关闭

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
55/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
停滞
技术栈
python
领域
backend

调研方向

首先阅读 backend/config.py,找到将 EMBEDDING_MAX_BATCH_SIZE 转换为整数的位置,以及其默认值的定义位置。使用非整数或空的环境值重现该故障,然后验证无效输入会使用安全的默认值而不会导致崩溃。

由索引模型根据 Issue 内容生成。

描述

Is there an existing issue for this?
  • I have searched the existing issues
What happened?

📌 Issue Overview

EMBEDDING_MAX_BATCH_SIZE Crashes Application if Set to Non-Integer Value

🔍 Steps to Reproduce

  1. Set the environment variable EMBEDDING_MAX_BATCH_SIZE to a non-integer value (e.g., abc or leave it empty).
  2. Run the application.
  3. The application attempts to convert the value to int in backend/config.py.
  4. Show the error.

🎯 Expected Behavior

The application should handle invalid or missing EMBEDDING_MAX_BATCH_SIZE values gracefully and fall back to a safe default without crashing.

🚨 Actual Behavior

If EMBEDDING_MAX_BATCH_SIZE is set to a non-integer value or is empty, the application crashes with a ValueError in backend/config.py.

📷 Screenshot

💡 Suggested Improvements

  • Add error handling in backend/config.py to catch invalid EMBEDDING_MAX_BATCH_SIZE values.
  • Use the default value if parsing fails.
Record
  • I agree to follow this project's Code of Conduct
  • I want to work on this issue
主要语言
Python
星标
103
派生
143
PR 合并指标
30 天内没有已合并 PR

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

AOSSIE-Org/Devr.AI 的其他 Issue

查看 AOSSIE-Org/Devr.AI 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。