From 16cb9f8b2701cc92975dff1724b3904c08f6bf57 Mon Sep 17 00:00:00 2001 From: osanseviero Date: Tue, 22 Jun 2021 13:43:05 +0200 Subject: [PATCH 1/3] Add config to model info --- src/huggingface_hub/hf_api.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/huggingface_hub/hf_api.py b/src/huggingface_hub/hf_api.py index 2d8d8ddf5f..1ad2a18a30 100644 --- a/src/huggingface_hub/hf_api.py +++ b/src/huggingface_hub/hf_api.py @@ -84,6 +84,7 @@ def __init__( siblings: Optional[ List[Dict] ] = None, # list of files that constitute the model + config: Optional[Dict] = None, **kwargs, ): self.modelId = modelId @@ -94,6 +95,7 @@ def __init__( self.siblings = ( [ModelFile(**x) for x in siblings] if siblings is not None else None ) + self.config = config for k, v in kwargs.items(): setattr(self, k, v) From f900106ccd6e318f790ef6971b571eefa03ee067 Mon Sep 17 00:00:00 2001 From: osanseviero Date: Tue, 22 Jun 2021 13:44:37 +0200 Subject: [PATCH 2/3] Add docstring --- src/huggingface_hub/hf_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/huggingface_hub/hf_api.py b/src/huggingface_hub/hf_api.py index 1ad2a18a30..45d814bd6e 100644 --- a/src/huggingface_hub/hf_api.py +++ b/src/huggingface_hub/hf_api.py @@ -84,7 +84,7 @@ def __init__( siblings: Optional[ List[Dict] ] = None, # list of files that constitute the model - config: Optional[Dict] = None, + config: Optional[Dict] = None, # information about model configuration **kwargs, ): self.modelId = modelId From a89fc6347f1ff9a2607c0d8ae4490b13e5271a48 Mon Sep 17 00:00:00 2001 From: osanseviero Date: Tue, 22 Jun 2021 13:44:55 +0200 Subject: [PATCH 3/3] Add format --- src/huggingface_hub/hf_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/huggingface_hub/hf_api.py b/src/huggingface_hub/hf_api.py index 45d814bd6e..8cc3ed07d7 100644 --- a/src/huggingface_hub/hf_api.py +++ b/src/huggingface_hub/hf_api.py @@ -84,7 +84,7 @@ def __init__( siblings: Optional[ List[Dict] ] = None, # list of files that constitute the model - config: Optional[Dict] = None, # information about model configuration + config: Optional[Dict] = None, # information about model configuration **kwargs, ): self.modelId = modelId