Skip to content
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

[refactoring] add withKey function to utility functions @open sesame 02/21 08:59 #2954

Merged
merged 1 commit into from
Mar 7, 2025

Conversation

baek2sm
Copy link
Contributor

@baek2sm baek2sm commented Feb 17, 2025

The withKey function is frequently used to pass keys and values when
using nntrainer. however, this function is re-defined in every
application example and unit test, resulting in significant code
duplication within the project(moreover, it is inconvenient because
users of nntrainer have to define this function every time)

So I removed the duplicated withKey functions from each script and
added withKey function to utility functions.

Self evaluation:
Build test: [x]Passed [ ]Failed [ ]Skipped
Run test: [x]Passed [ ]Failed [ ]Skipped

Signed-off-by: Seungbaek Hong [email protected]

Copy link
Member

@skykongkong8 skykongkong8 left a comment

Choose a reason for hiding this comment

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

What a huge reduction of lines of code!

Copy link
Member

@DonghakPark DonghakPark left a comment

Choose a reason for hiding this comment

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

Nice refactoring!!

Copy link
Contributor

@djeong20 djeong20 left a comment

Choose a reason for hiding this comment

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

LGTM

@baek2sm baek2sm changed the title [refactoring] add withKey function to utility functions [refactoring] add withKey function to utility functions @open sesame 02/20 23:17 Feb 20, 2025
@baek2sm baek2sm changed the title [refactoring] add withKey function to utility functions @open sesame 02/20 23:17 [refactoring] add withKey function to utility functions @open sesame 02/21 08:59 Feb 20, 2025
Copy link
Contributor

@EunjuYang EunjuYang left a comment

Choose a reason for hiding this comment

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

LGTM

@dkjung
Copy link
Collaborator

dkjung commented Mar 7, 2025

@baek2sm Could you rebase?

The `withKey` function is frequently used to pass keys and values when
using nntrainer. however, this function is re-defined in every
application example and unit test, resulting in significant code
duplication within the project(moreover, it is inconvenient because
users of nntrainer have to define this function every time)

So I removed the duplicated `withKey` functions from each script and
added `withKey` function to utility functions.

**Self evaluation:**
Build test: [x]Passed [ ]Failed [ ]Skipped
Run test: [x]Passed [ ]Failed [ ]Skipped

Signed-off-by: Seungbaek Hong <[email protected]>
@baek2sm
Copy link
Contributor Author

baek2sm commented Mar 7, 2025

@dkjung It's done. thanks!!

@jijoongmoon jijoongmoon merged commit a5b2c54 into nnstreamer:main Mar 7, 2025
15 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.

7 participants