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

Skip to content

Conversation

@jaideepr97
Copy link
Member

@jaideepr97 jaideepr97 commented Apr 17, 2025

using a custom class model_info to represent 3rd party model info seems to not play well with ruamel yaml representation anytime the config object needs to be dumped either to file or stdout leading to a yaml representation error.

ruamel.yaml.representer.RepresenterError: cannot represent an object: id='llama-3.3' family='meta-llama' path='/home/tmp/tmp.Gbn8Eel5PD/.cache/instructlab/models/meta-llama/Llama-3.3-70B-Instruct/' system_prompt=None

This seems to be happening because we load a list of model_info objects into memory rather than just the model_info object directly like for the other fields

It's easier to just work with a list of dicts instead

Checklist:

  • Commit Message Formatting: Commit titles and messages follow guidelines in the
    conventional commits.
  • Changelog updated with breaking and/or notable changes for the next minor release.
  • Documentation has been updated, if necessary.
  • Unit tests have been added, if necessary.
  • Functional tests have been added, if necessary.
  • E2E Workflow tests have been added, if necessary.

@mergify mergify bot added testing Relates to testing ci-failure PR has at least one CI failure labels Apr 17, 2025
@jaideepr97 jaideepr97 force-pushed the fix-yaml-represented branch from f03b14f to 3d8c34b Compare April 17, 2025 13:29
@mergify mergify bot removed the ci-failure PR has at least one CI failure label Apr 17, 2025
@github-actions
Copy link

E2E (NVIDIA L40S x4) LLAMA workflow launched on this PR: View run

@github-actions
Copy link

e2e workflow failed on this PR: View run, please investigate.

@mergify mergify bot added the ci-failure PR has at least one CI failure label Apr 17, 2025
@github-actions
Copy link

E2E (NVIDIA L40S x4) LLAMA workflow launched on this PR: View run

@github-actions
Copy link

e2e workflow failed on this PR: View run, please investigate.

@jaideepr97 jaideepr97 force-pushed the fix-yaml-represented branch from 3d8c34b to cfe26a6 Compare April 17, 2025 13:56
@mergify mergify bot removed the ci-failure PR has at least one CI failure label Apr 17, 2025
@jaideepr97 jaideepr97 force-pushed the fix-yaml-represented branch from cfe26a6 to 9abaf8b Compare April 17, 2025 14:08
@github-actions
Copy link

E2E (NVIDIA L40S x4) LLAMA workflow launched on this PR: View run

@github-actions
Copy link

e2e workflow failed on this PR: View run, please investigate.

yaml.indent(mapping=2, sequence=4, offset=2)

# yaml.representer.add_representer(BaseModel, lambda r, d: r.represent_dict(d.model_dump()))

Copy link
Contributor

Choose a reason for hiding this comment

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

Was this some debugging code?

Copy link
Member Author

Choose a reason for hiding this comment

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

oops, yeah leftover from a different approach i was trying first

@github-actions
Copy link

E2E (NVIDIA L40S x4) LLAMA workflow launched on this PR: View run

@github-actions
Copy link

e2e workflow failed on this PR: View run, please investigate.

@mergify mergify bot added the ci-failure PR has at least one CI failure label Apr 17, 2025
@jaideepr97 jaideepr97 force-pushed the fix-yaml-represented branch from 9abaf8b to 4390e17 Compare April 17, 2025 14:52
@mergify mergify bot removed the ci-failure PR has at least one CI failure label Apr 17, 2025
@jaideepr97 jaideepr97 marked this pull request as ready for review April 17, 2025 14:53
@jaideepr97 jaideepr97 force-pushed the fix-yaml-represented branch from 4390e17 to f5d40ba Compare April 17, 2025 15:18
@mergify mergify bot added the documentation Improvements or additions to documentation label Apr 17, 2025
Copy link
Contributor

@booxter booxter left a comment

Choose a reason for hiding this comment

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

This is not ideal because we lose comments. There's no reason for us not to handle this scenario properly. So I'd rather fix our code that converts configMap to dict for ruamel to handle iterables of models instead. I'll send a fix in a few. Stand by.

@booxter booxter added the hold In-progress PR. Tag should be removed before merge. label Apr 17, 2025
@booxter
Copy link
Contributor

booxter commented Apr 17, 2025

Please see #3295

@mergify mergify bot added the ci-failure PR has at least one CI failure label Apr 17, 2025
@jaideepr97
Copy link
Member Author

closing in favor of #3295

@jaideepr97 jaideepr97 closed this Apr 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-failure PR has at least one CI failure documentation Improvements or additions to documentation hold In-progress PR. Tag should be removed before merge. testing Relates to testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants