Skip to content

Conversation

@tchawada
Copy link
Contributor

@tchawada tchawada commented Dec 3, 2025

Adding a Script for Registering and Retrieving Callback Classes
It has create_callback() function which creates an instance of callback.
Additionally, there is a test_callbacks.py script that validates the functionality and retrieval process.

Signed-off-by: Tanisha Chawada <tchawada@qti.qualcomm.com>
Signed-off-by: Tanisha Chawada <tchawada@qti.qualcomm.com>
Signed-off-by: Tanisha Chawada <tchawada@qti.qualcomm.com>
Signed-off-by: Tanisha Chawada <tchawada@qti.qualcomm.com>
Signed-off-by: Tanisha Chawada <tchawada@qti.qualcomm.com>
Copy link
Contributor

@quic-meetkuma quic-meetkuma left a comment

Choose a reason for hiding this comment

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

Looks good. Minor corrections. Post that let us merge it.

Signed-off-by: Tanisha Chawada <tchawada@qti.qualcomm.com>
Signed-off-by: Tanisha Chawada <tchawada@qti.qualcomm.com>
Signed-off-by: Tanisha Chawada <tchawada@qti.qualcomm.com>
Signed-off-by: Tanisha Chawada <tchawada@qti.qualcomm.com>
except ValueError as e:
assert "Unknown callback" in str(e)
return
if hasattr(callback_inst, "callback"):
Copy link
Contributor

Choose a reason for hiding this comment

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

Why we need to check the callback_inst.callback?

callback_inst itself is a callback and of type TrainerCallback. What am I missing?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hasattr(callback_inst, "callback") checks whether the object is a wrapper that holds an inner callback or direct callback. So if it is wrapper need to check callback_inst.callback is not None.

@quic-meetkuma quic-meetkuma changed the title [QEff_Finetuning] Adding callback and its test cases. [QEff. Finetune] Adding callback and its test cases. Dec 8, 2025
Signed-off-by: Tanisha Chawada <tchawada@qti.qualcomm.com>
Copy link
Contributor

@quic-meetkuma quic-meetkuma left a comment

Choose a reason for hiding this comment

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

Thanks for clean PR. Merging it.

@quic-meetkuma quic-meetkuma merged commit d18c1c8 into quic:ft_experimental Dec 8, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants