Skip to content

Commit

Permalink
Merge pull request #1318 from gchq/BAI-1330-python-from-id-bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
a3957273 committed Jun 11, 2024
2 parents fa0521c + 2bc875d commit 3af6bd3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/python/src/bailo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
from __future__ import annotations
import logging

# Package Version 2.3.2
__version__ = "2.3.2"
# Package Version 2.3.3
__version__ = "2.3.3"


from bailo.core.agent import Agent, PkiAgent, TokenAgent
Expand Down
5 changes: 4 additions & 1 deletion lib/python/src/bailo/helper/entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from typing import Any
import logging
import warnings

from bailo.core.client import Client
from bailo.core.enums import EntryKind, ModelVisibility
Expand Down Expand Up @@ -69,7 +70,9 @@ def get_card_latest(self) -> None:
self.__unpack_card(res["model"]["card"])
logger.info(f"Latest card for ID %s successfully retrieved.", self.id)
else:
raise BailoException(f"A model card doesn't exist for model {self.id}")
warnings.warn(
f"ID {self.id} does not have any associated cards. If needed, create a card with the .card_from_schema() method."
)

def get_card_revision(self, version: str) -> None:
"""Get a specific entry card revision from Bailo.
Expand Down

0 comments on commit 3af6bd3

Please sign in to comment.