# TSPulse Submission

## 🔧 Setup
We have tested the codes in `GNU/Linux` based operating system. Please follow the the steps below to install and run TSPulse on all downstream tasks.

0. Create a conda environment. The code and demo notebooks were run in a python 3.11.0 environment. 
    ```bash
    conda create -n neurips_tspulse python=3.11.0
    conda activate neurips_tspulse
    ```
    
1. From the `tspulse_submission` folder:
    ```bash
    pip install -r requirements.txt
    ```
    This will install all needed requirements. In brief, the TSPulse architecture and example code requires a few publicly available, open-source libraries. These libraries include: pytorch, transformers, pandas, numpy, scikit-learn, and jupyter.

2. Test the import from a Python shell or script:

    ```python
    from tspulse.models.tspulse import TSPulseForReconstruction
    ```

---

## Task-specialized Model Checkpoints

| Task                    | Model Path                                                                 |
|-------------------------|-----------------------------------------------------------------------------|
| **Classification**      | [`tspulse_submission/model-binaries/tspulse_classification/tspulse_model`](model-binaries/tspulse_classification/tspulse_model) |
| **Anomaly Detection**   | [`tspulse_submission/model-binaries/tspulse_hybrid_full/tspulse_model`](model-binaries/tspulse_hybrid_full/tspulse_model) |
| **Imputation & Search** | [`tspulse_submission/model-binaries/tspulse_hybrid_sign20/tspulse_model`](model-binaries/tspulse_hybrid_sign20/tspulse_model) |





## Example Scripts 

| Task                    | Folder                                                                |
|-------------------------|------------------------------------------------------------------------|
| **Classification**      | [`tspulse_submission/tspulse/classification`](tspulse/classification) |
| **Anomaly Detection**   | [`tspulse_submission/tspulse/ad`](tspulse/ad) |
| **Imputation**          | [`tspulse_submission/tspulse/imputation`](tspulse/imputation) |
| **Similarity Search**   | [`tspulse_submission/tspulse/similarity_search`](tspulse/similarity_search) |



