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

Clean up build.py #19156

Closed
wants to merge 23 commits into from
Closed

Clean up build.py #19156

wants to merge 23 commits into from

Conversation

jchen351
Copy link
Contributor

Description

Clean up build.py

Motivation and Context

Moving nonessential functions to the onnxruntime/tools/python/util package. Only left function that are meaningful to the build process.

tools/ci_build/build.py Outdated Show resolved Hide resolved
Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

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

lintrunner found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

.gitignore Outdated Show resolved Hide resolved
justinchuby
justinchuby previously approved these changes Jan 16, 2024
Copy link
Contributor

@justinchuby justinchuby left a comment

Choose a reason for hiding this comment

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

LGTM with minor comments. I would also fix lint errors.

tools/python/util/build_helpers.py Fixed Show fixed Hide fixed
tools/python/util/build_helpers.py Fixed Show fixed Hide fixed
tools/python/util/build_helpers.py Fixed Show fixed Hide fixed
tools/python/util/build_helpers.py Fixed Show fixed Hide fixed
tools/python/util/build_helpers.py Fixed Show fixed Hide fixed
tools/python/util/build_helpers.py Fixed Show fixed Hide fixed
@justinchuby
Copy link
Contributor

@edgchen1
Copy link
Contributor

Moving nonessential functions to the onnxruntime/tools/python/util package. Only left function that are meaningful to the build process.

Can you clarify what "nonessential" means? I gather it's different from "unused", but it seems that anything that is used is "essential" in some way. I ask so that when we add new functions in the future we know where to put them.

@jchen351
Copy link
Contributor Author

Moving nonessential functions to the onnxruntime/tools/python/util package. Only left function that are meaningful to the build process.

Can you clarify what "nonessential" means? I gather it's different from "unused", but it seems that anything that is used is "essential" in some way. I ask so that when we add new functions in the future we know where to put them.

We can put all future helper functions into the files from tools/python/util/ folder. The build.py has been growing too large to navigate IMO.

justinchuby
justinchuby previously approved these changes Jan 18, 2024
Copy link
Contributor

@justinchuby justinchuby left a comment

Choose a reason for hiding this comment

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

LGTM w/ lint errors fixed

@tianleiwu
Copy link
Contributor

@jchen351, Is it still needed? If not, please close it.

raise BuildError(
"cuda_home and cudnn_home paths must be specified and valid.",
f"cuda_home='{cuda_home}' valid={cuda_home_valid}. cudnn_home='{cudnn_home}'"
f" valid={cudnn_home_valid}",,

Check failure

Code scanning / CodeQL

Syntax error Error

Syntax Error (in Python 3).
@jchen351 jchen351 closed this Jun 3, 2024
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.

4 participants