Skip to content

Conversation

lizhouyu
Copy link
Contributor

Summary:

Major changes

  • Copy the following files from fb to corresponding location in the torchrec repository
    • fb/distributed/hash_mc_embedding.py → torchrec/distributed/hash_mc_embedding.py
    • fb/inference/noshard_ebc.py → torchrec/inference/noshard_ebc.py
    • fb/modules/hash_mc_evictions.py → torchrec/modules/hash_mc_evictions.py
    • fb/modules/hash_mc_metrics.py → torchrec/modules/hash_mc_metrics.py
    • fb/modules/hash_mc_modules.py → torchrec/modules/hash_mc_modules.py
  • Create a test_hash_zch_mc.py file in torchrec/distributed/tests folder following the test_quant_mc_embedding.py in torchrec/fb/distributed/tests.
    • trimmed quantization and inference codes, and only kept the training part.
    • rewire the related packages from torchrec.fb to torchrec
  • Update BUCK files in related folders
  • Update the affected repos to use torchrec modules instead of the modules in torchrec.fb

ToDo

This migration is not fully complete. The modules/hash_modules.py file still depends on the torch.ops.fb operations and await the OSS of MPZCH CUDA Kernel in FBGEMM. After OSS FBGEMM, rewire the dependencies to fully finish the migration.

Differential Revision: D75559591

@facebook-github-bot facebook-github-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 May 29, 2025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D75559591

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D75559591

@lizhouyu lizhouyu force-pushed the export-D75559591 branch from d34d1da to 1492e7d Compare June 6, 2025 19:16
lizhouyu added a commit to lizhouyu/torchrec that referenced this pull request Jun 6, 2025
Summary:
Pull Request resolved: meta-pytorch#3017

### Major changes
- Copy the following files from `fb` to corresponding location in the `torchrec` repository
  - `fb/distributed/hash_mc_embedding.py → torchrec/distributed/hash_mc_embedding.py`
  - `fb/modules/hash_mc_evictions.py → torchrec/modules/hash_mc_evictions.py`
  - `fb/modules/hash_mc_metrics.py → torchrec/modules/hash_mc_metrics.py`
  - `fb/modules/hash_mc_modules.py → torchrec/modules/hash_mc_modules.py`
- Create a `test_hash_zch_mc.py` file in `torchrec/distributed/tests` folder following the `test_quant_mc_embedding.py` in `torchrec/fb/distributed/tests`.
  - trimmed quantization and inference codes, and only kept the training part.
  - rewire the related packages from `torchrec.fb` to `torchrec`
- Update `BUCK` files in related folders
- Update the affected repos to use `torchrec` modules instead of the modules in `torchrec.fb`

Differential Revision: D75559591
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D75559591

lizhouyu added a commit to lizhouyu/torchrec that referenced this pull request Jun 6, 2025
Summary:
Pull Request resolved: meta-pytorch#3017

### Major changes
- Copy the following files from `fb` to corresponding location in the `torchrec` repository
  - `fb/distributed/hash_mc_embedding.py → torchrec/distributed/hash_mc_embedding.py`
  - `fb/modules/hash_mc_evictions.py → torchrec/modules/hash_mc_evictions.py`
  - `fb/modules/hash_mc_metrics.py → torchrec/modules/hash_mc_metrics.py`
  - `fb/modules/hash_mc_modules.py → torchrec/modules/hash_mc_modules.py`
- Create a `test_hash_zch_mc.py` file in `torchrec/distributed/tests` folder following the `test_quant_mc_embedding.py` in `torchrec/fb/distributed/tests`.
  - trimmed quantization and inference codes, and only kept the training part.
  - rewire the related packages from `torchrec.fb` to `torchrec`
- Update `BUCK` files in related folders
- Update the affected repos to use `torchrec` modules instead of the modules in `torchrec.fb`

Differential Revision: D75559591
@lizhouyu lizhouyu force-pushed the export-D75559591 branch from 1492e7d to 6669a86 Compare June 6, 2025 20:18
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D75559591

lizhouyu added a commit to lizhouyu/torchrec that referenced this pull request Jun 6, 2025
Summary:
Pull Request resolved: meta-pytorch#3017

### Major changes
- Copy the following files from `fb` to corresponding location in the `torchrec` repository
  - `fb/distributed/hash_mc_embedding.py → torchrec/distributed/hash_mc_embedding.py`
  - `fb/modules/hash_mc_evictions.py → torchrec/modules/hash_mc_evictions.py`
  - `fb/modules/hash_mc_metrics.py → torchrec/modules/hash_mc_metrics.py`
  - `fb/modules/hash_mc_modules.py → torchrec/modules/hash_mc_modules.py`
- Create a `test_hash_zch_mc.py` file in `torchrec/distributed/tests` folder following the `test_quant_mc_embedding.py` in `torchrec/fb/distributed/tests`.
  - trimmed quantization and inference codes, and only kept the training part.
  - rewire the related packages from `torchrec.fb` to `torchrec`
- Update `BUCK` files in related folders
- Update the affected repos to use `torchrec` modules instead of the modules in `torchrec.fb`

Differential Revision: D75559591
@lizhouyu lizhouyu force-pushed the export-D75559591 branch from 6669a86 to 3c49cbe Compare June 6, 2025 20:29
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D75559591

@lizhouyu lizhouyu force-pushed the export-D75559591 branch from 3c49cbe to 09353b5 Compare June 6, 2025 21:00
lizhouyu added a commit to lizhouyu/torchrec that referenced this pull request Jun 6, 2025
Summary:
Pull Request resolved: meta-pytorch#3017

### Major changes
- Copy the following files from `fb` to corresponding location in the `torchrec` repository
  - `fb/distributed/hash_mc_embedding.py → torchrec/distributed/hash_mc_embedding.py`
  - `fb/modules/hash_mc_evictions.py → torchrec/modules/hash_mc_evictions.py`
  - `fb/modules/hash_mc_metrics.py → torchrec/modules/hash_mc_metrics.py`
  - `fb/modules/hash_mc_modules.py → torchrec/modules/hash_mc_modules.py`
- Create a `test_hash_zch_mc.py` file in `torchrec/distributed/tests` folder following the `test_quant_mc_embedding.py` in `torchrec/fb/distributed/tests`.
  - trimmed quantization and inference codes, and only kept the training part.
  - rewire the related packages from `torchrec.fb` to `torchrec`
- Update `BUCK` files in related folders
- Update the affected repos to use `torchrec` modules instead of the modules in `torchrec.fb`

Differential Revision: D75559591
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D75559591

lizhouyu added a commit to lizhouyu/torchrec that referenced this pull request Jun 6, 2025
Summary:
Pull Request resolved: meta-pytorch#3017

### Major changes
- Copy the following files from `fb` to corresponding location in the `torchrec` repository
  - `fb/distributed/hash_mc_embedding.py → torchrec/distributed/hash_mc_embedding.py`
  - `fb/modules/hash_mc_evictions.py → torchrec/modules/hash_mc_evictions.py`
  - `fb/modules/hash_mc_metrics.py → torchrec/modules/hash_mc_metrics.py`
  - `fb/modules/hash_mc_modules.py → torchrec/modules/hash_mc_modules.py`
- Create a `test_hash_zch_mc.py` file in `torchrec/distributed/tests` folder following the `test_quant_mc_embedding.py` in `torchrec/fb/distributed/tests`.
  - trimmed quantization and inference codes, and only kept the training part.
  - rewire the related packages from `torchrec.fb` to `torchrec`
- Update `BUCK` files in related folders
- Update the affected repos to use `torchrec` modules instead of the modules in `torchrec.fb`
- Update `/modules/hash_mc_metrics.py`
  - Replace internel `tensorboard.adhoc` module with OSS `tensorboard` `Summarywriter` module

Differential Revision: D75559591
@lizhouyu lizhouyu force-pushed the export-D75559591 branch from 09353b5 to 623f263 Compare June 6, 2025 22:08
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D75559591

lizhouyu added a commit to lizhouyu/torchrec that referenced this pull request Jun 6, 2025
Summary:
Pull Request resolved: meta-pytorch#3017

### Major changes
- Copy the following files from `fb` to corresponding location in the `torchrec` repository
  - `fb/distributed/hash_mc_embedding.py → torchrec/distributed/hash_mc_embedding.py`
  - `fb/modules/hash_mc_evictions.py → torchrec/modules/hash_mc_evictions.py`
  - `fb/modules/hash_mc_metrics.py → torchrec/modules/hash_mc_metrics.py`
  - `fb/modules/hash_mc_modules.py → torchrec/modules/hash_mc_modules.py`
- Create a `test_hash_zch_mc.py` file in `torchrec/distributed/tests` folder following the `test_quant_mc_embedding.py` in `torchrec/fb/distributed/tests`.
  - trimmed quantization and inference codes, and only kept the training part.
  - rewire the related packages from `torchrec.fb` to `torchrec`
- Update `BUCK` files in related folders
- Update the affected repos to use `torchrec` modules instead of the modules in `torchrec.fb`
- Update `/modules/hash_mc_metrics.py`
  - Replace the tensorboard module with a local file logger in `hash_mc_metrics.py` module

Differential Revision: D75559591
@lizhouyu lizhouyu force-pushed the export-D75559591 branch from 623f263 to 5487125 Compare June 6, 2025 23:21
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D75559591

lizhouyu added a commit to lizhouyu/torchrec that referenced this pull request Jun 6, 2025
Summary:
Pull Request resolved: meta-pytorch#3017

### Major changes
- Copy the following files from `fb` to corresponding location in the `torchrec` repository
  - `fb/distributed/hash_mc_embedding.py → torchrec/distributed/hash_mc_embedding.py`
  - `fb/modules/hash_mc_evictions.py → torchrec/modules/hash_mc_evictions.py`
  - `fb/modules/hash_mc_metrics.py → torchrec/modules/hash_mc_metrics.py`
  - `fb/modules/hash_mc_modules.py → torchrec/modules/hash_mc_modules.py`
- Create a `test_hash_zch_mc.py` file in `torchrec/distributed/tests` folder following the `test_quant_mc_embedding.py` in `torchrec/fb/distributed/tests`.
  - trimmed quantization and inference codes, and only kept the training part.
  - rewire the related packages from `torchrec.fb` to `torchrec`
- Update `BUCK` files in related folders
- Update the affected repos to use `torchrec` modules instead of the modules in `torchrec.fb`
- Update `/modules/hash_mc_metrics.py`
  - Replace the tensorboard module with a local file logger in `hash_mc_metrics.py` module

Differential Revision: D75559591
@lizhouyu lizhouyu force-pushed the export-D75559591 branch from 5487125 to 8cb93ef Compare June 6, 2025 23:30
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D75559591

lizhouyu added a commit to lizhouyu/torchrec that referenced this pull request Jun 6, 2025
Summary:
Pull Request resolved: meta-pytorch#3017

### Major changes
- Copy the following files from `fb` to corresponding location in the `torchrec` repository
  - `fb/distributed/hash_mc_embedding.py → torchrec/distributed/hash_mc_embedding.py`
  - `fb/modules/hash_mc_evictions.py → torchrec/modules/hash_mc_evictions.py`
  - `fb/modules/hash_mc_metrics.py → torchrec/modules/hash_mc_metrics.py`
  - `fb/modules/hash_mc_modules.py → torchrec/modules/hash_mc_modules.py`
- Create a `test_hash_zch_mc.py` file in `torchrec/distributed/tests` folder following the `test_quant_mc_embedding.py` in `torchrec/fb/distributed/tests`.
  - trimmed quantization and inference codes, and only kept the training part.
  - rewire the related packages from `torchrec.fb` to `torchrec`
- Update `BUCK` files in related folders
- Update the affected repos to use `torchrec` modules instead of the modules in `torchrec.fb`
- Update `/modules/hash_mc_metrics.py`
  - Replace the tensorboard module with a local file logger in `hash_mc_metrics.py` module

Differential Revision: D75559591
@lizhouyu lizhouyu force-pushed the export-D75559591 branch from 8cb93ef to bfe73de Compare June 6, 2025 23:57
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D75559591

lizhouyu added a commit to lizhouyu/torchrec that referenced this pull request Jun 7, 2025
Summary:
Pull Request resolved: meta-pytorch#3017

### Major changes
- Copy the following files from `fb` to corresponding location in the `torchrec` repository
  - `fb/distributed/hash_mc_embedding.py → torchrec/distributed/hash_mc_embedding.py`
  - `fb/modules/hash_mc_evictions.py → torchrec/modules/hash_mc_evictions.py`
  - `fb/modules/hash_mc_metrics.py → torchrec/modules/hash_mc_metrics.py`
  - `fb/modules/hash_mc_modules.py → torchrec/modules/hash_mc_modules.py`
- Create a `test_hash_zch_mc.py` file in `torchrec/distributed/tests` folder following the `test_quant_mc_embedding.py` in `torchrec/fb/distributed/tests`.
  - trimmed quantization and inference codes, and only kept the training part.
  - rewire the related packages from `torchrec.fb` to `torchrec`
- Update `BUCK` files in related folders
- Update the affected repos to use `torchrec` modules instead of the modules in `torchrec.fb`
- Update `/modules/hash_mc_metrics.py`
  - Replace the tensorboard module with a local file logger in `hash_mc_metrics.py` module

Differential Revision: D75559591
@lizhouyu lizhouyu force-pushed the export-D75559591 branch from bfe73de to 7ae8f1a Compare June 7, 2025 00:02
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D75559591

Summary:
Pull Request resolved: meta-pytorch#3017

### Major changes
- Copy the following files from `fb` to corresponding location in the `torchrec` repository
  - `fb/distributed/hash_mc_embedding.py → torchrec/distributed/hash_mc_embedding.py`
  - `fb/modules/hash_mc_evictions.py → torchrec/modules/hash_mc_evictions.py`
  - `fb/modules/hash_mc_metrics.py → torchrec/modules/hash_mc_metrics.py`
  - `fb/modules/hash_mc_modules.py → torchrec/modules/hash_mc_modules.py`
- Create a `test_hash_zch_mc.py` file in `torchrec/distributed/tests` folder following the `test_quant_mc_embedding.py` in `torchrec/fb/distributed/tests`.
  - trimmed quantization and inference codes, and only kept the training part.
  - rewire the related packages from `torchrec.fb` to `torchrec`
- Update `BUCK` files in related folders
- Update the affected repos to use `torchrec` modules instead of the modules in `torchrec.fb`
- Update `/modules/hash_mc_metrics.py`
  - Replace the tensorboard module with a local file logger in `hash_mc_metrics.py` module
- Update the license declaration headers for the four OSS files

Reviewed By: aporialiao

Differential Revision: D75559591
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D75559591

@lizhouyu lizhouyu force-pushed the export-D75559591 branch from f034223 to 0570185 Compare June 8, 2025 07:19
lizhouyu added a commit to lizhouyu/torchrec that referenced this pull request Jun 12, 2025
Summary:
Pull Request resolved: meta-pytorch#3017

### Major changes
- Copy the following files from `fb` to corresponding location in the `torchrec` repository
  - `fb/distributed/hash_mc_embedding.py → torchrec/distributed/hash_mc_embedding.py`
  - `fb/modules/hash_mc_evictions.py → torchrec/modules/hash_mc_evictions.py`
  - `fb/modules/hash_mc_metrics.py → torchrec/modules/hash_mc_metrics.py`
  - `fb/modules/hash_mc_modules.py → torchrec/modules/hash_mc_modules.py`
  - `fb/modules/tests/test_hash_mc_evictions.py → torchrec/modules/tests/test_hash_mc_evictions.py`
  - `fb/modules/tests/test_hash_mc_modules.py → torchrec/modules/tests/test_hash_mc_modules.py`
- Create a `test_hash_zch_mc.py` file in `torchrec/distributed/tests` folder following the `test_quant_mc_embedding.py` in `torchrec/fb/distributed/tests`.
  - trimmed quantization and inference codes, and only kept the training part.
  - rewire the related packages from `torchrec.fb` to `torchrec`
- Update `BUCK` files in related folders
- Update the affected repos to use `torchrec` modules instead of the modules in `torchrec.fb`
- Update `/modules/hash_mc_metrics.py`
  - Replace the tensorboard module with a local file logger in `hash_mc_metrics.py` module
- Update the license declaration headers for the four OSS files

### ToDos after landing this Diff
- Clean the duplicated `hash_mc_modules.py` file in the `fb` folder for safe landing.

Differential Revision: D76476676
lizhouyu added a commit to lizhouyu/torchrec that referenced this pull request Jun 12, 2025
Summary:
Pull Request resolved: meta-pytorch#3089

Pull Request resolved: meta-pytorch#3017

### Major changes
- Copy the following files from `fb` to corresponding location in the `torchrec` repository
  - `fb/distributed/hash_mc_embedding.py → torchrec/distributed/hash_mc_embedding.py`
  - `fb/modules/hash_mc_evictions.py → torchrec/modules/hash_mc_evictions.py`
  - `fb/modules/hash_mc_metrics.py → torchrec/modules/hash_mc_metrics.py`
  - `fb/modules/hash_mc_modules.py → torchrec/modules/hash_mc_modules.py`
  - `fb/modules/tests/test_hash_mc_evictions.py → torchrec/modules/tests/test_hash_mc_evictions.py`
  - `fb/modules/tests/test_hash_mc_modules.py → torchrec/modules/tests/test_hash_mc_modules.py`
- Create a `test_hash_zch_mc.py` file in `torchrec/distributed/tests` folder following the `test_quant_mc_embedding.py` in `torchrec/fb/distributed/tests`.
  - trimmed quantization and inference codes, and only kept the training part.
  - rewire the related packages from `torchrec.fb` to `torchrec`
- Update `BUCK` files in related folders
- Update the affected repos to use `torchrec` modules instead of the modules in `torchrec.fb`
- Update `/modules/hash_mc_metrics.py`
  - Replace the tensorboard module with a local file logger in `hash_mc_metrics.py` module
- Update the license declaration headers for the four OSS files

### ToDos after landing this Diff
- Clean the duplicated `hash_mc_modules.py` file in the `fb` folder for safe landing.

Differential Revision: D76476676
lizhouyu added a commit to lizhouyu/torchrec that referenced this pull request Jun 16, 2025
Summary:
Pull Request resolved: meta-pytorch#3017

### Major changes
- Copy the following files from `fb` to corresponding location in the `torchrec` repository
  - `fb/distributed/hash_mc_embedding.py → torchrec/distributed/hash_mc_embedding.py`
  - `fb/modules/hash_mc_evictions.py → torchrec/modules/hash_mc_evictions.py`
  - `fb/modules/hash_mc_metrics.py → torchrec/modules/hash_mc_metrics.py`
  - `fb/modules/hash_mc_modules.py → torchrec/modules/hash_mc_modules.py`
  - `fb/modules/tests/test_hash_mc_evictions.py → torchrec/modules/tests/test_hash_mc_evictions.py`
  - `fb/modules/tests/test_hash_mc_modules.py → torchrec/modules/tests/test_hash_mc_modules.py`
- Create a `test_hash_zch_mc.py` file in `torchrec/distributed/tests` folder following the `test_quant_mc_embedding.py` in `torchrec/fb/distributed/tests`.
  - trimmed quantization and inference codes, and only kept the training part.
  - rewire the related packages from `torchrec.fb` to `torchrec`
- Update `BUCK` files in related folders
- Update the affected repos to use `torchrec` modules instead of the modules in `torchrec.fb`
- Update `/modules/hash_mc_metrics.py`
  - Replace the tensorboard module with a local file logger in `hash_mc_metrics.py` module
- Update the license declaration headers for the four OSS files

### ToDos after landing this Diff
- Clean the duplicated `hash_mc_modules.py` file in the `fb` folder for safe landing.

Differential Revision: D76476676
lizhouyu added a commit to lizhouyu/torchrec that referenced this pull request Jun 23, 2025
Summary:
Pull Request resolved: meta-pytorch#3017

### Major changes
- Copy the following files from `fb` to corresponding location in the `torchrec` repository
  - `fb/distributed/hash_mc_embedding.py → torchrec/distributed/hash_mc_embedding.py`
  - `fb/modules/hash_mc_evictions.py → torchrec/modules/hash_mc_evictions.py`
  - `fb/modules/hash_mc_metrics.py → torchrec/modules/hash_mc_metrics.py`
  - `fb/modules/hash_mc_modules.py → torchrec/modules/hash_mc_modules.py`
  - `fb/modules/tests/test_hash_mc_evictions.py → torchrec/modules/tests/test_hash_mc_evictions.py`
  - `fb/modules/tests/test_hash_mc_modules.py → torchrec/modules/tests/test_hash_mc_modules.py`
- Create a `test_hash_zch_mc.py` file in `torchrec/distributed/tests` folder following the `test_quant_mc_embedding.py` in `torchrec/fb/distributed/tests`.
  - trimmed quantization and inference codes, and only kept the training part.
  - rewire the related packages from `torchrec.fb` to `torchrec`
- Update `BUCK` files in related folders
- Update the affected repos to use `torchrec` modules instead of the modules in `torchrec.fb`
- Update `/modules/hash_mc_metrics.py`
  - Replace the tensorboard module with a local file logger in `hash_mc_metrics.py` module
- Update the license declaration headers for the four OSS files

### ToDos after landing this Diff
- Clean the duplicated `hash_mc_modules.py` file in the `fb` folder for safe landing.

Differential Revision: D76476676
lizhouyu added a commit to lizhouyu/torchrec that referenced this pull request Jun 27, 2025
Summary:
Pull Request resolved: meta-pytorch#3089

Pull Request resolved: meta-pytorch#3017

### Major changes
- Copy the following files from `fb` to corresponding location in the `torchrec` repository
  - `fb/distributed/hash_mc_embedding.py → torchrec/distributed/hash_mc_embedding.py`
  - `fb/modules/hash_mc_evictions.py → torchrec/modules/hash_mc_evictions.py`
  - `fb/modules/hash_mc_metrics.py → torchrec/modules/hash_mc_metrics.py`
  - `fb/modules/hash_mc_modules.py → torchrec/modules/hash_mc_modules.py`
  - `fb/modules/tests/test_hash_mc_evictions.py → torchrec/modules/tests/test_hash_mc_evictions.py`
  - `fb/modules/tests/test_hash_mc_modules.py → torchrec/modules/tests/test_hash_mc_modules.py`
- Create a `test_hash_zch_mc.py` file in `torchrec/distributed/tests` folder following the `test_quant_mc_embedding.py` in `torchrec/fb/distributed/tests`.
  - trimmed quantization and inference codes, and only kept the training part.
  - rewire the related packages from `torchrec.fb` to `torchrec`
- Update `BUCK` files in related folders
- Update the affected repos to use `torchrec` modules instead of the modules in `torchrec.fb`
- Update `/modules/hash_mc_metrics.py`
  - Replace the tensorboard module with a local file logger in `hash_mc_metrics.py` module
- Update the license declaration headers for the four OSS files

### ToDos after landing this Diff
- Clean the duplicated `hash_mc_modules.py` file in the `fb` folder for safe landing.

Differential Revision: D76476676
lizhouyu added a commit to lizhouyu/torchrec that referenced this pull request Jun 27, 2025
Summary:
Pull Request resolved: meta-pytorch#3089

Pull Request resolved: meta-pytorch#3017

### Major changes
- Copy the following files from `fb` to corresponding location in the `torchrec` repository
  - `fb/distributed/hash_mc_embedding.py → torchrec/distributed/hash_mc_embedding.py`
  - `fb/modules/hash_mc_evictions.py → torchrec/modules/hash_mc_evictions.py`
  - `fb/modules/hash_mc_metrics.py → torchrec/modules/hash_mc_metrics.py`
  - `fb/modules/hash_mc_modules.py → torchrec/modules/hash_mc_modules.py`
  - `fb/modules/tests/test_hash_mc_evictions.py → torchrec/modules/tests/test_hash_mc_evictions.py`
  - `fb/modules/tests/test_hash_mc_modules.py → torchrec/modules/tests/test_hash_mc_modules.py`
- Create a `test_hash_zch_mc.py` file in `torchrec/distributed/tests` folder following the `test_quant_mc_embedding.py` in `torchrec/fb/distributed/tests`.
  - trimmed quantization and inference codes, and only kept the training part.
  - rewire the related packages from `torchrec.fb` to `torchrec`
- Update `BUCK` files in related folders
- Update the affected repos to use `torchrec` modules instead of the modules in `torchrec.fb`
- Update `/modules/hash_mc_metrics.py`
  - Replace the tensorboard module with a local file logger in `hash_mc_metrics.py` module
- Update the license declaration headers for the four OSS files

### ToDos after landing this Diff
- Clean the duplicated `hash_mc_modules.py` file in the `fb` folder for safe landing.

Differential Revision: D76476676
lizhouyu added a commit to lizhouyu/torchrec that referenced this pull request Jun 27, 2025
Summary:
Pull Request resolved: meta-pytorch#3089

Pull Request resolved: meta-pytorch#3017

### Major changes
- Copy the following files from `fb` to corresponding location in the `torchrec` repository
  - `fb/distributed/hash_mc_embedding.py → torchrec/distributed/hash_mc_embedding.py`
  - `fb/modules/hash_mc_evictions.py → torchrec/modules/hash_mc_evictions.py`
  - `fb/modules/hash_mc_metrics.py → torchrec/modules/hash_mc_metrics.py`
  - `fb/modules/hash_mc_modules.py → torchrec/modules/hash_mc_modules.py`
  - `fb/modules/tests/test_hash_mc_evictions.py → torchrec/modules/tests/test_hash_mc_evictions.py`
  - `fb/modules/tests/test_hash_mc_modules.py → torchrec/modules/tests/test_hash_mc_modules.py`
- Create a `test_hash_zch_mc.py` file in `torchrec/distributed/tests` folder following the `test_quant_mc_embedding.py` in `torchrec/fb/distributed/tests`.
  - trimmed quantization and inference codes, and only kept the training part.
  - rewire the related packages from `torchrec.fb` to `torchrec`
- Update `BUCK` files in related folders
- Update the affected repos to use `torchrec` modules instead of the modules in `torchrec.fb`
- Update `/modules/hash_mc_metrics.py`
  - Replace the tensorboard module with a local file logger in `hash_mc_metrics.py` module
- Update the license declaration headers for the four OSS files

### ToDos after landing this Diff
- Clean the duplicated `hash_mc_modules.py` file in the `fb` folder for safe landing.

Differential Revision: D76476676
lizhouyu added a commit to lizhouyu/torchrec that referenced this pull request Jun 27, 2025
Summary:
Pull Request resolved: meta-pytorch#3089

Pull Request resolved: meta-pytorch#3017

### Major changes
- Copy the following files from `fb` to corresponding location in the `torchrec` repository
  - `fb/distributed/hash_mc_embedding.py → torchrec/distributed/hash_mc_embedding.py`
  - `fb/modules/hash_mc_evictions.py → torchrec/modules/hash_mc_evictions.py`
  - `fb/modules/hash_mc_metrics.py → torchrec/modules/hash_mc_metrics.py`
  - `fb/modules/hash_mc_modules.py → torchrec/modules/hash_mc_modules.py`
  - `fb/modules/tests/test_hash_mc_evictions.py → torchrec/modules/tests/test_hash_mc_evictions.py`
  - `fb/modules/tests/test_hash_mc_modules.py → torchrec/modules/tests/test_hash_mc_modules.py`
- Create a `test_hash_zch_mc.py` file in `torchrec/distributed/tests` folder following the `test_quant_mc_embedding.py` in `torchrec/fb/distributed/tests`.
  - trimmed quantization and inference codes, and only kept the training part.
  - rewire the related packages from `torchrec.fb` to `torchrec`
- Update `BUCK` files in related folders
- Update the affected repos to use `torchrec` modules instead of the modules in `torchrec.fb`
- Update `/modules/hash_mc_metrics.py`
  - Replace the tensorboard module with a local file logger in `hash_mc_metrics.py` module
- Update the license declaration headers for the four OSS files

### ToDos after landing this Diff
- Clean the duplicated `hash_mc_modules.py` file in the `fb` folder for safe landing.

Differential Revision: D76476676
lizhouyu added a commit to lizhouyu/torchrec that referenced this pull request Jun 27, 2025
Summary:
Pull Request resolved: meta-pytorch#3089

Pull Request resolved: meta-pytorch#3017

### Major changes
- Copy the following files from `fb` to corresponding location in the `torchrec` repository
  - `fb/distributed/hash_mc_embedding.py → torchrec/distributed/hash_mc_embedding.py`
  - `fb/modules/hash_mc_evictions.py → torchrec/modules/hash_mc_evictions.py`
  - `fb/modules/hash_mc_metrics.py → torchrec/modules/hash_mc_metrics.py`
  - `fb/modules/hash_mc_modules.py → torchrec/modules/hash_mc_modules.py`
  - `fb/modules/tests/test_hash_mc_evictions.py → torchrec/modules/tests/test_hash_mc_evictions.py`
  - `fb/modules/tests/test_hash_mc_modules.py → torchrec/modules/tests/test_hash_mc_modules.py`
- Create a `test_hash_zch_mc.py` file in `torchrec/distributed/tests` folder following the `test_quant_mc_embedding.py` in `torchrec/fb/distributed/tests`.
  - trimmed quantization and inference codes, and only kept the training part.
  - rewire the related packages from `torchrec.fb` to `torchrec`
- Update `BUCK` files in related folders
- Update the affected repos to use `torchrec` modules instead of the modules in `torchrec.fb`
- Update `/modules/hash_mc_metrics.py`
  - Replace the tensorboard module with a local file logger in `hash_mc_metrics.py` module
- Update the license declaration headers for the four OSS files

### ToDos after landing this Diff
- Clean the duplicated `hash_mc_modules.py` file in the `fb` folder for safe landing.

Differential Revision: D76476676
lizhouyu added a commit to lizhouyu/torchrec that referenced this pull request Jun 27, 2025
Summary:
Pull Request resolved: meta-pytorch#3089

Pull Request resolved: meta-pytorch#3017

### Major changes
- Copy the following files from `fb` to corresponding location in the `torchrec` repository
  - `fb/distributed/hash_mc_embedding.py → torchrec/distributed/hash_mc_embedding.py`
  - `fb/modules/hash_mc_evictions.py → torchrec/modules/hash_mc_evictions.py`
  - `fb/modules/hash_mc_metrics.py → torchrec/modules/hash_mc_metrics.py`
  - `fb/modules/hash_mc_modules.py → torchrec/modules/hash_mc_modules.py`
  - `fb/modules/tests/test_hash_mc_evictions.py → torchrec/modules/tests/test_hash_mc_evictions.py`
  - `fb/modules/tests/test_hash_mc_modules.py → torchrec/modules/tests/test_hash_mc_modules.py`
- Create a `test_hash_zch_mc.py` file in `torchrec/distributed/tests` folder following the `test_quant_mc_embedding.py` in `torchrec/fb/distributed/tests`.
  - trimmed quantization and inference codes, and only kept the training part.
  - rewire the related packages from `torchrec.fb` to `torchrec`
- Update `BUCK` files in related folders
- Update the affected repos to use `torchrec` modules instead of the modules in `torchrec.fb`
- Update `/modules/hash_mc_metrics.py`
  - Replace the tensorboard module with a local file logger in `hash_mc_metrics.py` module
- Update the license declaration headers for the four OSS files

### ToDos after landing this Diff
- Clean the duplicated `hash_mc_modules.py` file in the `fb` folder for safe landing.

Differential Revision: D76476676
lizhouyu added a commit to lizhouyu/torchrec that referenced this pull request Jun 27, 2025
Summary:
Pull Request resolved: meta-pytorch#3089

Pull Request resolved: meta-pytorch#3017

### Major changes
- Copy the following files from `fb` to corresponding location in the `torchrec` repository
  - `fb/distributed/hash_mc_embedding.py → torchrec/distributed/hash_mc_embedding.py`
  - `fb/modules/hash_mc_evictions.py → torchrec/modules/hash_mc_evictions.py`
  - `fb/modules/hash_mc_metrics.py → torchrec/modules/hash_mc_metrics.py`
  - `fb/modules/hash_mc_modules.py → torchrec/modules/hash_mc_modules.py`
  - `fb/modules/tests/test_hash_mc_evictions.py → torchrec/modules/tests/test_hash_mc_evictions.py`
  - `fb/modules/tests/test_hash_mc_modules.py → torchrec/modules/tests/test_hash_mc_modules.py`
- Create a `test_hash_zch_mc.py` file in `torchrec/distributed/tests` folder following the `test_quant_mc_embedding.py` in `torchrec/fb/distributed/tests`.
  - trimmed quantization and inference codes, and only kept the training part.
  - rewire the related packages from `torchrec.fb` to `torchrec`
- Update `BUCK` files in related folders
- Update the affected repos to use `torchrec` modules instead of the modules in `torchrec.fb`
- Update `/modules/hash_mc_metrics.py`
  - Replace the tensorboard module with a local file logger in `hash_mc_metrics.py` module
- Update the license declaration headers for the four OSS files
- Add Non-GPU skip condition check for the test `test_dynamically_switch_inference_training_mode` in `torchrec/modules/tests/test_hash_mc_modules.py`.

### ToDos after landing this Diff
- Clean the duplicated `hash_mc_modules.py` file in the `fb` folder for safe landing.

Differential Revision: D76476676
lizhouyu added a commit to lizhouyu/torchrec that referenced this pull request Jun 27, 2025
Summary:
Pull Request resolved: meta-pytorch#3089

Pull Request resolved: meta-pytorch#3017

### Major changes
- Copy the following files from `fb` to corresponding location in the `torchrec` repository
  - `fb/distributed/hash_mc_embedding.py → torchrec/distributed/hash_mc_embedding.py`
  - `fb/modules/hash_mc_evictions.py → torchrec/modules/hash_mc_evictions.py`
  - `fb/modules/hash_mc_metrics.py → torchrec/modules/hash_mc_metrics.py`
  - `fb/modules/hash_mc_modules.py → torchrec/modules/hash_mc_modules.py`
  - `fb/modules/tests/test_hash_mc_evictions.py → torchrec/modules/tests/test_hash_mc_evictions.py`
  - `fb/modules/tests/test_hash_mc_modules.py → torchrec/modules/tests/test_hash_mc_modules.py`
- Create a `test_hash_zch_mc.py` file in `torchrec/distributed/tests` folder following the `test_quant_mc_embedding.py` in `torchrec/fb/distributed/tests`.
  - trimmed quantization and inference codes, and only kept the training part.
  - rewire the related packages from `torchrec.fb` to `torchrec`
- Update `BUCK` files in related folders
- Update the affected repos to use `torchrec` modules instead of the modules in `torchrec.fb`
- Update `/modules/hash_mc_metrics.py`
  - Replace the tensorboard module with a local file logger in `hash_mc_metrics.py` module
- Update the license declaration headers for the four OSS files
- Add Non-GPU skip condition check for the test `test_dynamically_switch_inference_training_mode` in `torchrec/modules/tests/test_hash_mc_modules.py`.

### ToDos after landing this Diff
- Clean the duplicated `hash_mc_modules.py` file in the `fb` folder for safe landing.

Differential Revision: D76476676
facebook-github-bot pushed a commit that referenced this pull request Jun 28, 2025
Summary:
Pull Request resolved: #3089

Pull Request resolved: #3017

### Major changes
- Copy the following files from `fb` to corresponding location in the `torchrec` repository
  - `fb/distributed/hash_mc_embedding.py → torchrec/distributed/hash_mc_embedding.py`
  - `fb/modules/hash_mc_evictions.py → torchrec/modules/hash_mc_evictions.py`
  - `fb/modules/hash_mc_metrics.py → torchrec/modules/hash_mc_metrics.py`
  - `fb/modules/hash_mc_modules.py → torchrec/modules/hash_mc_modules.py`
  - `fb/modules/tests/test_hash_mc_evictions.py → torchrec/modules/tests/test_hash_mc_evictions.py`
  - `fb/modules/tests/test_hash_mc_modules.py → torchrec/modules/tests/test_hash_mc_modules.py`
- Create a `test_hash_zch_mc.py` file in `torchrec/distributed/tests` folder following the `test_quant_mc_embedding.py` in `torchrec/fb/distributed/tests`.
  - trimmed quantization and inference codes, and only kept the training part.
  - rewire the related packages from `torchrec.fb` to `torchrec`
- Update `BUCK` files in related folders
- Update the affected repos to use `torchrec` modules instead of the modules in `torchrec.fb`
- Update `/modules/hash_mc_metrics.py`
  - Replace the tensorboard module with a local file logger in `hash_mc_metrics.py` module
- Update the license declaration headers for the four OSS files
- Add Non-GPU skip condition check for the test `test_dynamically_switch_inference_training_mode` in `torchrec/modules/tests/test_hash_mc_modules.py`.

### ToDos after landing this Diff
- Clean the duplicated `hash_mc_modules.py` file in the `fb` folder for safe landing.

Reviewed By: kausv

Differential Revision: D76476676

fbshipit-source-id: c1709bc125be2ca64180c85cb031bd5d4741c7fa
lizhouyu added a commit to lizhouyu/torchrec that referenced this pull request Jun 30, 2025
Summary:
Pull Request resolved: meta-pytorch#3089

Pull Request resolved: meta-pytorch#3017

### Major changes
- Copy the following files from `fb` to corresponding location in the `torchrec` repository
  - `fb/distributed/hash_mc_embedding.py → torchrec/distributed/hash_mc_embedding.py`
  - `fb/modules/hash_mc_evictions.py → torchrec/modules/hash_mc_evictions.py`
  - `fb/modules/hash_mc_metrics.py → torchrec/modules/hash_mc_metrics.py`
  - `fb/modules/hash_mc_modules.py → torchrec/modules/hash_mc_modules.py`
  - `fb/modules/tests/test_hash_mc_evictions.py → torchrec/modules/tests/test_hash_mc_evictions.py`
  - `fb/modules/tests/test_hash_mc_modules.py → torchrec/modules/tests/test_hash_mc_modules.py`
- Update `BUCK` files in related folders
- Update the affected repos to use `torchrec` modules instead of the modules in `torchrec.fb`
- Update `/modules/hash_mc_metrics.py`
  - Replace the tensorboard module with a local file logger in `hash_mc_metrics.py` module
- Update the license declaration headers for the four OSS files
- Add Non-GPU skip condition check for the test `test_dynamically_switch_inference_training_mode` in `torchrec/modules/tests/test_hash_mc_modules.py`.
- Rewrite downstream codes' dependencies to MPZCH modules with the open sourced one (from `"//torchrec/fb/modules:hash_mc_*"` to `"//torchrec/modules:hash_mc_*"`, and from `torch.fb.modules.hash_mc_*` to `torch.modules.hash_mc_*`, except for files in the following paths: `dper_lib,torchrec/fb,minimal_viable_ai,~` to avoid breaking mvai cogwheel tests.

### ToDos after landing this Diff
- Clean the duplicated `hash_mc_*.py` file in the `fb` folder for safe landing.

Differential Revision: D77558442
lizhouyu added a commit to lizhouyu/torchrec that referenced this pull request Jun 30, 2025
Summary:
Pull Request resolved: meta-pytorch#3147

Pull Request resolved: meta-pytorch#3089

Pull Request resolved: meta-pytorch#3017

### Major changes
- Copy the following files from `fb` to corresponding location in the `torchrec` repository
  - `fb/distributed/hash_mc_embedding.py → torchrec/distributed/hash_mc_embedding.py`
  - `fb/modules/hash_mc_evictions.py → torchrec/modules/hash_mc_evictions.py`
  - `fb/modules/hash_mc_metrics.py → torchrec/modules/hash_mc_metrics.py`
  - `fb/modules/hash_mc_modules.py → torchrec/modules/hash_mc_modules.py`
  - `fb/modules/tests/test_hash_mc_evictions.py → torchrec/modules/tests/test_hash_mc_evictions.py`
  - `fb/modules/tests/test_hash_mc_modules.py → torchrec/modules/tests/test_hash_mc_modules.py`
- Update `BUCK` files in related folders
- Update the affected repos to use `torchrec` modules instead of the modules in `torchrec.fb`
- Update `/modules/hash_mc_metrics.py`
  - Replace the tensorboard module with a local file logger in `hash_mc_metrics.py` module
- Update the license declaration headers for the four OSS files
- Add Non-GPU skip condition check for the test `test_dynamically_switch_inference_training_mode` in `torchrec/modules/tests/test_hash_mc_modules.py`.
- Rewrite downstream codes' dependencies to MPZCH modules with the open sourced one (from `"//torchrec/fb/modules:hash_mc_*"` to `"//torchrec/modules:hash_mc_*"`, and from `torch.fb.modules.hash_mc_*` to `torch.modules.hash_mc_*`, except for files in the following paths: `dper_lib,torchrec/fb,minimal_viable_ai,~` to avoid breaking mvai cogwheel tests.

### ToDos after landing this Diff
- Clean the duplicated `hash_mc_*.py` file in the `fb` folder for safe landing.

Differential Revision: D77558442
lizhouyu added a commit to lizhouyu/torchrec that referenced this pull request Jun 30, 2025
Summary:
Pull Request resolved: meta-pytorch#3147

Pull Request resolved: meta-pytorch#3089

Pull Request resolved: meta-pytorch#3017

### Major changes
- Copy the following files from `fb` to corresponding location in the `torchrec` repository
  - `fb/distributed/hash_mc_embedding.py → torchrec/distributed/hash_mc_embedding.py`
  - `fb/modules/hash_mc_evictions.py → torchrec/modules/hash_mc_evictions.py`
  - `fb/modules/hash_mc_metrics.py → torchrec/modules/hash_mc_metrics.py`
  - `fb/modules/hash_mc_modules.py → torchrec/modules/hash_mc_modules.py`
  - `fb/modules/tests/test_hash_mc_evictions.py → torchrec/modules/tests/test_hash_mc_evictions.py`
  - `fb/modules/tests/test_hash_mc_modules.py → torchrec/modules/tests/test_hash_mc_modules.py`
- Update `BUCK` files in related folders
- Update the affected repos to use `torchrec` modules instead of the modules in `torchrec.fb`
- Update `/modules/hash_mc_metrics.py`
  - Replace the tensorboard module with a local file logger in `hash_mc_metrics.py` module
- Update the license declaration headers for the four OSS files
- Add Non-GPU skip condition check for the test `test_dynamically_switch_inference_training_mode` in `torchrec/modules/tests/test_hash_mc_modules.py`.
- Rewrite downstream codes' dependencies to MPZCH modules with the open sourced one (from `"//torchrec/fb/modules:hash_mc_*"` to `"//torchrec/modules:hash_mc_*"`, and from `torch.fb.modules.hash_mc_*` to `torch.modules.hash_mc_*`, except for files in the following paths: `dper_lib,torchrec/fb,minimal_viable_ai,~` to avoid breaking mvai cogwheel tests.

### ToDos after landing this Diff
- Clean the duplicated `hash_mc_*.py` file in the `fb` folder for safe landing.

Differential Revision: D77558442
lizhouyu added a commit to lizhouyu/torchrec that referenced this pull request Jul 1, 2025
Summary:
Pull Request resolved: meta-pytorch#3147

Pull Request resolved: meta-pytorch#3089

Pull Request resolved: meta-pytorch#3017

### Major changes
- Copy the following files from `fb` to corresponding location in the `torchrec` repository
  - `fb/distributed/hash_mc_embedding.py → torchrec/distributed/hash_mc_embedding.py`
  - `fb/modules/hash_mc_evictions.py → torchrec/modules/hash_mc_evictions.py`
  - `fb/modules/hash_mc_metrics.py → torchrec/modules/hash_mc_metrics.py`
  - `fb/modules/hash_mc_modules.py → torchrec/modules/hash_mc_modules.py`
  - `fb/modules/tests/test_hash_mc_evictions.py → torchrec/modules/tests/test_hash_mc_evictions.py`
  - `fb/modules/tests/test_hash_mc_modules.py → torchrec/modules/tests/test_hash_mc_modules.py`
- Update `BUCK` files in related folders
- Update the affected repos to use `torchrec` modules instead of the modules in `torchrec.fb`
- Update `/modules/hash_mc_metrics.py`
  - Replace the tensorboard module with a local file logger in `hash_mc_metrics.py` module
- Update the license declaration headers for the four OSS files
- Add Non-GPU skip condition check for the test `test_dynamically_switch_inference_training_mode` in `torchrec/modules/tests/test_hash_mc_modules.py`.
- Rewrite downstream codes' dependencies to MPZCH modules with the open sourced one (from `"//torchrec/fb/modules:hash_mc_*"` to `"//torchrec/modules:hash_mc_*"`, and from `torch.fb.modules.hash_mc_*` to `torch.modules.hash_mc_*`, except for files in the following paths: `dper_lib,torchrec/fb,minimal_viable_ai,~` to avoid breaking mvai cogwheel tests.

### ToDos after landing this Diff
- Clean the duplicated `hash_mc_*.py` file in the `fb` folder for safe landing.

Differential Revision: D77558442
lizhouyu added a commit to lizhouyu/torchrec that referenced this pull request Jul 1, 2025
Summary:
Pull Request resolved: meta-pytorch#3147

Pull Request resolved: meta-pytorch#3089

Pull Request resolved: meta-pytorch#3017

### Major changes
- Copy the following files from `fb` to corresponding location in the `torchrec` repository
  - `fb/distributed/hash_mc_embedding.py → torchrec/distributed/hash_mc_embedding.py`
  - `fb/modules/hash_mc_evictions.py → torchrec/modules/hash_mc_evictions.py`
  - `fb/modules/hash_mc_metrics.py → torchrec/modules/hash_mc_metrics.py`
  - `fb/modules/hash_mc_modules.py → torchrec/modules/hash_mc_modules.py`
  - `fb/modules/tests/test_hash_mc_evictions.py → torchrec/modules/tests/test_hash_mc_evictions.py`
  - `fb/modules/tests/test_hash_mc_modules.py → torchrec/modules/tests/test_hash_mc_modules.py`
- Update `BUCK` files in related folders
- Update the affected repos to use `torchrec` modules instead of the modules in `torchrec.fb`
- Update `/modules/hash_mc_metrics.py`
  - Replace the tensorboard module with a local file logger in `hash_mc_metrics.py` module
- Update the license declaration headers for the four OSS files
- Add Non-GPU skip condition check for the test `test_dynamically_switch_inference_training_mode` in `torchrec/modules/tests/test_hash_mc_modules.py`.
- Rewrite downstream codes' dependencies to MPZCH modules with the open sourced one (from `"//torchrec/fb/modules:hash_mc_*"` to `"//torchrec/modules:hash_mc_*"`, and from `torch.fb.modules.hash_mc_*` to `torch.modules.hash_mc_*`, except for files in the following paths: `dper_lib,torchrec/fb,minimal_viable_ai,~` to avoid breaking mvai cogwheel tests.

### ToDos after landing this Diff
- Clean the duplicated `hash_mc_*.py` file in the `fb` folder for safe landing.

Differential Revision: D77558442
lizhouyu added a commit to lizhouyu/torchrec that referenced this pull request Jul 1, 2025
Summary:
Pull Request resolved: meta-pytorch#3147

Pull Request resolved: meta-pytorch#3089

Pull Request resolved: meta-pytorch#3017

### Major changes
- Copy the following files from `fb` to corresponding location in the `torchrec` repository
  - `fb/distributed/hash_mc_embedding.py → torchrec/distributed/hash_mc_embedding.py`
  - `fb/modules/hash_mc_evictions.py → torchrec/modules/hash_mc_evictions.py`
  - `fb/modules/hash_mc_metrics.py → torchrec/modules/hash_mc_metrics.py`
  - `fb/modules/hash_mc_modules.py → torchrec/modules/hash_mc_modules.py`
  - `fb/modules/tests/test_hash_mc_evictions.py → torchrec/modules/tests/test_hash_mc_evictions.py`
  - `fb/modules/tests/test_hash_mc_modules.py → torchrec/modules/tests/test_hash_mc_modules.py`
- Update `BUCK` files in related folders
- Update the affected repos to use `torchrec` modules instead of the modules in `torchrec.fb`
- Update `/modules/hash_mc_metrics.py`
  - Replace the tensorboard module with a local file logger in `hash_mc_metrics.py` module to avoid OSS CI test failures
  - The original tensorboard version is kept in the `torchrec/fb` folder.
- Update the license declaration headers for the four OSS files
- Add Non-GPU skip condition check for the test `test_dynamically_switch_inference_training_mode` in `torchrec/modules/tests/test_hash_mc_modules.py`.
- Rewrite downstream codes' dependencies to MPZCH modules with the open sourced one (from `"//torchrec/fb/modules:hash_mc_*"` to `"//torchrec/modules:hash_mc_*"`, and from `torch.fb.modules.hash_mc_*` to `torch.modules.hash_mc_*`, except for files in the following paths: `dper_lib,torchrec/fb,minimal_viable_ai,~` to avoid breaking mvai cogwheel tests.

### ToDos after landing this Diff
- Clean the duplicated `hash_mc_*.py` file in the `fb` folder for safe landing.

Differential Revision: D77558442
lizhouyu added a commit to lizhouyu/torchrec that referenced this pull request Jul 1, 2025
Summary:
Pull Request resolved: meta-pytorch#3147

Pull Request resolved: meta-pytorch#3089

Pull Request resolved: meta-pytorch#3017

### Major changes
- Copy the following files from `fb` to corresponding location in the `torchrec` repository
  - `fb/distributed/hash_mc_embedding.py → torchrec/distributed/hash_mc_embedding.py`
  - `fb/modules/hash_mc_evictions.py → torchrec/modules/hash_mc_evictions.py`
  - `fb/modules/hash_mc_metrics.py → torchrec/modules/hash_mc_metrics.py`
  - `fb/modules/hash_mc_modules.py → torchrec/modules/hash_mc_modules.py`
  - `fb/modules/tests/test_hash_mc_evictions.py → torchrec/modules/tests/test_hash_mc_evictions.py`
  - `fb/modules/tests/test_hash_mc_modules.py → torchrec/modules/tests/test_hash_mc_modules.py`
- Update `BUCK` files in related folders
- Update the affected repos to use `torchrec` modules instead of the modules in `torchrec.fb`
- Update `/modules/hash_mc_metrics.py`
  - Replace the tensorboard module with a local file logger in `hash_mc_metrics.py` module to avoid OSS CI test failures
  - The original tensorboard version is kept in the `torchrec/fb` folder.
- Update the license declaration headers for the four OSS files
- Add Non-GPU skip condition check for the test `test_dynamically_switch_inference_training_mode` in `torchrec/modules/tests/test_hash_mc_modules.py`.
- Rewrite downstream codes' dependencies to MPZCH modules with the open sourced one (from `"//torchrec/fb/modules:hash_mc_*"` to `"//torchrec/modules:hash_mc_*"`, and from `torch.fb.modules.hash_mc_*` to `torch.modules.hash_mc_*`, except for files in the following paths: `dper_lib,torchrec/fb,minimal_viable_ai,~` to avoid breaking mvai cogwheel tests.

### ToDos after landing this Diff
- Clean the duplicated `hash_mc_*.py` file in the `fb` folder for safe landing.

Differential Revision: D77558442
lizhouyu added a commit to lizhouyu/torchrec that referenced this pull request Jul 1, 2025
Summary:
Pull Request resolved: meta-pytorch#3147

Pull Request resolved: meta-pytorch#3089

Pull Request resolved: meta-pytorch#3017

### Major changes
- Copy the following files from `fb` to corresponding location in the `torchrec` repository
  - `fb/distributed/hash_mc_embedding.py → torchrec/distributed/hash_mc_embedding.py`
  - `fb/modules/hash_mc_evictions.py → torchrec/modules/hash_mc_evictions.py`
  - `fb/modules/hash_mc_metrics.py → torchrec/modules/hash_mc_metrics.py`
  - `fb/modules/hash_mc_modules.py → torchrec/modules/hash_mc_modules.py`
  - `fb/modules/tests/test_hash_mc_evictions.py → torchrec/modules/tests/test_hash_mc_evictions.py`
  - `fb/modules/tests/test_hash_mc_modules.py → torchrec/modules/tests/test_hash_mc_modules.py`
- Update `BUCK` files in related folders
- Update the affected repos to use `torchrec` modules instead of the modules in `torchrec.fb`
- Update `/modules/hash_mc_metrics.py`
  - Replace the tensorboard module with a local file logger in `hash_mc_metrics.py` module to avoid OSS CI test failures
  - The original tensorboard version is kept in the `torchrec/fb` folder.
- Update the license declaration headers for the four OSS files
- Add Non-GPU skip condition check for the test `test_dynamically_switch_inference_training_mode` in `torchrec/modules/tests/test_hash_mc_modules.py`.
- Rewrite downstream codes' dependencies to MPZCH modules with the open sourced one (from `"//torchrec/fb/modules:hash_mc_*"` to `"//torchrec/modules:hash_mc_*"`, and from `torch.fb.modules.hash_mc_*` to `torch.modules.hash_mc_*`, except for files in the following paths: `dper_lib,torchrec/fb,minimal_viable_ai,~` to avoid breaking mvai cogwheel tests.

### ToDos after landing this Diff
- Clean the duplicated `hash_mc_*.py` file in the `fb` folder for safe landing.

Differential Revision: D77558442
lizhouyu added a commit to lizhouyu/torchrec that referenced this pull request Jul 1, 2025
Summary:
Pull Request resolved: meta-pytorch#3147

Pull Request resolved: meta-pytorch#3089

Pull Request resolved: meta-pytorch#3017

### Major changes
- Copy the following files from `fb` to corresponding location in the `torchrec` repository
  - `fb/distributed/hash_mc_embedding.py → torchrec/distributed/hash_mc_embedding.py`
  - `fb/modules/hash_mc_evictions.py → torchrec/modules/hash_mc_evictions.py`
  - `fb/modules/hash_mc_metrics.py → torchrec/modules/hash_mc_metrics.py`
  - `fb/modules/hash_mc_modules.py → torchrec/modules/hash_mc_modules.py`
  - `fb/modules/tests/test_hash_mc_evictions.py → torchrec/modules/tests/test_hash_mc_evictions.py`
  - `fb/modules/tests/test_hash_mc_modules.py → torchrec/modules/tests/test_hash_mc_modules.py`
- Update `/modules/hash_mc_metrics.py`
  - Replace the tensorboard module with a local file logger in `hash_mc_metrics.py` module to avoid OSS CI test failures
  - The original tensorboard version is kept in the `torchrec/fb` folder.
- Update the license declaration headers for the four OSS files

Differential Revision: D77558442
lizhouyu added a commit to lizhouyu/torchrec that referenced this pull request Jul 1, 2025
Summary:
Pull Request resolved: meta-pytorch#3147

Pull Request resolved: meta-pytorch#3089

Pull Request resolved: meta-pytorch#3017

### Major changes
- Copy the following files from `fb` to corresponding location in the `torchrec` repository
  - `fb/distributed/hash_mc_embedding.py → torchrec/distributed/hash_mc_embedding.py`
  - `fb/modules/hash_mc_evictions.py → torchrec/modules/hash_mc_evictions.py`
  - `fb/modules/hash_mc_metrics.py → torchrec/modules/hash_mc_metrics.py`
  - `fb/modules/hash_mc_modules.py → torchrec/modules/hash_mc_modules.py`
  - `fb/modules/tests/test_hash_mc_evictions.py → torchrec/modules/tests/test_hash_mc_evictions.py`
  - `fb/modules/tests/test_hash_mc_modules.py → torchrec/modules/tests/test_hash_mc_modules.py`
- Update `/modules/hash_mc_metrics.py`
  - Replace the tensorboard module with a local file logger in `hash_mc_metrics.py` module to avoid OSS CI test failures
  - The original tensorboard version is kept in the `torchrec/fb` folder.
- Update the license declaration headers for the four OSS files

Differential Revision: D77558442
facebook-github-bot pushed a commit that referenced this pull request Jul 1, 2025
Summary:
Pull Request resolved: #3147

Pull Request resolved: #3089

Pull Request resolved: #3017

### Major changes
- Copy the following files from `fb` to corresponding location in the `torchrec` repository
  - `fb/distributed/hash_mc_embedding.py → torchrec/distributed/hash_mc_embedding.py`
  - `fb/modules/hash_mc_evictions.py → torchrec/modules/hash_mc_evictions.py`
  - `fb/modules/hash_mc_metrics.py → torchrec/modules/hash_mc_metrics.py`
  - `fb/modules/hash_mc_modules.py → torchrec/modules/hash_mc_modules.py`
  - `fb/modules/tests/test_hash_mc_evictions.py → torchrec/modules/tests/test_hash_mc_evictions.py`
  - `fb/modules/tests/test_hash_mc_modules.py → torchrec/modules/tests/test_hash_mc_modules.py`
- Update `/modules/hash_mc_metrics.py`
  - Replace the tensorboard module with a local file logger in `hash_mc_metrics.py` module to avoid OSS CI test failures
  - The original tensorboard version is kept in the `torchrec/fb` folder.
- Update the license declaration headers for the four OSS files

Reviewed By: kausv

Differential Revision: D77558442

fbshipit-source-id: 99c00712e0f8e84ff2629943c1b2e82d64a6b392
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. fb-exported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants