1
0
Fork 0

pass kwargs on to client

This commit is contained in:
Sean Sube 2023-12-09 23:09:00 -06:00
parent 35c973e55f
commit 22e0597916
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
1 changed files with 2 additions and 1 deletions

View File

@ -35,6 +35,7 @@ def fetch_model(
source: str, source: str,
format: Optional[str] = None, format: Optional[str] = None,
dest: Optional[str] = None, dest: Optional[str] = None,
**kwargs,
) -> str: ) -> str:
# TODO: switch to urlparse's default scheme # TODO: switch to urlparse's default scheme
if source.startswith(path.sep) or source.startswith("."): if source.startswith(path.sep) or source.startswith("."):
@ -45,7 +46,7 @@ def fetch_model(
if source.startswith(proto): if source.startswith(proto):
# TODO: fix type of client_type # TODO: fix type of client_type
client: BaseClient = client_type() client: BaseClient = client_type()
return client.download(conversion, name, source, format=format, dest=dest) return client.download(conversion, name, source, format=format, dest=dest, **kwargs)
logger.warning("unknown model protocol, using path as provided: %s", source) logger.warning("unknown model protocol, using path as provided: %s", source)
return source return source