Skip to content

Commit c5a4b59

Browse files
yupadhyayfacebook-github-bot
authored andcommitted
DLRM examples to create prediction using TorchRec library. This shows basic example of how to use TorchRec library quickly locally. (#3043)
Summary: Adding end to end example of using TorchRec library with DLRM to create recommendation. You can use this example in local machine to run and test how TorchRec is used for simple use case. Differential Revision: D75989524
1 parent c0670d4 commit c5a4b59

File tree

4 files changed

+673
-0
lines changed

4 files changed

+673
-0
lines changed

examples/prediction/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Running torchrec with torchx using Ray scheduler on a Ray cluster
2+
3+
Install torchrec:
4+
5+
```
6+
pip install --pre torchrec -f https://download.pytorch.org/whl/torchrec/index.html
7+
```
8+
9+
Run locally:
10+
11+
```
12+
python3 predict_using_torchrec.py
13+
```

examples/prediction/__init__.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env python3
2+
# Copyright (c) Meta Platforms, Inc. and affiliates.
3+
# All rights reserved.
4+
#
5+
# This source code is licensed under the BSD-style license found in the
6+
# LICENSE file in the root directory of this source tree.
7+
8+
# pyre-strict
9+
10+
11+
def main() -> None:
12+
"""DOC_STRING"""
13+
14+
15+
if __name__ == "__main__":
16+
main()

0 commit comments

Comments
 (0)