torch_hub_load_uri#

torch_hub_load_uri(uri: str, hubconf_dir: str, entrypoint: str, *args, **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 hubconf_dir.

Parameters
  • uri (str) – A URI.

  • hubconf_dir (str) – The target directory where the contents from the uri will finally be saved to.

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

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

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

Returns

The output from calling the entrypoint.

Return type

Any