[bump] pyfg 1.0.4 -> 1.0.5; doc updates and TokenizeFeature fix#489
Merged
tiankongdeguiji merged 3 commits intoApr 29, 2026
Merged
Conversation
- requirements/runtime.txt: bump pyfg pin (cp310/cp311/cp312 wheels) - docs/feature.md: add ExprFeature isnan (new in 1.0.5), mod, corr; drop duplicate sigmoid - docs/feature.md: extend CombineFeature/LookupFeature combiner enum with count/avg/gap_min/gap_max - docs/feature.md: note MatchFeature MAP<K, string> input support - tzrec/features/tokenize_feature.py: omit output_delim in grouped-sequence path; pyfg 1.0.5 expects the inner tokenize feature to emit per-token outputs and rejects output_delim there
Standalone TokenizeFeature parses fine without output_delim too, so the grouped-sequence branch is unnecessary. Simplifies the previous commit.
Follow-up to dropping output_delim from TokenizeFeature._fg_json — update
the expected dicts in feature_test.test_create_fg_json{,_remove_bucketizer}
so they match the new output. Caught by CI on PR alibaba#489.
tiankongdeguiji
added a commit
to tiankongdeguiji/TorchEasyRec
that referenced
this pull request
Apr 28, 2026
Follow-up to dropping output_delim from TokenizeFeature._fg_json — update
the expected dicts in feature_test.test_create_fg_json{,_remove_bucketizer}
so they match the new output. Caught by CI on PR alibaba#489.
chengaofei
approved these changes
Apr 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
requirements/runtime.txt.docs/source/feature/feature.mdto reflect what's actually usable in TorchEasyRec with the new pyfg:isnan(new in pyfg 1.0.5),mod,corr; remove a duplicatesigmoidrow.combinerenums: extended tocount/avg/gap_min/gap_max(in addition tosum/mean/min/max).nested_map: note thatMAP<K, string>columns are accepted directly (parallel to existing LookupFeature wording).tzrec/features/tokenize_feature.py: omitoutput_delimfrom the inner tokenize-feature config in the grouped-sequence path. pyfg 1.0.5 expects the inner feature to emit per-token outputs and the surrounding sequence wrapper handles delimiting; withoutput_delimset, parse fails withsparse sequence feature internal error("no bucketize config" in pyfg native logs).Doc additions verified live against pyfg 1.0.5 via
pyfg.FgArrowHandlersmoke tests (isnan / mod / corr / all 8 combiner options includinggap_min,gap_max).Skipped (not exposed in TorchEasyRec proto/code today, so documenting them would mislead users): SliceFeature, BM25Feature, StringReplace, TokenizeFeature bucketization.
Test plan
pytest tzrec/features/— 242 passed (previously 3 SequenceTokenizeFeature regressions on 1.0.5; now fixed).pytest tzrec/datasets/ tzrec/utils/ --ignore=tzrec/utils/faiss_util_test.py— 120 passed, 23 skipped (faiss optional).expr_feature_test,combine_feature_test,lookup_feature_test,match_feature_test— 65/65 pass.pyfg.FgArrowHandleracceptsisnan(x),mod(x,y),corr(a,b), and every documented combiner.