Skip to content

Add public API exports to embedding/__init__.py#4502

Open
Ashutosh0x wants to merge 1 commit into
pytorch:mainfrom
Ashutosh0x:fix/embedding-init-exports
Open

Add public API exports to embedding/__init__.py#4502
Ashutosh0x wants to merge 1 commit into
pytorch:mainfrom
Ashutosh0x:fix/embedding-init-exports

Conversation

@Ashutosh0x

Copy link
Copy Markdown

Summary

The torchao/prototype/quantization/embedding/__init__.py was empty, forcing users to import from api.py directly (e.g., from torchao.prototype.quantization.embedding.api import EmbeddingQuantizer).

Added public API exports for EmbeddingQuantizer and TiedEmbeddingQuantizer, consistent with the int4/__init__.py pattern. Users can now write:

from torchao.prototype.quantization.embedding import EmbeddingQuantizer

Partial fix for #4333 (item #6)

Test Plan

Follows the same pattern as int4/__init__.py. The exported classes exist in api.py and are the module's public API.

This change was authored with the assistance of an AI coding assistant.

The embedding module had an empty __init__.py, forcing users to
import from api.py directly. Added exports for EmbeddingQuantizer
and TiedEmbeddingQuantizer, consistent with the int4/__init__.py
pattern.

Partial fix for pytorch#4333

Test Plan:
Follows the same pattern as int4/__init__.py. The exported classes
exist in api.py and are the module's public API.

This change was authored with the assistance of an AI coding assistant.
@pytorch-bot

pytorch-bot Bot commented Jun 15, 2026

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/4502

Note: Links to docs will display an error until the docs builds have been completed.

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant