Skip to content

Conversation

Hexoplon
Copy link
Contributor

What this PR does / why we need it:
Improve JSON serialization to fix issue occuring when following https://www.kubeflow.org/docs/components/katib/user-guides/llm-hp-optimization/, among other guides. Currently, running the example code with the latest versions of katib sdk peft and transformers, would result in an error of TypeError: Object of type LoraRuntimeConfig is not JSON serializable. Now, it will correctly use .to_dict when available, and dict otherwise for non TrainingArgument types

Copy link
Member

@andreyvelich andreyvelich left a comment

Choose a reason for hiding this comment

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

Sorry for the late review @Hexoplon!
overall lgtm.
/assign @helenxie-bit @Electronic-Waste

@Hexoplon
Copy link
Contributor Author

Thank you @andreyvelich, I have updated the code with your suggestions

@andreyvelich
Copy link
Member

@Hexoplon Can you fix CI please ?

Signed-off-by: Zackeus Bengtsson <github@zackeus.no>
@Hexoplon
Copy link
Contributor Author

Hexoplon commented Sep 11, 2025

@Hexoplon Can you fix CI please ?

Fixed now, all pre commit hooks are passing

Copy link
Member

@andreyvelich andreyvelich left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andreyvelich

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-prow google-oss-prow bot merged commit 327f763 into kubeflow:master Sep 11, 2025
69 of 71 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants