Skip to content

Commit

Permalink
fix: typing fix v3.10
Browse files Browse the repository at this point in the history
  • Loading branch information
knutdrand committed Oct 3, 2024
1 parent fc2d6bf commit 6923320
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 16 deletions.
2 changes: 1 addition & 1 deletion chap_core/predictor/model_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

class ModelRegistry:
def __init__(self, model_dict: dict):
self._model_type = Literal['naive_model', *model_dict.keys()]
self._model_type = Literal[('naive_model',) + tuple(model_dict.keys())]
self._model_specs = [naive_spec, *model_dict.values()]

@property
Expand Down
39 changes: 24 additions & 15 deletions chap_core/predictor/published_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,30 @@ class ExternalModelSpec(ModelSpec):

models = (
ExternalModelSpec(
name='chap_ewars_monthly',
parameters={},
features=[fs.rainfall, fs.mean_temperature],
period=PeriodType.month,
description='Monthly EWARS model',
author='CHAP',
github_link="https://github.com/sandvelab/chap_auto_ewars")
,
name='chap_ewars_monthly',
parameters={},
features=[fs.rainfall, fs.mean_temperature],
period=PeriodType.month,
description='Monthly EWARS model',
author='CHAP',
github_link="https://github.com/sandvelab/chap_auto_ewars")
,
ExternalModelSpec(
name='chap_ewars_weekly',
parameters={},
features=[fs.rainfall, fs.mean_temperature],
period=PeriodType.week,
description='Weekly EWARS model',
author='CHAP',
github_link="https://github.com/sandvelab/chap_auto_ewars_weekly")
name='chap_ewars_weekly',
parameters={},
features=[fs.rainfall, fs.mean_temperature],
period=PeriodType.week,
description='Weekly EWARS model',
author='CHAP',
github_link="https://github.com/sandvelab/chap_auto_ewars_weekly"),
ExternalModelSpec(
name='auto_regressive_weekly',
parameters={},
features=[fs.rainfall, fs.mean_temperature],
period=PeriodType.week,
description='Weekly Deep Auto Regressive model',
author='knutdrand',
github_link='https://github.com/knutdrand/weekly_ar_model')
)

model_dict = {model.name: model for model in models}

0 comments on commit 6923320

Please sign in to comment.