diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml
index 766ad0ba..0c8a4e59 100644
--- a/.github/workflows/greetings.yml
+++ b/.github/workflows/greetings.yml
@@ -3,7 +3,7 @@ name: Auto reply to new issues and PR
on:
issues:
types: [opened]
- pull_request:
+ pull_request_target:
branches: [main, dev]
types: [opened]
diff --git a/.github/workflows/issue_manager.yml b/.github/workflows/issue_manager.yml
deleted file mode 100644
index 6ec30a07..00000000
--- a/.github/workflows/issue_manager.yml
+++ /dev/null
@@ -1,31 +0,0 @@
-name: "Issue Manager"
-
-on:
- push:
- branches:
- - temp_test_manager
- schedule:
- - cron: "0 8 * * *"
- issues:
- types:
- - labeled
-
-permissions:
- issues: write
-
-jobs:
- issue-manager:
- runs-on: ubuntu-latest
- steps:
- - uses: tiangolo/issue-manager@0.6.0
- with:
- token: ${{ secrets.GITHUB_TOKEN }}
- config: >
- {
- "completed": {
- "delay": "P14DT0H0M0S",
- "message": "The issue was completed 14 days ago and no more new comments posted recently. Closing it now.",
- "remove_label_on_comment": false,
- "remove_label_on_close": false
- }
- }
\ No newline at end of file
diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml
index 3d406d1d..950b5ac8 100644
--- a/.github/workflows/stale.yml
+++ b/.github/workflows/stale.yml
@@ -1,22 +1,32 @@
-name: "Close stale issues and PRs"
+name: "Stale Manager"
on:
+ push:
+ branches:
+ - test_stale_manager
schedule:
- - cron: "0 0 * * *"
+ - cron: "0 8 * * *"
+
+permissions:
+ actions: write
+ contents: write # only for delete-branch option
+ issues: write
+ pull-requests: write
jobs:
- stale:
+ issue-manager:
runs-on: ubuntu-latest
-
steps:
- uses: actions/stale@v10
with:
- stale-issue-message: 'This issue had no activity for **14 days**. It will be closed in **1 week** unless there is some new activity. Is this issue already resolved?'
- stale-issue-label: 'stale'
- exempt-issue-labels: bug, potential bug, enhancement, new feature, new algo, good first issue, keep, refactoring, completed, docker
- exempt-pr-labels: bug, potential bug, enhancement, new feature, new algo, keep, refactoring, docker
- stale-pr-message: 'This pull request had no activity for **14 days**. It will be closed in **1 week** unless there is some new activity.'
- stale-pr-label: 'stale'
- days-before-stale: 14
- days-before-close: 7
- operations-per-run: 200
+ stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 10 days.'
+ close-issue-message: 'This issue was closed because it has been stalled for 10 days with no activity.'
+ days-before-issue-stale: 30
+ days-before-issue-close: 10
+ exempt-issue-labels: 'keep,awaiting-approval,work-in-progress'
+
+ stale-pr-message: 'This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 10 days.'
+ close-pr-message: 'This PR was closed because it has been stalled for 10 days with no activity.'
+ days-before-pr-stale: 30
+ days-before-pr-close: 10
+ exempt-pr-labels: 'keep,awaiting-approval,work-in-progress'
diff --git a/.github/workflows/testing_ci.yml b/.github/workflows/testing_ci.yml
index 9539e040..071fed44 100644
--- a/.github/workflows/testing_ci.yml
+++ b/.github/workflows/testing_ci.yml
@@ -44,6 +44,7 @@ jobs:
run: |
which python
which pip
+ pip install --upgrade setuptools pip
pip install torch==${{ matrix.pytorch-version }} -f https://download.pytorch.org/whl/cpu
python -c "import torch; print('PyTorch:', torch.__version__)"
diff --git a/README.md b/README.md
index 34bd5643..4c151803 100644
--- a/README.md
+++ b/README.md
@@ -113,15 +113,15 @@ embedding strategy and training approach (ORT+MIT) the same as we did in
[the SAITS paper](https://arxiv.org/pdf/2202.08516)[^1].**
The task types are abbreviated as follows:
-**`IMPU`**: Imputation;
-**`FORE`**: Forecasting;
-**`CLAS`**: Classification;
+**`IMPT`**: Imputation;
+**`FCST`**: Forecasting;
+**`CLAF`**: Classification;
**`CLUS`**: Clustering;
**`ANOD`**: Anomaly Detection.
In addition to the 5 tasks, PyPOTS also provides TS2Vec[^48] for time series representation learning and vectorization.
The paper references and links are all listed at the bottom of this file.
-| **Type** | **Algo** | **IMPU** | **FORE** | **CLAS** | **CLUS** | **ANOD** | **Year - Venue** |
+| **Type** | **Algo** | **IMPT** | **FCST** | **CLAF** | **CLUS** | **ANOD** | **Year - Venue** |
|:--------------|:------------------------------------------------------------------------------------------------------------------------------------------------|:--------:|:--------:|:--------:|:--------:|:--------:|:---------------------------------------------------------------------------------------------------------|
| LLM&TSFM |
Time-Series.AI [^36] | ✅ | ✅ | ✅ | ✅ | ✅ | Join waitlist |
| Neural Net | MixLinear🧑🔧[^52] | | ✅ | | | | `2026 - ICLR` |
@@ -347,7 +347,7 @@ Here is [an incomplete list of them](https://scholar.google.com/scholar?as_ylo=2
@article{du2023pypots,
title = {{PyPOTS: A Python Toolkit for Data Mining on Partially-Observed Time Series}},
author = {Wenjie Du},
-journal = {KDD 2023 MiLeTS},
+journal = {SIGKDD MiLeTS Workshop},
year = {2023},
}
```
diff --git a/README_zh.md b/README_zh.md
index d33ff836..ee37df09 100644
--- a/README_zh.md
+++ b/README_zh.md
@@ -105,10 +105,16 @@ PyPOTS当前支持多变量POTS数据的插补, 预测, 分类, 聚类以及异
**为了使上述模型能够适用于POTS数据, 我们采用了与[SAITS论文](https://arxiv.org/pdf/2202.08516)[^1]
中相同的embedding策略和训练方法(ORT+MIT)对它们进行改进**.
+任务类型缩写如下:
+**`IMPT`**: Imputation, 插补;
+**`FCST`**: Forecasting, 预测;
+**`CLAF`**: Classification, 分类;
+**`CLUS`**: Clustering, 聚类;
+**`ANOD`**: Anomaly Detection, 异常检测.
除了下表中列出的5种任务(插补, 预测, 分类, 聚类和异常检测)的算法外, PyPOTS还包括了用于时序表征学习和向量化的TS2Vec[^48].
所有算法的论文引用和链接可以在本文件的底部找到.
-| **Type** | **Algo** | **IMPU** | **FORE** | **CLAS** | **CLUS** | **ANOD** | **Year - Venue** |
+| **Type** | **Algo** | **IMPT** | **FCST** | **CLAF** | **CLUS** | **ANOD** | **Year - Venue** |
|:--------------|:------------------------------------------------------------------------------------------------------------------------------------------------|:--------:|:--------:|:--------:|:--------:|:--------:|:---------------------------------------------------------------------------------------------------------|
| LLM&TSFM |
Time-Series.AI [^36] | ✅ | ✅ | ✅ | ✅ | ✅ | Join waitlist |
| Neural Net | MixLinear🧑🔧[^52] | | ✅ | | | | `2026 - ICLR` |
@@ -326,7 +332,7 @@ PyPOTS也已被纳入[PyTorch Ecosystem](https://landscape.pytorch.org/?item=mod
@article{du2023pypots,
title = {{PyPOTS: A Python Toolkit for Data Mining on Partially-Observed Time Series}},
author = {Wenjie Du},
-journal = {KDD 2023 MiLeTS},
+journal = {SIGKDD MiLeTS Workshop},
year = {2023},
}
```
diff --git a/docs/algo_table.rst b/docs/algo_table.rst
index 88f06f6b..6287f69b 100644
--- a/docs/algo_table.rst
+++ b/docs/algo_table.rst
@@ -10,9 +10,9 @@
* - Type
- Algorithm
- - IMPU
- - FORE
- - CLAS
+ - IMPT
+ - FCST
+ - CLAF
- CLUS
- ANOD
- Year - Venue
diff --git a/docs/index.rst b/docs/index.rst
index 39167ac4..e7408aac 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -133,8 +133,8 @@ proposed as algorithms for POTS data in their papers, and they cannot directly a
To make them applicable to POTS data, we specifically apply the embedding strategy and training approach (ORT+MIT)
the same as we did in `the SAITS paper `_ :cite:`du2023SAITS`.
-The task types are abbreviated as follows: **IMPU**: Imputation; **FORE**: Forecasting;
-**CLAS**: Classification; **CLUS**: Clustering; **ANOD**: Anomaly Detection.
+The task types are abbreviated as follows: **IMPT**: Imputation; **FCST**: Forecasting;
+**CLAF**: Classification; **CLUS**: Clustering; **ANOD**: Anomaly Detection.
In addition to the 5 tasks, PyPOTS also provides TS2Vec :cite:`yue2022ts2vec` for time series representation learning and vectorization.
The paper references are all listed at the bottom of this readme file.
@@ -244,7 +244,7 @@ please cite it as below and 🌟star `PyPOTS repository `_ for detailed PyPOTS tutorials.
-You can also find a simple and quick-start tutorial notebook on Google Colab
+You can also find a simple and quick-start tutorial notebook on Google Colab by clicking the badge below
.. raw:: html
+We put some examples here to help our users to get started quickly.
.. code-block:: python
diff --git a/pypots/classification/seft/model.py b/pypots/classification/seft/model.py
index 487d7b6d..d447b782 100644
--- a/pypots/classification/seft/model.py
+++ b/pypots/classification/seft/model.py
@@ -18,7 +18,7 @@
class SeFT(BaseNNClassifier):
- """The PyTorch implementation of the SeFT model :cite:`horn2020SeFT`.
+ """The PyTorch implementation of the SeFT model :cite:`horn2020seft`.
Parameters
----------
diff --git a/pypots/forecasting/moderntcn/model.py b/pypots/forecasting/moderntcn/model.py
index 7db6443f..5eb00203 100644
--- a/pypots/forecasting/moderntcn/model.py
+++ b/pypots/forecasting/moderntcn/model.py
@@ -42,9 +42,11 @@ class ModernTCN(BaseNNForecaster):
downsampling_ratio :
The downsampling ratio for the downsampling mechanism.
+ Must be int, because it is also used as kernel size and stride of convolution modules in ModernTCN.
ffn_ratio :
The ratio for the feed-forward neural network in the model.
+ Must be int.
num_blocks :
The number of blocks for the model. It should be a list of integers.
@@ -135,8 +137,8 @@ def __init__(
n_pred_features: int,
patch_size: int,
patch_stride: int,
- downsampling_ratio: float,
- ffn_ratio: float,
+ downsampling_ratio: int,
+ ffn_ratio: int,
num_blocks: list,
large_size: list,
small_size: list,
diff --git a/pypots/imputation/moderntcn/model.py b/pypots/imputation/moderntcn/model.py
index 5da48d38..40a9740b 100644
--- a/pypots/imputation/moderntcn/model.py
+++ b/pypots/imputation/moderntcn/model.py
@@ -40,9 +40,11 @@ class ModernTCN(BaseNNImputer):
downsampling_ratio :
The downsampling ratio for the downsampling mechanism.
+ Must be int, because it is also used as kernel size and stride of convolution modules in ModernTCN.
ffn_ratio :
The ratio for the feed-forward neural network in the model.
+ Must be int.
num_blocks :
The number of blocks for the model. It should be a list of integers.
@@ -131,8 +133,8 @@ def __init__(
n_features: int,
patch_size: int,
patch_stride: int,
- downsampling_ratio: float,
- ffn_ratio: float,
+ downsampling_ratio: int,
+ ffn_ratio: int,
num_blocks: list,
large_size: list,
small_size: list,
diff --git a/pypots/nn/functional/error.py b/pypots/nn/functional/error.py
index e194f24c..0326063d 100644
--- a/pypots/nn/functional/error.py
+++ b/pypots/nn/functional/error.py
@@ -322,7 +322,7 @@ def calc_quantile_crps(
quantiles = np.arange(0.05, 1.0, 0.05)
denominator = torch.sum(torch.abs(targets * masks))
- CRPS = torch.tensor(0.0)
+ CRPS = torch.tensor(0.0, device=predictions.device)
for i in range(len(quantiles)):
q_pred = []
for j in range(len(predictions)):
@@ -383,7 +383,7 @@ def calc_quantile_crps_sum(
quantiles = np.arange(0.05, 1.0, 0.05)
denominator = torch.sum(torch.abs(targets * masks))
- CRPS = torch.tensor(0.0)
+ CRPS = torch.tensor(0.0, device=predictions.device)
for i in range(len(quantiles)):
q_pred = torch.quantile(predictions.sum(-1), quantiles[i], dim=1)
q_loss = calc_quantile_loss(q_pred, targets, quantiles[i], masks)
diff --git a/requirements/requirements.txt b/requirements/requirements.txt
index 1fdba9be..8d3cbcf7 100644
--- a/requirements/requirements.txt
+++ b/requirements/requirements.txt
@@ -8,7 +8,7 @@ seaborn
matplotlib
tensorboard
scikit-learn
-transformers
+transformers<=4.57.6
torch>=1.10.0
tsdb>=0.7.1
pygrinder>=0.7