fix(block): Updated model_version to prevent conflicts with pydantic naming #8729
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The field model_version in the ai music generator project conflicted with pydantic internals. This fixes that.
Changes ποΈ
Checklist π
For code changes:
Example test plan
For configuration changes:
.env.example
is updated or already compatible with my changesdocker-compose.yml
is updated or already compatible with my changesExamples of configuration changes
Variable renaming for consistency:
model_version
tomusic_gen_model_version
in theInput
class definition.__init__
method to usemusic_gen_model_version
instead ofmodel_version
in the test input dictionary.__init__
method to acceptmusic_gen_model_version
as a parameter.run
method to usemusic_gen_model_version
when callingrun_model
.run_model
method to replacemodel_version
withmusic_gen_model_version
in its parameters and input dictionary. [1] [2]This pull request includes updates to the
autogpt_platform/backend/backend/blocks/ai_music_generator.py
file to rename themodel_version
variable tomusic_gen_model_version
for consistency across the codebase. The most important changes include modifications to theInput
class, the__init__
method, therun
method, and therun_model
method.Variable renaming for consistency:
autogpt_platform/backend/backend/blocks/ai_music_generator.py
: Renamedmodel_version
tomusic_gen_model_version
in theInput
class.autogpt_platform/backend/backend/blocks/ai_music_generator.py
: Updated the__init__
method to usemusic_gen_model_version
instead ofmodel_version
. [1] [2]autogpt_platform/backend/backend/blocks/ai_music_generator.py
: Modified therun
method to usemusic_gen_model_version
in place ofmodel_version
. [1] [2]autogpt_platform/backend/backend/blocks/ai_music_generator.py
: Adjusted therun_model
method to acceptmusic_gen_model_version
instead ofmodel_version
.