Skip to content

Commit cbe9555

Browse files
authored
Merge pull request #32 from views-platform/development
Updated models
2 parents c70fa6f + 5d5272f commit cbe9555

254 files changed

Lines changed: 2752 additions & 3260 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ __pycache__/
4040
# C extensions
4141
*.so
4242

43+
# Misc.
44+
appwrite_cache/
45+
4346
# Distribution / packaging
4447
.Python
4548
build/

README.md

Lines changed: 54 additions & 37 deletions
Large diffs are not rendered by default.

ensembles/cruel_summer/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ This folder contains code for the Cruel Summer model, an ensemble machine learni
88
|---------------------|--------------------------------|
99
| **Models** | bittersweet_symphony, brown_cheese |
1010
| **Level of Analysis** | cm |
11-
| **Targets** | ln_ged_sb_dep |
11+
| **Targets** | lr_ged_sb |
1212
| **Aggregation** | median |
13-
| **Metrics** | RMSLE, CRPS |
13+
| **Metrics** | RMSLE, CRPS, MSE, MSLE, y_hat_bar |
1414
| **Deployment Status** | shadow |
1515

1616
## Repository Structure
@@ -27,6 +27,7 @@ Cruel Summer
2727
│ ├── config_deployment.py
2828
│ ├── config_hyperparameters.py
2929
│ ├── config_meta.py
30+
│ ├── config_partitions.py
3031
├── data
3132
│ ├── generated
3233
│ ├── processed

ensembles/cruel_summer/configs/config_meta.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def get_meta_config():
1010
"name": "cruel_summer",
1111
"models": ["bittersweet_symphony", "brown_cheese"],
1212
"metrics": ["RMSLE", "CRPS", "MSE", "MSLE", "y_hat_bar"],
13-
"targets": "ln_ged_sb_dep",
13+
"targets": "lr_ged_sb",
1414
"level": "cm",
1515
"aggregation": "median",
1616
"creator": "Xiaolong",

ensembles/cruel_summer/configs/config_partitions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ def generate(steps: int = 36) -> dict:
2121
"""
2222

2323
def forecasting_train_range():
24-
month_last = ViewsMonth.now().id - 2
24+
month_last = ViewsMonth.now().id - 1
2525
return (121, month_last)
2626

2727
def forecasting_test_range(steps):
28-
month_last = ViewsMonth.now().id - 2
28+
month_last = ViewsMonth.now().id - 1
2929
return (month_last + 1, month_last + 1 + steps)
3030

3131
return {

ensembles/cruel_summer/main.py

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,18 @@
1-
import wandb
21
import warnings
32
from pathlib import Path
4-
from views_pipeline_core.cli.utils import parse_args, validate_arguments
5-
from views_pipeline_core.managers.log import LoggingManager
3+
from views_pipeline_core.cli import ForecastingModelArgs
64
from views_pipeline_core.managers.ensemble import EnsemblePathManager, EnsembleManager
75

86
warnings.filterwarnings("ignore")
97

108
try:
119
ensemble_path = EnsemblePathManager(Path(__file__))
12-
logger = LoggingManager(ensemble_path).get_logger()
13-
except FileNotFoundError as fnf_error:
14-
raise RuntimeError(
15-
f"File not found: {fnf_error}. Check the file path and try again."
16-
)
17-
except PermissionError as perm_error:
18-
raise RuntimeError(
19-
f"Permission denied: {perm_error}. Check your permissions and try again."
20-
)
2110
except Exception as e:
2211
raise RuntimeError(f"Unexpected error: {e}. Check the logs for details.")
2312

2413

2514
if __name__ == "__main__":
26-
wandb.login()
27-
args = parse_args()
28-
validate_arguments(args)
15+
args = ForecastingModelArgs.parse_args()
2916

3017
manager = EnsembleManager(
3118
ensemble_path=ensemble_path,

ensembles/pink_ponyclub/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ This folder contains code for the Pink Ponyclub model, an ensemble machine learn
88
|---------------------|--------------------------------|
99
| **Models** | bittersweet_symphony, brown_cheese, car_radio, counting_stars, demon_days, fast_car, fluorescent_adolescent, good_riddance, green_squirrel, heavy_rotation, high_hopes, little_lies, national_anthem, ominous_ox, plastic_beach, popular_monster, teen_spirit, twin_flame, yellow_submarine |
1010
| **Level of Analysis** | cm |
11-
| **Targets** | ln_ged_sb_dep |
11+
| **Targets** | lr_ged_sb |
1212
| **Aggregation** | mean |
13-
| **Metrics** | RMSLE, CRPS |
13+
| **Metrics** | RMSLE, CRPS, MSE, MSLE, y_hat_bar |
1414
| **Deployment Status** | shadow |
1515

1616
## Repository Structure
@@ -27,6 +27,7 @@ Pink Ponyclub
2727
│ ├── config_deployment.py
2828
│ ├── config_hyperparameters.py
2929
│ ├── config_meta.py
30+
│ ├── config_partitions.py
3031
├── data
3132
│ ├── generated
3233
│ ├── processed

ensembles/pink_ponyclub/configs/config_meta.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def get_meta_config():
2929
"twin_flame",
3030
"yellow_submarine",
3131
],
32-
"targets": "ln_ged_sb_dep",
32+
"targets": "lr_ged_sb",
3333
"level": "cm",
3434
"aggregation": "mean",
3535
"metrics": ["RMSLE", "CRPS", "MSE", "MSLE", "y_hat_bar"],

ensembles/pink_ponyclub/configs/config_partitions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ def generate(steps: int = 36) -> dict:
2121
"""
2222

2323
def forecasting_train_range():
24-
month_last = ViewsMonth.now().id - 2
24+
month_last = ViewsMonth.now().id - 1
2525
return (121, month_last)
2626

2727
def forecasting_test_range(steps):
28-
month_last = ViewsMonth.now().id - 2
28+
month_last = ViewsMonth.now().id - 1
2929
return (month_last + 1, month_last + 1 + steps)
3030

3131
return {

ensembles/pink_ponyclub/main.py

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,18 @@
1-
import wandb
21
import warnings
32
from pathlib import Path
4-
from views_pipeline_core.cli.utils import parse_args, validate_arguments
5-
from views_pipeline_core.managers.log import LoggingManager
3+
from views_pipeline_core.cli import ForecastingModelArgs
64
from views_pipeline_core.managers.ensemble import EnsemblePathManager, EnsembleManager
75

86
warnings.filterwarnings("ignore")
97

108
try:
119
ensemble_path = EnsemblePathManager(Path(__file__))
12-
logger = LoggingManager(ensemble_path).get_logger()
13-
except FileNotFoundError as fnf_error:
14-
raise RuntimeError(
15-
f"File not found: {fnf_error}. Check the file path and try again."
16-
)
17-
except PermissionError as perm_error:
18-
raise RuntimeError(
19-
f"Permission denied: {perm_error}. Check your permissions and try again."
20-
)
2110
except Exception as e:
2211
raise RuntimeError(f"Unexpected error: {e}. Check the logs for details.")
2312

13+
2414
if __name__ == "__main__":
25-
wandb.login()
26-
args = parse_args()
27-
validate_arguments(args)
15+
args = ForecastingModelArgs.parse_args()
2816

2917
manager = EnsembleManager(
3018
ensemble_path=ensemble_path,

0 commit comments

Comments
 (0)