mirror of
https://github.com/vale981/ray
synced 2025-03-06 02:21:39 -05:00
[e2e] Remove unnecessary logic around copying results (#22034)
After #21905, some of the logic around handling result artifacts become unnecessary or incorrect (in generating error logs). They are removed.
This commit is contained in:
parent
9ac3f6879d
commit
92d7e9bf98
1 changed files with 10 additions and 11 deletions
|
@ -2207,23 +2207,22 @@ def run_test_config(
|
||||||
|
|
||||||
out_dir = os.path.expanduser(GLOBAL_CONFIG["RELEASE_RESULTS_DIR"])
|
out_dir = os.path.expanduser(GLOBAL_CONFIG["RELEASE_RESULTS_DIR"])
|
||||||
|
|
||||||
logger.info(
|
logger.info(f"Moving results dir {temp_dir} to persistent location {out_dir}")
|
||||||
f"Moving results dir {temp_dir} to persistent location " f"{out_dir}"
|
|
||||||
)
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
shutil.rmtree(out_dir)
|
# out_dir is cleared in run_e2e.sh, but it may exist when running
|
||||||
|
# e2e.py directly.
|
||||||
|
if os.path.exists(out_dir):
|
||||||
|
shutil.rmtree(out_dir)
|
||||||
|
logger.info(f"Destination {out_dir} is cleared")
|
||||||
except Exception:
|
except Exception:
|
||||||
logger.exception(
|
logger.info(
|
||||||
f"Ran into error when clearing the destination dir: {out_dir}"
|
f"Ran into error when clearing the destination: {out_dir}",
|
||||||
|
exc_info=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# Use distutils.dir_util.copy_tree() instead of shutil.cptree(),
|
shutil.cptree(temp_dir, out_dir)
|
||||||
# which allows existing output directory.
|
|
||||||
from distutils.dir_util import copy_tree
|
|
||||||
|
|
||||||
copy_tree(temp_dir, out_dir)
|
|
||||||
except Exception:
|
except Exception:
|
||||||
logger.exception(
|
logger.exception(
|
||||||
"Ran into error when copying results dir to persistent "
|
"Ran into error when copying results dir to persistent "
|
||||||
|
|
Loading…
Add table
Reference in a new issue