Skip to content

Conversation

@rsareddy0329
Copy link
Contributor

Issue #, if available:

Description of changes:

  • Add a method _process_hyperparameters in all trainers to remove redundant, update any parameters if required(example judge_prompt_template in rlaif_trainer)
  • Add validation to s3_output_path, raise error to user before submitting training job.
  • Update integ tests with dataset arn instead of s3 paths(as this is not in scope for support)
  • Update/add any additional unit tests for the current changes

Testing:
pytest tests/unit/train/
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html ============================================ 1027 passed, 13 skipped, 45 warnings in 33.89s ============================================

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@jam-jee
Copy link
Collaborator

jam-jee commented Dec 6, 2025

should process_hyperparameter be in util class, rather than in separate fine-tuner interfaces ?

@rsareddy0329
Copy link
Contributor Author

rsareddy0329 commented Dec 6, 2025

should process_hyperparameter be in util class, rather than in separate fine-tuner interfaces ?

The main reason to not choose a common method is , they have different parameter keys for each technique and esp. RLAIF needs a special handling model and prompt parameters.

"""Remove hyperparameter keys that are handled by constructor inputs."""
if self.hyperparameters:
# Remove keys that are handled by constructor inputs
if hasattr(self.hyperparameters, 'data_path'):
Copy link
Member

Choose a reason for hiding this comment

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

nit: there is code redundancy improvements possible here. Have an ignore_list somewhere in constants and look over it to delattr.

# Validate and set EULA acceptance
self.accept_eula = _validate_eula_for_gated_model(model, accept_eula, is_gated_model)

def _process_hyperparameters(self):
Copy link
Member

Choose a reason for hiding this comment

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

nit: is there opportunity to have a common mthod somwehere? rather than haning each class take this?

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.

3 participants