Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SAM2 AMG cli.py on modal #1349

Merged
merged 5 commits into from
Nov 26, 2024
Merged

SAM2 AMG cli.py on modal #1349

merged 5 commits into from
Nov 26, 2024

Conversation

cpuhrsch
Copy link
Contributor

@cpuhrsch cpuhrsch commented Nov 26, 2024

Basic variant to run cli main function on modal. Can still significantly improve startup time.

Copy link

pytorch-bot bot commented Nov 26, 2024

🔗 Helpful Links

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

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

❌ 8 New Failures

As of commit 81d7afa with merge base 478d15b (image):

NEW FAILURES - The following jobs have failed:

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

@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 Nov 26, 2024
@cpuhrsch cpuhrsch added the topic: improvement Use this tag if this PR is an improvement (doesn't fit into any of the other categories) label Nov 26, 2024
@cpuhrsch cpuhrsch changed the title [WIP] cli.py on modal SAM2 AMG cli.py on modal Nov 26, 2024
@cpuhrsch cpuhrsch marked this pull request as ready for review November 26, 2024 04:50
@cpuhrsch cpuhrsch merged commit 615fb0e into main Nov 26, 2024
7 checks passed
yanbing-j pushed a commit to yanbing-j/ao that referenced this pull request Dec 9, 2024
…t don't need a model (pytorch#1349)

These changes add a little complexity with the lazy and local imports, but
they also greatly improve the CLI's response for --help, list, and where.

Changes:

* Move `import torch` into function bodies that need them
* Use `importlib.metadata.version` to check the torch version rather than
  torch.__version__
* Switch from using torch.inference_mode as a decorator to using it as a
  context manager.
  * I also removed it from convert_hf_checkpoint_to_tune since that does
    not use torch at all
* In build_utils, wrap the dtype values in lambdas so they're lazily
  fetched.

pytorch/torchchat#1347
Branch: FasterCli-1347

Signed-off-by: Gabe Goodhart <[email protected]>
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. topic: improvement Use this tag if this PR is an improvement (doesn't fit into any of the other categories)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants