feat: added running time statistics for the DS scenario experiment#1007
Merged
WinstonLiyt merged 17 commits intomainfrom Jul 2, 2025
Merged
feat: added running time statistics for the DS scenario experiment#1007WinstonLiyt merged 17 commits intomainfrom
WinstonLiyt merged 17 commits intomainfrom
Conversation
you-n-g
reviewed
Jun 30, 2025
| # execute workflow | ||
| stdout, execute_ret_code = implementation.execute_ret_code(env=env, entry="python -m coverage run main.py") | ||
| running_time = re.search(r"Total running time: (\d+\.\d+) seconds.", stdout).group(1) | ||
| implementation.inject_files(**{"running_time.txt": running_time}) |
Contributor
There was a problem hiding this comment.
If we have already attrribute in feedback, we don't need a extra file in the worksapce
|
|
||
| # execute workflow | ||
| stdout, execute_ret_code = implementation.execute_ret_code(env=env, entry="python -m coverage run main.py") | ||
| running_time = re.search(r"Total running time: (\d+\.\d+) seconds.", stdout).group(1) |
Contributor
There was a problem hiding this comment.
maybe be we can create a result class to make it more reasonable and extensible.
class Resuult:
stdout:
ret_code:
execute_time:
you-n-g
reviewed
Jul 1, 2025
| raise RunnerError(f"Metrics file (scores.csv) is not generated") | ||
| exp.result = pd.read_csv(score_fp, index_col=0) | ||
|
|
||
| running_time_fp = exp.experiment_workspace.workspace_path / "running_time.txt" |
Contributor
There was a problem hiding this comment.
We don't need to create and maintain a new file.
rdagent/utils/env.py
Outdated
| ) | ||
| except docker.errors.APIError as e: | ||
| raise RuntimeError(f"Error while pulling the image: {e}") | ||
| finally: |
test/utils/test_env.py
Outdated
| le.prepare() | ||
| res, code = le.run_ret_code(local_path=str(code_path)) | ||
| print(res, code) | ||
| res, code, time = le.run_ret_code(local_path=str(code_path)) |
licong01-cloud
pushed a commit
to licong01-cloud/RD-Agent
that referenced
this pull request
Dec 13, 2025
…icrosoft#1007) * added running time statistics for the DS scenario experiment * update execute_ret_code to return running_time * fix * fix * update describe * add EnvResult * update corresponding calls * add RunningInfo class * fix * fix * fix * fix ci * rename function name * fix ci * fix * refine running_time logic * fix ci
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Added running time statistics for the DS scenario experiment.
Motivation and Context
How Has This Been Tested?
Screenshots of Test Results (if appropriate):
Types of changes
📚 Documentation preview 📚: https://RDAgent--1007.org.readthedocs.build/en/1007/