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

[Sync] [Enhancement] Simplify execution logic in run.py; use finally to clean up temp files #337

Merged
merged 1 commit into from
Sep 4, 2023

Conversation

gaotongxiao
Copy link
Collaborator

@gaotongxiao gaotongxiao commented Aug 31, 2023

Motivation

The former logic in run.py is rather complex when user chooses to specify task parameters from CLI instead of config - it uses "exec_xxx_runner" and makes the entire execution flow diverge from the configuration path. Such an implementation makes it hard for future maintenance and leads to unnecessary code redundancies.

This PR unifies the execution flow and now all the parameter specifications are performed through the modifications on the configuration object.

Besides, this PR uses try... finally... to make sure temporary files created during running can be cleaned even when an exception has been raised (e.g. KeyBoardInterrupt).

@Leymore Leymore merged commit ce65d33 into open-compass:main Sep 4, 2023
1 check passed
go-with-me000 pushed a commit to go-with-me000/opencompass that referenced this pull request Oct 9, 2023
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.

None yet

3 participants