patchfm 2.1.0__tar.gz → 2.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {patchfm-2.1.0/src/patchfm.egg-info → patchfm-2.2.1}/PKG-INFO +1 -1
- {patchfm-2.1.0 → patchfm-2.2.1}/pyproject.toml +1 -1
- patchfm-2.2.1/src/patchfm/__init__.py +2 -0
- {patchfm-2.1.0 → patchfm-2.2.1}/src/patchfm/configs/model_config.py +3 -2
- {patchfm-2.1.0 → patchfm-2.2.1}/src/patchfm/inference/forecaster.py +4 -2
- {patchfm-2.1.0 → patchfm-2.2.1}/src/patchfm/inference/modules.py +3 -2
- {patchfm-2.1.0 → patchfm-2.2.1/src/patchfm.egg-info}/PKG-INFO +1 -1
- patchfm-2.1.0/src/patchfm/__init__.py +0 -2
- {patchfm-2.1.0 → patchfm-2.2.1}/LICENSE +0 -0
- {patchfm-2.1.0 → patchfm-2.2.1}/README.md +0 -0
- {patchfm-2.1.0 → patchfm-2.2.1}/setup.cfg +0 -0
- {patchfm-2.1.0 → patchfm-2.2.1}/src/patchfm.egg-info/SOURCES.txt +0 -0
- {patchfm-2.1.0 → patchfm-2.2.1}/src/patchfm.egg-info/dependency_links.txt +0 -0
- {patchfm-2.1.0 → patchfm-2.2.1}/src/patchfm.egg-info/requires.txt +0 -0
- {patchfm-2.1.0 → patchfm-2.2.1}/src/patchfm.egg-info/top_level.txt +0 -0
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
from dataclasses import dataclass, field
|
|
1
|
+
from dataclasses import asdict, dataclass, field
|
|
2
|
+
|
|
2
3
|
|
|
3
4
|
@dataclass
|
|
4
5
|
class PatchFMConfig:
|
|
5
6
|
max_seq_len: int = 1024
|
|
6
7
|
patch_len: int = 32
|
|
7
8
|
d_model: int = 2048
|
|
8
|
-
n_heads: int =
|
|
9
|
+
n_heads: int = 32
|
|
9
10
|
n_layers_encoder: int = 6
|
|
10
11
|
quantiles: list[float] = field(default_factory=lambda: [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9])
|
|
11
12
|
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import numpy as np
|
|
1
2
|
import torch
|
|
2
3
|
import torch.nn as nn
|
|
3
|
-
import numpy as np
|
|
4
4
|
from einops import rearrange
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
from patchfm.inference.modules import (CausalRevIN, PatchFM, ResidualBlock,
|
|
7
|
+
SeqTypeConverter, TransformerEncoder)
|
|
6
8
|
|
|
7
9
|
|
|
8
10
|
# --- Forecaster Model ---
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
# Modules efficient for inference with caching
|
|
2
2
|
|
|
3
|
+
import numpy as np
|
|
3
4
|
import torch
|
|
4
5
|
import torch.nn as nn
|
|
5
6
|
from einops import rearrange
|
|
6
|
-
from rotary_embedding_torch import RotaryEmbedding
|
|
7
7
|
from huggingface_hub import PyTorchModelHubMixin
|
|
8
|
-
|
|
8
|
+
from rotary_embedding_torch import RotaryEmbedding
|
|
9
|
+
|
|
9
10
|
|
|
10
11
|
class SeqTypeConverter:
|
|
11
12
|
def __init__(self):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|