microsoft / microsoft/onnxruntime

Add support for string to string LabelEncoder

Open
#6,123 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request
Dominant language
C++
Stars
21.9k
Forks
4.2k
Avg merge
4d 11h
Merged PRs (30d)
184

Description

**Is your feature request related to a problem? Please describe.**
For categorical and strings encoding, a string to string label encoder might be useful.
For example, when trimming categories based on frequency (keeping only the top k most frequent categories, replacing others with some constant).
A int64 to int64 LabelEncoder already exists.

**System information**
- ONNX Runtime version (you are using):
1.6.0

**Describe the solution you'd like**
Support for string to string LabelEncoder.

**Describe alternatives you've considered**
Using two encoders - string to int and then int to string (possible, but it would be cleaner otherwise).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the existing int64-to-int64 LabelEncoder implementation and its tests in ONNX Runtime. Determine the entry points and test coverage for adding string-to-string support; done means string categories can be mapped to string labels without requiring two encoders, with regression coverage for the requested behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
machine-learning
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.