Skip to content

Commit 9b7607d

Browse files
committed
Last revision!
1 parent 5a91e75 commit 9b7607d

File tree

5 files changed

+117
-21
lines changed

5 files changed

+117
-21
lines changed

0_Artifact_Testing/.DS_Store

0 Bytes
Binary file not shown.

0_Artifact_Testing/README.md

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Case Study Artifacts for ICSE 2025 Artifact Evaluation
22

33
## Overview
4-
This repository contains the necessary artifacts to reproduce the case study results presented in the associated research paper (Pre-print: https://arxiv.org/abs/2501.12560). The artifacts provided include data files, pre-trained models, and scripts used for the evaluation.
4+
This repository contains the necessary artifacts to reproduce the case study results presented in the associated research paper (Pre-print: https://arxiv.org/abs/2501.12560). The artifacts provided include data (extracted features), pre-trained models, and scripts used for the evaluation.
55

6-
**Note:** This package focuses on reproducing the case study results (included in the paper) due to the computational and time-intensive nature of processing the entire dataset.
6+
**Note:** This package focuses on reproducing the case study results (included in the paper) due to the computational and time-intensive nature of processing the entire dataset. To reduce computational overhead, we provided extracted dynamic and static features from the sample PixelCNN model. These pre-processed features allow the scripts to run efficiently while producing the same results as those discussed in the paper.
77

88
---
99

@@ -106,13 +106,5 @@ Upon running the provided scripts, the following outputs will be generated:
106106

107107
---
108108

109-
## Known Limitations
110-
- Full experiment replication requires access to high-performance computing resources (e.g., Compute Canada).
111-
- To reduce computational overhead, we provided extracted dynamic and static features from the sample PixelCNN model. These pre-processed features allow the scripts to run efficiently while producing the same results as those discussed in the paper.
112-
113-
---
114-
115109
## Verifying the Results
116-
The provided artifacts enable reviewers to reproduce and verify the results of the case study without referring to the paper. Simply run the scripts as instructed above, and compare the generated outputs (fault detection, fault categorization, and root cause analysis) with the expected results outlined in this document.
117-
118-
By following the steps and using the provided artifacts, reviewers can confirm the validity of the methodologies and results presented in the research paper.
110+
The provided artifacts enable reviewers to reproduce and verify the results of the case study without referring to the paper. Simply run the scripts as instructed above, and compare the generated outputs (fault detection, fault categorization, and root cause analysis) with the expected results outlined in this document. By following the steps and using the provided artifacts, reviewers can confirm the validity of the methodologies and results presented in the research paper.

README.md

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
# **Replication Package for DEFault**
22

3-
Welcome to the replication package for **DEFault**, a framework designed to improve the detection and diagnosis of faults in Deep Neural Networks (DNNs). This repository provides all the necessary code and data to reproduce the experiments from our paper, which has been accepted in ICSE - Research Track 2025. Pre-print: https://arxiv.org/abs/2501.12560
3+
Welcome to the replication package for **DEFault**, a framework designed to improve the detection and diagnosis of faults in Deep Neural Networks (DNNs). This repository provides all the necessary code and data to reproduce the experiments from our paper, which has been accepted in ICSE - Research Track 2025.
44

55
**"Improved Detection and Diagnosis of Faults in Deep Neural Networks using Hierarchical and Explainable Classification."**
66

7+
Pre-print of the paper can be found: https://arxiv.org/abs/2501.12560
8+
79
---
810
## **How DEFault Works**
911

@@ -69,9 +71,10 @@ The figure below illustrates the workflow of DEFault, showing its fault detectio
6971
- **C_RootCauseAnalysis/**: Root cause analysis scripts.
7072
- **`e_Evaluation/`**: Scripts to evaluate DEFault on real-world and seeded faults.
7173
- **`f_Figures/`**: Figures used in the paper.
72-
- **`g_Dataset/`**: Labeled datasets for training and evaluation.
74+
- **`g_Dataset/`**: Labeled datasets for training and testing.
7375
- **`h_CohenKappaAnalysis/`**: Scripts for dataset consistency validation using Cohen's Kappa.
7476
- **`i_CaseStudy/`**: Scripts for case studies on real-world models (e.g., PixelCNN).
77+
- **`j_HPC_Slurm/`**: Example Script for Slurm job on Compute Canada with all the configuration.
7578

7679
---
7780

@@ -80,7 +83,7 @@ The figure below illustrates the workflow of DEFault, showing its fault detectio
8083
### **Operating System**
8184
Tested on:
8285
- Ubuntu 20.04 LTS or later
83-
- CentOS 7+ (for HPC environments such as Compute Canada)
86+
- HPC environments such as Compute Canada (Graham Cluster)
8487

8588
Compatible with:
8689
- Windows 10/11 (via Windows Subsystem for Linux - WSL2)
@@ -95,11 +98,11 @@ Compatible with:
9598

9699
**Recommended:**
97100
- GPU: NVIDIA with CUDA support
98-
- HPC access (e.g., Compute Canada) for large-scale execution
101+
- HPC access (e.g., Compute Canada) for complete experiment
99102

100103
### **Software Requirements**
101104

102-
- **Python Version:** 3.8 or later
105+
- **Python Version:** 3.10 or later
103106
- **Dependencies:** Install via `requirements.txt`:
104107
```bash
105108
pip install -r requirements.txt
@@ -114,15 +117,15 @@ default_env\Scripts\activate # On Windows
114117

115118
---
116119

117-
## **Usage: Whole Dataset vs. Sample Data**
120+
## **Usage: Complete Experiment vs. Lightweight Verification**
118121

119122
**Important:**
120-
- Running the **whole dataset** requires significant computational resources and time.
121-
- Running the **sample data** is **recommended**, as it provides a quick and effective way to verify the framework's functionality.
123+
- Running the **Complete Experiment** on the whole dataset requires significant computational resources and time.
124+
- Running the **Lightweight Verification** on a sample DNN program is **recommended**, as it provides a quick and effective way to verify the framework's functionality.
122125

123126
---
124127

125-
## **Usage: Sample Data**
128+
## **Usage: Lightweight Verification**
126129

127130
The 0_Artifact_Testing directory provides all necessary artifacts to reproduce case study results with minimal computational overhead. It includes:
128131

@@ -137,7 +140,7 @@ The expected result for the sample data is provided inside the directory.
137140

138141
---
139142

140-
## **Usage: Whole Dataset**
143+
## **Usage: Complete Experiment**
141144

142145
### **1. Data Collection**
143146

j_HPC_Slurm/README.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# **SLURM Job Script for HPC Execution**
2+
3+
## **Overview**
4+
This repository includes a **SLURM job script** (`run_script.slurm`) designed to execute scripts efficiently on **Compute Canada’s HPC clusters** (e.g., **Graham, Narval, Beluga**). The script automates **job scheduling, dependency setup, execution, and runtime tracking**, making it suitable for running our workflow.
5+
6+
---
7+
8+
## **Usage Instructions**
9+
10+
### **1. Preparing the Environment**
11+
Before submitting the job, ensure:
12+
- You have access to a **Compute Canada account**.
13+
- You are working within a **Linux-based HPC environment** that supports **SLURM job scheduling**.
14+
- Your scripts and dependencies are ready to run.
15+
16+
---
17+
18+
### **2. Creating the SLURM Script**
19+
We provided `run_script.slurm` as an example script used in our experiment. Modify the script based on your specific requirements:
20+
- **Job Name**: Update `--job-name=example_task`.
21+
- **Email Notifications**: Replace `your_email@domain.com` with your email.
22+
- **Account Name**: Update `--account=your_account_name` to your Compute Canada account.
23+
- **Script Execution**: Change `python your_script.py your_parameters` to match your script and arguments.
24+
- **Dependencies**: Modify the `pip install` command as needed.
25+
26+
---
27+
28+
### **4. Submitting the Job**
29+
Once configured, submit the SLURM script to the cluster:
30+
```bash
31+
sbatch run_script.slurm
32+
```
33+
34+
To check job status:
35+
```bash
36+
squeue --me
37+
```
38+
39+
To cancel a running job:
40+
```bash
41+
scancel JOB_ID
42+
```
43+
44+
---
45+
46+
### **5. Viewing Job Output**
47+
SLURM automatically generates log files for job execution. These can be accessed using:
48+
```bash
49+
cat slurm-<job_id>.out
50+
```
51+
Replace `<job_id>` with the actual job number assigned by SLURM.
52+
53+
---
54+
55+
### **6. Expected Runtime**
56+
- **Full-scale replication** (complete dataset): Can take several days, depending on workload and hardware availability. For optimal performance, **running on Compute Canada’s GPU-enabled nodes (P100, V100, or T4) is recommended**.
57+
58+
---
59+
60+
For further assistance, refer to Compute Canada’s **[SLURM Job Submission Guide](https://docs.computecanada.ca/wiki/Running_jobs)**.

j_HPC_Slurm/run_script.slurm

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#!/bin/bash
2+
3+
#SBATCH --time=72:00:00 # Maximum execution time (hh:mm:ss)
4+
#SBATCH --gpus-per-node=1 # Number of GPUs per node
5+
#SBATCH --cpus-per-task=1 # Number of CPU cores per task
6+
#SBATCH --constraint=[p100|v100|t4] # GPU types (P100, V100, or T4)
7+
#SBATCH --mem-per-cpu=80G # Memory per CPU core
8+
#SBATCH --job-name=deepcrime_task # Job name
9+
#SBATCH --mail-user=your_email@domain.com # Email for notifications
10+
#SBATCH --mail-type=ALL # Notify on job start, end, and fail
11+
#SBATCH --account=your_account_name # Compute Canada account
12+
13+
# Record the start time
14+
start_time=$(date +%s)
15+
16+
# Load the required Python module
17+
module load python/3.10
18+
19+
# Create and activate a virtual environment in the temporary directory
20+
virtualenv --no-download $SLURM_TMPDIR/env
21+
source $SLURM_TMPDIR/env/bin/activate
22+
23+
# Install dependencies
24+
pip install numpy tensorflow==2.15.1 matplotlib progressbar scikit-learn \
25+
termcolor h5py pandas statsmodels networkx patsy scipy psutil --no-index
26+
27+
# Running any scripts (e.g., run the DeepCrime script from Fault Seeding)
28+
python run_deepcrime.py FNN_72328867_correct.py change_dropout_rate
29+
30+
# Record the end time and calculate duration
31+
end_time=$(date +%s)
32+
duration=$((end_time - start_time))
33+
hours=$((duration / 3600))
34+
minutes=$(( (duration % 3600) / 60 ))
35+
seconds=$((duration % 60))
36+
37+
# Display runtime
38+
echo "The script took $hours hours, $minutes minutes, and $seconds seconds to run."
39+
40+
# Deactivate the virtual environment
41+
deactivate

0 commit comments

Comments
 (0)