Skip to content

Commit

Permalink
allow weighted for more cases
Browse files Browse the repository at this point in the history
tmp: change setup python version to troubleshoot conda

tmp: switch ubuntu image to 20.04 because of latest miniconda issues

tmp: pin name and version in the gh actions

tmp: pin more gh actions

tmp: pin 2024 version

tmp: change to ubuntu-latest, pin miniconda version

tmp: fix indentation

tmp: correct miniconda version name

tmp: set miniconda version to latest

tmp: remove conda path addition

tmp: set mamba and python version

tmp: reset to default conda solver

tmp: redo environment for latest python

tmp: play with the versions

tmp: finish pinning environment, revert ci/cd tasks

tmp: switch nbmake version, fix deep-koopman path
  • Loading branch information
EthanJamesLew committed Mar 11, 2024
1 parent 504b467 commit 463c823
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 81 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/notebook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,11 @@ jobs:
echo $CONDA/bin >> $GITHUB_PATH
- name: Install dependencies
run: |
conda env update --solver classic --file environment.yml --name base
conda env update --file environment.yml --name base
- name: Test with pytest
run: |
pip install .
conda install pytest
pip install nbmake==0.5
pip install nbmake==1.5.3
pytest --nbmake "./notebooks/"
pytest
2 changes: 1 addition & 1 deletion .github/workflows/python-package-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
echo $CONDA/bin >> $GITHUB_PATH
- name: Install dependencies
run: |
conda env update --solver classic --file environment.yml --name base
conda env update --file environment.yml --name base
- name: Lint with flake8
run: |
conda install flake8
Expand Down
3 changes: 2 additions & 1 deletion autokoopman/autokoopman.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,14 +449,15 @@ def _sanitize_training_data(

# convert the data to autokoopman trajectories
if isinstance(training_data, TrajectoriesData):
assert scoring_weights is None, f"scoring weights must be None as interpolation is occuring"
if not isinstance(training_data, UniformTimeTrajectoriesData):
assert scoring_weights is None, f"scoring weights must be None as interpolation is occuring"
print(
f"resampling trajectories as they need to be uniform time (sampling period {sampling_period})"
)
training_data = training_data.interp_uniform_time(sampling_period)
else:
if not np.isclose(training_data.sampling_period, sampling_period):
assert scoring_weights is None, f"scoring weights must be None as interpolation is occuring"
print(
f"resampling trajectories because the sampling periods differ (original {training_data.sampling_period}, new {sampling_period})"
)
Expand Down
84 changes: 11 additions & 73 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,77 +3,15 @@ channels:
- conda-forge
- defaults
dependencies:
- blas=1.0
- ca-certificates=2023.08.22
- cffi=1.15.1
- filelock=3.9.0
- gmp=6.2.1
- gmpy2=2.1.2
- jinja2=3.1.2
- libcxx=16.0.6
- libffi=3.3
- libopenblas=0.3.21
- libprotobuf=3.20.3
- libsqlite=3.43.2
- libuv=1.44.2
- libzlib=1.2.13
- llvm-openmp=14.0.6
- markupsafe=2.1.1
- mpc=1.1.0
- mpfr=4.0.2
- ncurses=6.4
- networkx=3.1
- ninja=1.10.2
- ninja-base=1.10.2
- numpy-base=1.26.0
- openssl=1.1.1w
- pip=23.3.1
- pycparser=2.21
- python=3.9.0
- pytorch=2.0.1
- readline=8.2
- setuptools=68.2.2
- sleef=3.5.1
- sqlite=3.43.2
- sympy=1.11.1
- tk=8.6.13
- typing-extensions=4.7.1
- typing_extensions=4.7.1
- tzdata=2023c
- wheel=0.41.2
- xz=5.2.6
- zlib=1.2.13
- pysindy=1.3.0
- pip=24.0
- matplotlib>=3.3.4
- sympy>=1.9
- pandas>=1.1.5
- pydata-sphinx-theme==0.7.2
- conda-forge::scikit-learn
- pip:
- attrs==22.2.0
- cmake==3.25.2
- contourpy==1.0.7
- cycler==0.11.0
- cython==0.29.33
- decorator==5.1.1
- derivative==0.5.3
- exceptiongroup==1.1.0
- fonttools==4.38.0
- gpy==1.10.0
- gpyopt==1.2.6
- iniconfig==2.0.0
- joblib==1.2.0
- kiwisolver==1.4.4
- matplotlib==3.6.3
- mpmath==1.2.1
- numpy==1.21.0
- packaging==23.0
- pandas==1.5.3
- paramz==0.9.5
- pillow==9.4.0
- pluggy==1.0.0
- pyparsing==3.0.9
- pysindy==1.7.2
- pytest==7.2.1
- python-dateutil==2.8.2
- pytz==2022.7.1
- scikit-learn==1.0.2
- scipy==1.10.0
- six==1.16.0
- threadpoolctl==3.1.0
- tomli==2.0.1
- tqdm==4.64.1
- gpy==1.13.1
- gpyopt==1.2.6
- torch==2.2.1
- sphinx_mdinclude==0.5.1
4 changes: 3 additions & 1 deletion notebooks/deep-koopman.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"\n",
"import sys\n",
"sys.path.append(\"..\")\n",
"# this is the convenience function\n",
"from autokoopman import auto_koopman"
]
Expand Down Expand Up @@ -248,7 +250,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.7"
"version": "3.9.0"
}
},
"nbformat": 4,
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ pydata-sphinx-theme==0.7.2
sphinx_mdinclude==0.5.1
gpy==1.10.0
gpyopt==1.2.6
torch==1.12.1
pysindy==1.7.2
torch==2.2.1
scikit-learn==1.4.1.post1

0 comments on commit 463c823

Please sign in to comment.