Skip to content

Commit ad154f5

Browse files
committed
change plot.py sys exits
Signed-off-by: Jack Luar <jluar@precisioninno.com>
1 parent 869e575 commit ad154f5

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

flow/test/test_autotuner.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,7 @@ if [ "$PLATFORM" == "asap7" ] && [ "$DESIGN_NAME" == "gcd" ]; then
2626
fi
2727

2828
echo "Running Autotuner plotting smoke test"
29-
all_experiments=$(ls -d ./flow/logs/${PLATFORM}/${DESIGN_NAME}/*/)
30-
if [ -z "$all_experiments" ]; then
31-
echo "No experiments found for plotting"
32-
exit 0
33-
fi
29+
all_experiments=$(ls -d ./flow/logs/${PLATFORM}/${DESIGN_NAME}/smoke-test-tune*)
3430
all_experiments=$(basename -a $all_experiments)
3531
for expt in $all_experiments; do
3632
python3 tools/AutoTuner/src/autotuner/utils/plot.py \

tools/AutoTuner/src/autotuner/utils/plot.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def load_dir(dir: str) -> pd.DataFrame:
3434
progress_csvs = glob.glob(f"{dir}/*/progress.csv")
3535
if len(progress_csvs) == 0:
3636
print("No progress.csv files found.")
37-
sys.exit(0)
37+
sys.exit(1)
3838
progress_df = pd.concat([pd.read_csv(f) for f in progress_csvs])
3939

4040
# Concatenate params.json & metrics.json file
@@ -64,7 +64,7 @@ def load_dir(dir: str) -> pd.DataFrame:
6464
print(
6565
"Unable to merge DFs due to missing trial_id in params.json (possibly due to failed trials.)"
6666
)
67-
sys.exit(0)
67+
sys.exit(1)
6868

6969
# Print failed, if any
7070
if failed:
@@ -109,7 +109,7 @@ def preprocess(df: pd.DataFrame) -> pd.DataFrame:
109109
print(
110110
f"KeyError: {e} in the DataFrame. Dataframe does not contain necessary columns."
111111
)
112-
sys.exit(0)
112+
sys.exit(1)
113113

114114

115115
def plot(df: pd.DataFrame, key: str, dir: str):

0 commit comments

Comments
 (0)