Skip to content

feat: add an _exclude_fields characteristic in the config for unused values to avoid unnecessary and unused code in converter and type generation. #1229

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 0 additions & 46 deletions google/genai/tunings.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,13 +476,6 @@ def _TuningJob_from_mldev(
to_object, ['custom_base_model'], getv(from_object, ['customBaseModel'])
)

if getv(from_object, ['distillationSpec']) is not None:
setv(
to_object,
['distillation_spec'],
getv(from_object, ['distillationSpec']),
)

if getv(from_object, ['experiment']) is not None:
setv(to_object, ['experiment'], getv(from_object, ['experiment']))

Expand All @@ -495,19 +488,6 @@ def _TuningJob_from_mldev(
if getv(from_object, ['pipelineJob']) is not None:
setv(to_object, ['pipeline_job'], getv(from_object, ['pipelineJob']))

if getv(from_object, ['preferenceOptimizationSpec']) is not None:
setv(
to_object,
['preference_optimization_spec'],
getv(from_object, ['preferenceOptimizationSpec']),
)

if getv(from_object, ['satisfiesPzi']) is not None:
setv(to_object, ['satisfies_pzi'], getv(from_object, ['satisfiesPzi']))

if getv(from_object, ['satisfiesPzs']) is not None:
setv(to_object, ['satisfies_pzs'], getv(from_object, ['satisfiesPzs']))

if getv(from_object, ['serviceAccount']) is not None:
setv(to_object, ['service_account'], getv(from_object, ['serviceAccount']))

Expand All @@ -518,9 +498,6 @@ def _TuningJob_from_mldev(
getv(from_object, ['tunedModelDisplayName']),
)

if getv(from_object, ['veoTuningSpec']) is not None:
setv(to_object, ['veo_tuning_spec'], getv(from_object, ['veoTuningSpec']))

return to_object


Expand Down Expand Up @@ -697,13 +674,6 @@ def _TuningJob_from_vertex(
to_object, ['custom_base_model'], getv(from_object, ['customBaseModel'])
)

if getv(from_object, ['distillationSpec']) is not None:
setv(
to_object,
['distillation_spec'],
getv(from_object, ['distillationSpec']),
)

if getv(from_object, ['experiment']) is not None:
setv(to_object, ['experiment'], getv(from_object, ['experiment']))

Expand All @@ -716,19 +686,6 @@ def _TuningJob_from_vertex(
if getv(from_object, ['pipelineJob']) is not None:
setv(to_object, ['pipeline_job'], getv(from_object, ['pipelineJob']))

if getv(from_object, ['preferenceOptimizationSpec']) is not None:
setv(
to_object,
['preference_optimization_spec'],
getv(from_object, ['preferenceOptimizationSpec']),
)

if getv(from_object, ['satisfiesPzi']) is not None:
setv(to_object, ['satisfies_pzi'], getv(from_object, ['satisfiesPzi']))

if getv(from_object, ['satisfiesPzs']) is not None:
setv(to_object, ['satisfies_pzs'], getv(from_object, ['satisfiesPzs']))

if getv(from_object, ['serviceAccount']) is not None:
setv(to_object, ['service_account'], getv(from_object, ['serviceAccount']))

Expand All @@ -739,9 +696,6 @@ def _TuningJob_from_vertex(
getv(from_object, ['tunedModelDisplayName']),
)

if getv(from_object, ['veoTuningSpec']) is not None:
setv(to_object, ['veo_tuning_spec'], getv(from_object, ['veoTuningSpec']))

return to_object


Expand Down
Loading