torch_hub_load_uri#

torch_hub_load_uri(uri: str, entrypoint: str, *args, dst_dir: Optional[str] = None, **kwargs) Any[source]#

Load an entrypoint from a uri.

Load an entrypoint from:
  • a local uri of a zip file, or

  • a local uri of a directory, or

  • a remote uri of zip file.

The zip file should either have hubconf.py at the top level or contain a single sub-directory that contains hubconf.py at its top level. In the latter case, the sub-directory will be copied to dst_dir.

Parameters
  • uri (str) – A URI.

  • entrypoint (str) – Name of a callable present in hubconf.py.

  • *args – Args to be passed to the entrypoint.

  • dst_dir (Optional[str]) – If provided, the contents from the uri are copied there. Defaults to None.

  • **kwargs – Keyword args to be passed to the entrypoint.

Returns

The output from calling the entrypoint.

Return type

Any