Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ajout d'outils et modèles simples de LSTM #82

Open
wants to merge 53 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
6571ad1
Create lstm branch
richardarsenault Feb 3, 2024
f923ed2
Add files via upload
richardarsenault Feb 3, 2024
d9e7171
Add files via upload
richardarsenault Feb 3, 2024
402b1cd
first rough pass
richardarsenault Feb 3, 2024
d21478e
first rough pass
richardarsenault Feb 3, 2024
6e1b77c
setup and cleaning of basic tests
richardarsenault Feb 3, 2024
44316df
continuing cleanup of first draft
richardarsenault Feb 4, 2024
980e478
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 4, 2024
f6acae0
started fixing lint
richardarsenault Feb 4, 2024
acf070e
fixed linting
richardarsenault Feb 4, 2024
5bb9f2b
fixed linting after rebase
richardarsenault Feb 4, 2024
0f8c609
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 4, 2024
79389bb
fixed minor linting issues
richardarsenault Feb 4, 2024
8da2853
Merge branch 'lstm' of github.com:hydrologie/xhydro into lstm
richardarsenault Feb 4, 2024
c642ae4
fixed linting/docs in lstm tests
richardarsenault Feb 4, 2024
8eaf80a
small fix
richardarsenault Feb 4, 2024
199b08e
updating tests with smaller files
richardarsenault Feb 4, 2024
4eed834
Merge remote-tracking branch 'origin/main' into lstm
richardarsenault Feb 10, 2024
160d586
trying to fix lstm package problems
richardarsenault Feb 10, 2024
619c953
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 10, 2024
2df3842
pytest works, not pycharm
richardarsenault Feb 10, 2024
77f9a49
pytest works, not pycharm
richardarsenault Feb 10, 2024
6159aed
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 10, 2024
c584297
Add single basin LSTM models
richardarsenault Feb 11, 2024
5eea1f0
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 11, 2024
0b138df
finished updating LSTM first pass
richardarsenault Feb 11, 2024
b9ec1c0
Merge branch 'lstm' of github.com:hydrologie/xhydro into lstm
richardarsenault Feb 11, 2024
ebc1e0a
fixed import problem
richardarsenault Feb 12, 2024
bb23560
Merge branch 'main' into lstm
Zeitsperre Feb 29, 2024
707f4d9
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 29, 2024
def070c
oops
Zeitsperre Feb 29, 2024
4959b66
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 29, 2024
424d8b0
merged origin into branch, fixed conflicts
richardarsenault Mar 7, 2024
b592be5
fix conda install
Zeitsperre Mar 7, 2024
8c1d4f7
applied changes according to review
richardarsenault Mar 8, 2024
f479f54
Merge branch 'lstm' of github.com:hydrologie/xhydro into lstm
richardarsenault Mar 8, 2024
e94aa8d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 8, 2024
d3a5ba0
fix some precommit errors, but all 'star imports' errors remain
richardarsenault Mar 8, 2024
9937687
fixed auto merge again
richardarsenault Mar 8, 2024
be9bb36
updated gh path for lstm test data
richardarsenault Mar 8, 2024
281f372
merge conflicts
richardarsenault Mar 22, 2024
a6819a6
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 22, 2024
c9b7035
review changes and pre-commit fixes
richardarsenault Mar 23, 2024
ac87553
Merge branch 'lstm' of github.com:hydrologie/xhydro into lstm
richardarsenault Mar 23, 2024
7f77f4a
Added notebook and added some functionality to better access custom L…
richardarsenault Mar 24, 2024
8953aa5
Update lstm.ipynb
richardarsenault Mar 26, 2024
f3a553a
Merge branch 'main' into lstm
richardarsenault Mar 26, 2024
3dff6ef
Merge branch 'main' into lstm
richardarsenault Apr 12, 2024
728277b
Merge branch 'main' into lstm
Zeitsperre Feb 20, 2025
a699ab8
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 20, 2025
f80bb04
Merge branch 'main' into lstm
Zeitsperre Feb 25, 2025
41c0163
move lstm to new structure, render pytorch/lstm optional, allow makef…
Zeitsperre Feb 25, 2025
3f57b9b
docstring and grammar fixes, permitted naming of submodule
Zeitsperre Feb 25, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixed linting/docs in lstm tests
richardarsenault committed Feb 4, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit c642ae4472d44224131a3f78f094f499eadb8f8e
7 changes: 6 additions & 1 deletion tests/test_lstm.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""Test suite for LSTM model implementations"""

import os

import pytest
@@ -6,6 +8,7 @@


def test_lstm_controller():
"""Test the regional LSTM model implementation."""
batch_size = 64 # batch size used in the training - multiple of 32
epochs = 2 # Number of epoch to train the LSTM model
window_size = 5 # Number of time step (days) to use in the LSTM model
@@ -22,13 +25,15 @@ def test_lstm_controller():
simulation_phases = ["test"]

dynamic_var_tags = ["tasmax_MELCC", "tasmin_MELCC", "sf", "rf", "Qsim"]

# Scale variable according to area. Used for simulated flow inputs.
qsim_pos = [
False,
False,
False,
False,
True,
] # Scale variable according to area. Used for simulated flow inputs.
]

# static variables used to condition flows on catchment properties
static_var_tags = [