Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

Add editable mirrored models to python#3227

Merged
GB907762 merged 5 commits intomainfrom
feature/editable-modelcards-python
Feb 19, 2026
Merged

Add editable mirrored models to python#3227
GB907762 merged 5 commits intomainfrom
feature/editable-modelcards-python

Conversation

@GB907762
Copy link
Member

No description provided.

@github-actions github-actions bot added documentation Improvements or additions to documentation enhancement New feature or request python Pull requests that update Python code labels Feb 17, 2026
@GB907762 GB907762 changed the title Add editable mirrored models Add editable mirrored models to python Feb 17, 2026
@PE39806
Copy link
Contributor

PE39806 commented Feb 17, 2026

It would also be good if you could update the tests.

res = self.client.get_model(model_id=self.id)
if "card" in res["model"]:
self._unpack_card(res["model"]["card"])
logger.info("Latest card for ID %s successfully retrieved.", self.id)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason for not using the f-style style like the one below? Probably best if we just use f-strings everywhere for consistency

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://docs.python.org/3/howto/logging.html#logging-variable-data It's simply for backwards compatibility. Since logging predates str.format() in Python 3.6. Although it's likely unnecessary in this case.

else:
warnings.warn(f"ID {self.id} does not have any associated additional information.")

def _unpack_card(self, res, mirrored=False):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth adding the return type
def _unpack_card(self, res, mirrored=False) -> None:

@github-actions github-actions bot added the tests Improvements or additions to unit tests and / or end to end tests label Feb 18, 2026
PE39806
PE39806 previously approved these changes Feb 18, 2026
ARADDCC002
ARADDCC002 previously approved these changes Feb 18, 2026
@GB907762 GB907762 dismissed stale reviews from ARADDCC002 and PE39806 via 47ce957 February 19, 2026 10:59
@GB907762 GB907762 merged commit be23bbb into main Feb 19, 2026
23 checks passed
@GB907762 GB907762 deleted the feature/editable-modelcards-python branch February 19, 2026 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request python Pull requests that update Python code tests Improvements or additions to unit tests and / or end to end tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Comments