[Feature Proposal] Extend torch hub to better support cloud serving and edge deployment #90147
Labels
feature
A request for a proper, new feature.
module: hub
triaged
This issue has been looked at a team member, and triaged and prioritized into an appropriate module
馃殌 The feature, motivation and pitch
TL;DR: Extend torch hub to better support cloud serving and edge deployment by:
hubconf.py
as an entrypoint for serving and deployment, like HuggingFace Inferece HandlerBackground
I was a PhD researcher a while ago and am now an AI practitioner in the industry. From my personal experience and observation, the pytorch hub provides incremental value to researchers, because:
torch.hub.load
interface is not very much helpful to them.However, industry community usually don't have the advantages mentioned above, therefore the hub can be a valuable information source to them. But when they choose a model, they not only want an interface to run some sample data, deployment easiness and model performance are also important factors to consider.
That's why huggingface transformers, yolo-series, and mmdetection are very popular.
But not all researchers like to submit their models to those repos due to the extensive customizations needed, therefore, a lightweight hubconf.py could just reduce the gap between research and production need.
Proposed changes
hubconf.py
: provides a reference format to share models, and acts as an interface for deployment, benchmarking and serving.A very rough example is shown below, just for discussion purpose.
Hub website: "Discover and publish models to a pre-trained model repository designed for research exploration." -> "For research exploration and production use". And in the future, allow third-party providers to plug in model statistics based on
hubconf.py
Disclaimer
Our company is currently working on an MLOps platform to facilitate the production of PyTorch models. We see a clear benefit that a shared protocol could further reduce the friction between research and industry communities. We would like to hear feedback from PyTorch team and we are also open to take the initial effort to extend the hubconf and adopt open-source repos to fit this extended format.
Alternatives
No response
Additional context
No response
cc @nairbv @NicolasHug @vmoens @jdsgomes
The text was updated successfully, but these errors were encountered: