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

[feat] add LOG_LEVEL environ variable #71

Merged
merged 1 commit into from
Dec 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ repos:
rev: v2.3.0
hooks:
- id: codespell
args: ["--skip", "*.json"]
args: ["--skip", "*.json", "-L", "TBE"]
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.18
hooks:
Expand Down
14 changes: 14 additions & 0 deletions docs/source/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,3 +155,17 @@ Tag: TUNNEL Endpoint: http://dt.cn-shanghai-vpc.maxcompute.aliyun-inc.com
**原因:** 离线预测输出表已存在,并且schema不正确

**解决方法:** 删除已存在的输出表或修改输出表名

______________________________________________________________________

**Q11: fbgemm的embedding lookup op的EmbeddingBoundsCheck error**

**报错信息:** fbgemm的embedding lookup op报错:

```
EmbeddingBoundsCheck (VBE false): (at least one) Out of bounds access for batch: 12, table: 2, bag element: 0, idx: 3, num_rows: 3, indices_start: 1815, indices_end: 1816, T: 244, B: 67, b_t: 1955. Setting idx to zero.
```

**原因:** 第2个embedding table只有3行embedding(num_rows: 3),但是传入的id是3(idx: 3),越界了

**解决方法:** 只通过报错日志很难直接确定第2个embedding table是关联哪一个特征。需设置环境变量`LOG_LEVEL=INFO`或`LOG_LEVEL=DEBUG`重新执行训练命令,可以看到训练日志中包含如下内容`[TBE=xxx] Contents: ['id_3_emb', 'lookup_2_emb', 'lookup_3_emb', ...`,就可以得知`lookup_3`这个特征的输入值存在问题需要进一步检查输入数据。
8 changes: 7 additions & 1 deletion tzrec/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,11 @@

from tzrec.utils import load_class as _load_class # NOQA

_logging.basicConfig(format="[%(asctime)s][%(levelname)s] %(message)s")
_log_level = _os.getenv("LOG_LEVEL")
if _log_level:
_log_level = getattr(_logging, _log_level)

_logging.basicConfig(
format="[%(asctime)s][%(levelname)s] %(message)s", level=_log_level
)
_load_class.auto_import()