Skip to content

Commit

Permalink
feat(remote-model): metadata update
Browse files Browse the repository at this point in the history
  • Loading branch information
giuseppeambrosio97 committed Dec 10, 2024
1 parent 4b57251 commit be4c73a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions focoos/remote_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,11 @@ def __init__(self, model_ref: str, http_client: HttpClient):

def get_info(self) -> ModelMetadata:
res = self.http_client.get(f"models/{self.model_ref}")
self.metadata = ModelMetadata(**res.json())
if res.status_code == 200:
return self.metadata
else:
if res.status_code != 200:
logger.error(f"Failed to get model info: {res.status_code} {res.text}")
raise ValueError(f"Failed to get model info: {res.status_code} {res.text}")
self.metadata = ModelMetadata(**res.json())
return self.metadata

def train(
self,
Expand Down

0 comments on commit be4c73a

Please sign in to comment.