This commit is contained in:
wassname
2022-11-20 12:44:42 +08:00
parent c8631eb40d
commit d4e0cda175
10 changed files with 1038 additions and 505 deletions
-105
View File
@@ -1,105 +0,0 @@
# Salesforce Open Source Community Code of Conduct
## About the Code of Conduct
Equality is a core value at Salesforce. We believe a diverse and inclusive
community fosters innovation and creativity, and are committed to building a
culture where everyone feels included.
Salesforce open-source projects are committed to providing a friendly, safe, and
welcoming environment for all, regardless of gender identity and expression,
sexual orientation, disability, physical appearance, body size, ethnicity, nationality,
race, age, religion, level of experience, education, socioeconomic status, or
other similar personal characteristics.
The goal of this code of conduct is to specify a baseline standard of behavior so
that people with different social values and communication styles can work
together effectively, productively, and respectfully in our open source community.
It also establishes a mechanism for reporting issues and resolving conflicts.
All questions and reports of abusive, harassing, or otherwise unacceptable behavior
in a Salesforce open-source project may be reported by contacting the Salesforce
Open Source Conduct Committee at ossconduct@salesforce.com.
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of gender
identity and expression, sexual orientation, disability, physical appearance,
body size, ethnicity, nationality, race, age, religion, level of experience, education,
socioeconomic status, or other similar personal characteristics.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy toward other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Personal attacks, insulting/derogatory comments, or trolling
* Public or private harassment
* Publishing, or threatening to publish, others' private information—such as
a physical or electronic address—without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
* Advocating for or encouraging any of the above behaviors
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned with this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project email
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the Salesforce Open Source Conduct Committee
at ossconduct@salesforce.com. All complaints will be reviewed and investigated
and will result in a response that is deemed necessary and appropriate to the
circumstances. The committee is obligated to maintain confidentiality with
regard to the reporter of an incident. Further details of specific enforcement
policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership and the Salesforce Open Source Conduct
Committee.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][contributor-covenant-home],
version 1.4, available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html.
It includes adaptions and additions from [Go Community Code of Conduct][golang-coc],
[CNCF Code of Conduct][cncf-coc], and [Microsoft Open Source Code of Conduct][microsoft-coc].
This Code of Conduct is licensed under the [Creative Commons Attribution 3.0 License][cc-by-3-us].
[contributor-covenant-home]: https://www.contributor-covenant.org (https://www.contributor-covenant.org/)
[golang-coc]: https://golang.org/conduct
[cncf-coc]: https://github.com/cncf/foundation/blob/master/code-of-conduct.md
[microsoft-coc]: https://opensource.microsoft.com/codeofconduct/
[cc-by-3-us]: https://creativecommons.org/licenses/by/3.0/us/
+1 -1
View File
@@ -1,6 +1,6 @@
Fork note:
Interested by the results on the Exchange data I'm digging deeper, plotting, extending, and replicating the exchange reults. See `scratch.ipynb`
Interested by the results on the Exchange data I'm digging deeper, plotting, extending, and replicating the exchange reults. See `scratch.ipynb` for plots. See mjc_notes for my notes.
----
-7
View File
@@ -1,7 +0,0 @@
## Security
Please report any security issue to [security@salesforce.com](mailto:security@salesforce.com)
as soon as it is discovered. This library limits its runtime dependencies in
order to reduce the total cost of ownership as much as can be, but all consumers
should remain vigilant and have their security stakeholders review all third-party
products (3PP) like this one and their dependencies.
+4 -1
View File
@@ -1,3 +1,4 @@
# install environment
```sh
# try with pip torch WORKS!
export PROJ=deeptime
@@ -7,8 +8,10 @@ mamba install -y ipykernel pip ipywidgets
pip install torch==1.10.0+cu113 torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu113
# 117 does not exist yet
python -m ipykernel install --user --name $PROJ
pip install gin-config fire pandas matplotlib numpy scikit-learn einops tensorboard
pip install gin-config fire pandas matplotlib numpy scikit-learn einops tensorboard yapf
pip install tsai
# note that I've also recorded the env in requirements
python -m experiments.forecast --config_path=storage/experiments/Exchange/192S/repeat=0/config.gin run >> storage/experiments/Exchange/192S/repeat=0/instance.log 2>&1%
```
+27
View File
@@ -0,0 +1,27 @@
#!/bin/bash
set -e -x
# This script will document the requirements for multiple conda environments
# It will capture the requirements in multiple ways each of which has pros and cons
# inputs
PROJECT_NAMES='deeptime'
for PROJECT_NAME in $PROJECT_NAMES
do
echo $PROJECT_NAME
PYTHON_INTERPRETER=~/miniforge3/envs/$PROJECT_NAME/bin/python
# minimal requirement, simpler, but no versions or pip
conda env export --no-builds --from-history > requirements/environment.min.yaml
# extensive requirements including pip and information overload
conda env export > requirements/environment.max.yaml
# requirements in a modified pip spec, usefull for dependabot and so on
$PYTHON_INTERPRETER -m pip freeze > requirements/pip.conda.txt
done
# inputs
for PROJECT_NAME in $PROJECT_NAMES
do
echo $PROJECT_NAME
# conda lock is good for not overspecifying version, but it misses pip
cd requirements && conda-lock -f environment.max.yaml -p linux-64
done
+196
View File
@@ -0,0 +1,196 @@
name: deeptime
channels:
- conda-forge
- pytorch
dependencies:
- _libgcc_mutex=0.1=conda_forge
- _openmp_mutex=4.5=2_gnu
- appdirs=1.4.4=pyh9f0ad1d_0
- asttokens=2.1.0=pyhd8ed1ab_0
- attrs=22.1.0=pyh71513ae_1
- backcall=0.2.0=pyh9f0ad1d_0
- backports=1.0=py_2
- backports.functools_lru_cache=1.6.4=pyhd8ed1ab_0
- brotlipy=0.7.0=py38h0a891b7_1005
- bzip2=1.0.8=h7f98852_4
- ca-certificates=2022.9.24=ha878542_0
- cachecontrol=0.12.12=pyhd8ed1ab_1
- cachy=0.3.0=pyhd8ed1ab_1
- cffi=1.15.1=py38h4a40e3a_2
- charset-normalizer=2.1.1=pyhd8ed1ab_0
- click=8.1.3=unix_pyhd8ed1ab_2
- click-default-group=1.2.2=pyhd8ed1ab_1
- clikit=0.6.2=pyh9f0ad1d_0
- conda-lock=1.2.1=pyhd8ed1ab_1
- crashtest=0.3.1=pyhd8ed1ab_0
- cryptography=38.0.3=py38h80a4ca7_0
- dbus=1.13.6=h5008d03_3
- debugpy=1.6.3=py38hfa26641_1
- decorator=5.1.1=pyhd8ed1ab_0
- distlib=0.3.6=pyhd8ed1ab_0
- ensureconda=1.4.3=pyhd8ed1ab_0
- entrypoints=0.4=pyhd8ed1ab_0
- executing=1.2.0=pyhd8ed1ab_0
- expat=2.5.0=h27087fc_0
- filelock=3.8.0=pyhd8ed1ab_0
- gettext=0.21.1=h27087fc_0
- html5lib=1.1=pyh9f0ad1d_0
- idna=3.4=pyhd8ed1ab_0
- importlib-metadata=5.0.0=pyha770c72_1
- importlib_metadata=5.0.0=hd8ed1ab_1
- importlib_resources=5.10.0=pyhd8ed1ab_0
- ipykernel=6.17.1=pyh210e3f2_0
- ipython=8.6.0=pyh41d4057_1
- ipywidgets=8.0.2=pyhd8ed1ab_1
- jaraco.classes=3.2.3=pyhd8ed1ab_0
- jedi=0.18.1=pyhd8ed1ab_2
- jeepney=0.8.0=pyhd8ed1ab_0
- jinja2=3.1.2=pyhd8ed1ab_1
- jsonschema=4.17.0=pyhd8ed1ab_0
- jupyter_client=7.4.7=pyhd8ed1ab_0
- jupyter_core=5.0.0=py38h578d9bd_0
- jupyterlab_widgets=3.0.3=pyhd8ed1ab_0
- keyring=23.11.0=py38h578d9bd_0
- ld_impl_linux-64=2.39=hc81fddc_0
- libffi=3.4.2=h7f98852_5
- libgcc-ng=12.2.0=h65d4601_19
- libglib=2.74.1=h606061b_1
- libgomp=12.2.0=h65d4601_19
- libiconv=1.17=h166bdaf_0
- libnsl=2.0.0=h7f98852_0
- libsodium=1.0.18=h36c2ea0_1
- libsqlite=3.40.0=h753d276_0
- libstdcxx-ng=12.2.0=h46fd767_19
- libuuid=2.32.1=h7f98852_1000
- libzlib=1.2.13=h166bdaf_4
- markupsafe=2.1.1=py38h0a891b7_2
- matplotlib-inline=0.1.6=pyhd8ed1ab_0
- more-itertools=9.0.0=pyhd8ed1ab_0
- msgpack-python=1.0.4=py38h43d8883_1
- nbformat=5.7.0=pyhd8ed1ab_0
- ncurses=6.3=h27087fc_1
- nest-asyncio=1.5.6=pyhd8ed1ab_0
- openssl=3.0.7=h166bdaf_0
- packaging=21.3=pyhd8ed1ab_0
- parso=0.8.3=pyhd8ed1ab_0
- pastel=0.2.1=pyhd8ed1ab_0
- pcre2=10.40=hc3806b6_0
- pexpect=4.8.0=pyh1a96a4e_2
- pickleshare=0.7.5=py_1003
- pip=22.3.1=pyhd8ed1ab_0
- pkginfo=1.8.3=pyhd8ed1ab_0
- pkgutil-resolve-name=1.3.10=pyhd8ed1ab_0
- platformdirs=2.5.2=pyhd8ed1ab_1
- prompt-toolkit=3.0.32=pyha770c72_0
- psutil=5.9.4=py38h0a891b7_0
- ptyprocess=0.7.0=pyhd3deb0d_0
- pure_eval=0.2.2=pyhd8ed1ab_0
- pycparser=2.21=pyhd8ed1ab_0
- pydantic=1.10.2=py38h0a891b7_1
- pygments=2.13.0=pyhd8ed1ab_0
- pylev=1.4.0=pyhd8ed1ab_0
- pyopenssl=22.1.0=pyhd8ed1ab_0
- pyparsing=3.0.9=pyhd8ed1ab_0
- pyrsistent=0.19.2=py38h0a891b7_0
- pysocks=1.7.1=pyha2e5f31_6
- python=3.8.13=ha86cf86_0_cpython
- python-dateutil=2.8.2=pyhd8ed1ab_0
- python-fastjsonschema=2.16.2=pyhd8ed1ab_0
- python_abi=3.8=2_cp38
- pyyaml=6.0=py38h0a891b7_5
- pyzmq=24.0.1=py38hfc09fa9_1
- readline=8.1.2=h0f457ee_0
- requests=2.28.1=pyhd8ed1ab_1
- ruamel.yaml=0.17.21=py38h0a891b7_2
- ruamel.yaml.clib=0.2.7=py38h0a891b7_0
- secretstorage=3.3.3=py38h578d9bd_1
- setuptools=65.5.1=pyhd8ed1ab_0
- six=1.16.0=pyh6c4a22f_0
- sqlite=3.40.0=h4ff8645_0
- stack_data=0.6.1=pyhd8ed1ab_0
- tk=8.6.12=h27826a3_0
- tomli=2.0.1=pyhd8ed1ab_0
- tomlkit=0.11.6=pyha770c72_0
- toolz=0.12.0=pyhd8ed1ab_0
- tornado=6.2=py38h0a891b7_1
- traitlets=5.5.0=pyhd8ed1ab_0
- typing=3.10.0.0=pyhd8ed1ab_0
- typing-extensions=4.4.0=hd8ed1ab_0
- typing_extensions=4.4.0=pyha770c72_0
- virtualenv=20.16.7=py38h578d9bd_0
- wcwidth=0.2.5=pyh9f0ad1d_2
- webencodings=0.5.1=py_1
- wheel=0.38.4=pyhd8ed1ab_0
- widgetsnbextension=4.0.3=pyhd8ed1ab_0
- xz=5.2.6=h166bdaf_0
- yaml=0.2.5=h7f98852_2
- zeromq=4.3.4=h9c3ff4c_1
- zipp=3.10.0=pyhd8ed1ab_0
- pip:
- absl-py==1.3.0
- blis==0.7.9
- cachetools==5.2.0
- catalogue==2.0.8
- certifi==2022.9.24
- confection==0.0.3
- contourpy==1.0.6
- cycler==0.11.0
- cymem==2.0.7
- einops==0.6.0
- fastai==2.7.10
- fastcore==1.5.27
- fastdownload==0.0.7
- fastprogress==1.0.3
- fire==0.4.0
- fonttools==4.38.0
- gin-config==0.5.0
- google-auth==2.14.1
- google-auth-oauthlib==0.4.6
- grpcio==1.50.0
- imbalanced-learn==0.9.1
- joblib==1.2.0
- kiwisolver==1.4.4
- langcodes==3.3.0
- llvmlite==0.39.1
- markdown==3.4.1
- matplotlib==3.6.2
- murmurhash==1.0.9
- numba==0.56.4
- numpy==1.23.4
- oauthlib==3.2.2
- pandas==1.5.1
- pathy==0.8.1
- pillow==9.3.0
- preshed==3.0.8
- protobuf==3.20.3
- pyasn1==0.4.8
- pyasn1-modules==0.2.8
- pyts==0.12.0
- pytz==2022.6
- requests-oauthlib==1.3.1
- rsa==4.9
- scikit-learn==1.1.3
- scipy==1.9.3
- sklearn==0.0.post1
- smart-open==5.2.1
- spacy==3.4.3
- spacy-legacy==3.0.10
- spacy-loggers==1.0.3
- srsly==2.4.5
- tensorboard==2.11.0
- tensorboard-data-server==0.6.1
- tensorboard-plugin-wit==1.8.1
- termcolor==2.1.0
- thinc==8.1.5
- threadpoolctl==3.1.0
- torch==1.10.0+cu113
- torchaudio==0.10.0+cu113
- torchvision==0.11.1+cu113
- tqdm==4.64.1
- tsai==0.3.4
- typer==0.7.0
- urllib3==1.26.12
- wasabi==0.10.1
- werkzeug==2.2.2
- yapf==0.32.0
prefix: /home/wassname/miniforge3/envs/deeptime
+13
View File
@@ -0,0 +1,13 @@
name: deeptime
channels:
- conda-forge
- pytorch
dependencies:
- python=3.8
- ipykernel
- pip
- ipywidgets
- ca-certificates
- openssl
- conda-lock
prefix: /home/wassname/miniforge3/envs/deeptime
+152
View File
@@ -0,0 +1,152 @@
absl-py==1.3.0
appdirs @ file:///home/conda/feedstock_root/build_artifacts/appdirs_1603108395799/work
asttokens @ file:///home/conda/feedstock_root/build_artifacts/asttokens_1667325728359/work
attrs @ file:///home/conda/feedstock_root/build_artifacts/attrs_1659291887007/work
backcall @ file:///home/conda/feedstock_root/build_artifacts/backcall_1592338393461/work
backports.functools-lru-cache @ file:///home/conda/feedstock_root/build_artifacts/backports.functools_lru_cache_1618230623929/work
blis==0.7.9
brotlipy @ file:///home/conda/feedstock_root/build_artifacts/brotlipy_1666764652625/work
CacheControl @ file:///home/conda/feedstock_root/build_artifacts/cachecontrol_1666900955882/work
cachetools==5.2.0
cachy @ file:///home/conda/feedstock_root/build_artifacts/cachy_1664983268779/work
catalogue==2.0.8
certifi==2022.9.24
cffi @ file:///home/conda/feedstock_root/build_artifacts/cffi_1666754696558/work
charset-normalizer @ file:///home/conda/feedstock_root/build_artifacts/charset-normalizer_1661170624537/work
click @ file:///home/conda/feedstock_root/build_artifacts/click_1666798198223/work
click-default-group @ file:///home/conda/feedstock_root/build_artifacts/click-default-group_1618938707830/work
clikit @ file:///home/conda/feedstock_root/build_artifacts/clikit_1591735638473/work
conda_lock @ file:///home/conda/feedstock_root/build_artifacts/conda-lock_1666901122549/work
confection==0.0.3
contourpy==1.0.6
crashtest @ file:///home/conda/feedstock_root/build_artifacts/crashtest_1643220351006/work
cryptography @ file:///home/conda/feedstock_root/build_artifacts/cryptography_1667422951827/work
cycler==0.11.0
cymem==2.0.7
debugpy @ file:///home/conda/feedstock_root/build_artifacts/debugpy_1666826399851/work
decorator @ file:///home/conda/feedstock_root/build_artifacts/decorator_1641555617451/work
distlib @ file:///home/conda/feedstock_root/build_artifacts/distlib_1668356257807/work
einops==0.6.0
ensureconda @ file:///home/conda/feedstock_root/build_artifacts/ensureconda_1657719435160/work
entrypoints @ file:///home/conda/feedstock_root/build_artifacts/entrypoints_1643888246732/work
executing @ file:///home/conda/feedstock_root/build_artifacts/executing_1667317341051/work
fastai==2.7.10
fastcore==1.5.27
fastdownload==0.0.7
fastjsonschema @ file:///home/conda/feedstock_root/build_artifacts/python-fastjsonschema_1663619548554/work/dist
fastprogress==1.0.3
filelock @ file:///home/conda/feedstock_root/build_artifacts/filelock_1660129891014/work
fire==0.4.0
fonttools==4.38.0
gin-config==0.5.0
google-auth==2.14.1
google-auth-oauthlib==0.4.6
grpcio==1.50.0
html5lib @ file:///home/conda/feedstock_root/build_artifacts/html5lib_1592930327044/work
idna @ file:///home/conda/feedstock_root/build_artifacts/idna_1663625384323/work
imbalanced-learn==0.9.1
importlib-metadata @ file:///home/conda/feedstock_root/build_artifacts/importlib-metadata_1666781969417/work
importlib-resources @ file:///home/conda/feedstock_root/build_artifacts/importlib_resources_1665204935269/work
ipykernel @ file:///home/conda/feedstock_root/build_artifacts/ipykernel_1668027051105/work
ipython @ file:///home/conda/feedstock_root/build_artifacts/ipython_1667140637743/work
ipywidgets @ file:///home/conda/feedstock_root/build_artifacts/ipywidgets_1662482321563/work
jaraco.classes @ file:///home/conda/feedstock_root/build_artifacts/jaraco.classes_1667024629799/work
jedi @ file:///home/conda/feedstock_root/build_artifacts/jedi_1659959867326/work
jeepney @ file:///home/conda/feedstock_root/build_artifacts/jeepney_1649085214306/work
Jinja2 @ file:///home/conda/feedstock_root/build_artifacts/jinja2_1654302431367/work
joblib==1.2.0
jsonschema @ file:///home/conda/feedstock_root/build_artifacts/jsonschema-meta_1667361745641/work
jupyter_client @ file:///home/conda/feedstock_root/build_artifacts/jupyter_client_1668623095912/work
jupyter_core @ file:///home/conda/feedstock_root/build_artifacts/jupyter_core_1668030817979/work
jupyterlab-widgets @ file:///home/conda/feedstock_root/build_artifacts/jupyterlab_widgets_1662157840858/work
keyring @ file:///home/conda/feedstock_root/build_artifacts/keyring_1667696733557/work
kiwisolver==1.4.4
langcodes==3.3.0
llvmlite==0.39.1
Markdown==3.4.1
MarkupSafe @ file:///home/conda/feedstock_root/build_artifacts/markupsafe_1666770195345/work
matplotlib==3.6.2
matplotlib-inline @ file:///home/conda/feedstock_root/build_artifacts/matplotlib-inline_1660814786464/work
more-itertools @ file:///home/conda/feedstock_root/build_artifacts/more-itertools_1666110321141/work
msgpack @ file:///home/conda/feedstock_root/build_artifacts/msgpack-python_1666755129593/work
murmurhash==1.0.9
nbformat @ file:///home/conda/feedstock_root/build_artifacts/nbformat_1665426034066/work
nest-asyncio @ file:///home/conda/feedstock_root/build_artifacts/nest-asyncio_1664684991461/work
numba==0.56.4
numpy==1.23.4
oauthlib==3.2.2
packaging @ file:///home/conda/feedstock_root/build_artifacts/packaging_1637239678211/work
pandas==1.5.1
parso @ file:///home/conda/feedstock_root/build_artifacts/parso_1638334955874/work
pastel @ file:///home/conda/feedstock_root/build_artifacts/pastel_1640899049124/work
pathy==0.8.1
pexpect @ file:///home/conda/feedstock_root/build_artifacts/pexpect_1667297516076/work
pickleshare @ file:///home/conda/feedstock_root/build_artifacts/pickleshare_1602536217715/work
Pillow==9.3.0
pkginfo @ file:///home/conda/feedstock_root/build_artifacts/pkginfo_1654782790443/work
pkgutil_resolve_name @ file:///home/conda/feedstock_root/build_artifacts/pkgutil-resolve-name_1633981968097/work
platformdirs @ file:///home/conda/feedstock_root/build_artifacts/platformdirs_1657729053205/work
preshed==3.0.8
prompt-toolkit @ file:///home/conda/feedstock_root/build_artifacts/prompt-toolkit_1667565496306/work
protobuf==3.20.3
psutil @ file:///home/conda/feedstock_root/build_artifacts/psutil_1667885878918/work
ptyprocess @ file:///home/conda/feedstock_root/build_artifacts/ptyprocess_1609419310487/work/dist/ptyprocess-0.7.0-py2.py3-none-any.whl
pure-eval @ file:///home/conda/feedstock_root/build_artifacts/pure_eval_1642875951954/work
pyasn1==0.4.8
pyasn1-modules==0.2.8
pycparser @ file:///home/conda/feedstock_root/build_artifacts/pycparser_1636257122734/work
pydantic @ file:///home/conda/feedstock_root/build_artifacts/pydantic_1666754940883/work
Pygments @ file:///home/conda/feedstock_root/build_artifacts/pygments_1660666458521/work
pylev @ file:///home/conda/feedstock_root/build_artifacts/pylev_1641226376343/work
pyOpenSSL @ file:///home/conda/feedstock_root/build_artifacts/pyopenssl_1665350324128/work
pyparsing @ file:///home/conda/feedstock_root/build_artifacts/pyparsing_1652235407899/work
pyrsistent @ file:///home/conda/feedstock_root/build_artifacts/pyrsistent_1667498687040/work
PySocks @ file:///home/conda/feedstock_root/build_artifacts/pysocks_1661604839144/work
python-dateutil @ file:///home/conda/feedstock_root/build_artifacts/python-dateutil_1626286286081/work
pyts==0.12.0
pytz==2022.6
PyYAML @ file:///home/conda/feedstock_root/build_artifacts/pyyaml_1666772387080/work
pyzmq @ file:///home/conda/feedstock_root/build_artifacts/pyzmq_1666828534876/work
requests @ file:///home/conda/feedstock_root/build_artifacts/requests_1661872987712/work
requests-oauthlib==1.3.1
rsa==4.9
ruamel.yaml @ file:///home/conda/feedstock_root/build_artifacts/ruamel.yaml_1666827402316/work
ruamel.yaml.clib @ file:///home/conda/feedstock_root/build_artifacts/ruamel.yaml.clib_1666808054364/work
scikit-learn==1.1.3
scipy==1.9.3
SecretStorage @ file:///home/conda/feedstock_root/build_artifacts/secretstorage_1666848709093/work
six @ file:///home/conda/feedstock_root/build_artifacts/six_1620240208055/work
sklearn==0.0.post1
smart-open==5.2.1
spacy==3.4.3
spacy-legacy==3.0.10
spacy-loggers==1.0.3
srsly==2.4.5
stack-data @ file:///home/conda/feedstock_root/build_artifacts/stack_data_1668260892666/work
tensorboard==2.11.0
tensorboard-data-server==0.6.1
tensorboard-plugin-wit==1.8.1
termcolor==2.1.0
thinc==8.1.5
threadpoolctl==3.1.0
tomli @ file:///home/conda/feedstock_root/build_artifacts/tomli_1644342247877/work
tomlkit @ file:///home/conda/feedstock_root/build_artifacts/tomlkit_1666864188602/work
toolz @ file:///home/conda/feedstock_root/build_artifacts/toolz_1657485559105/work
torch==1.10.0+cu113
torchaudio==0.10.0+cu113
torchvision==0.11.1+cu113
tornado @ file:///home/conda/feedstock_root/build_artifacts/tornado_1666788592778/work
tqdm==4.64.1
traitlets @ file:///home/conda/feedstock_root/build_artifacts/traitlets_1666115969632/work
tsai==0.3.4
typer==0.7.0
typing_extensions @ file:///home/conda/feedstock_root/build_artifacts/typing_extensions_1665144421445/work
urllib3==1.26.12
virtualenv @ file:///home/conda/feedstock_root/build_artifacts/virtualenv_1668364244370/work
wasabi==0.10.1
wcwidth @ file:///home/conda/feedstock_root/build_artifacts/wcwidth_1600965781394/work
webencodings==0.5.1
Werkzeug==2.2.2
widgetsnbextension @ file:///home/conda/feedstock_root/build_artifacts/widgetsnbextension_1662157836868/work
yapf==0.32.0
zipp @ file:///home/conda/feedstock_root/build_artifacts/zipp_1666647772197/work
+645 -197
View File
File diff suppressed because one or more lines are too long
-194
View File
@@ -1,194 +0,0 @@
# %%
import os
from os.path import join
import math
import logging
from typing import Callable, Optional, Union, Dict, Tuple
from matplotlib import pyplot as plt
import gin
from fire import Fire
import numpy as np
import torch
from torch.utils.data import DataLoader
from torch import optim
from torch import nn
from experiments.base import Experiment
from data.datasets import ForecastDataset
from models import get_model
from utils.checkpoint import Checkpoint
from utils.ops import default_device, to_tensor
from utils.losses import get_loss_fn
from utils.metrics import calc_metrics
from experiments.forecast import get_data
gin.enter_interactive_mode()
# %%
gin.clear_config()
# gin.parse_config(open("storage/experiments/Exchange/96M/repeat=0/config.gin"))
gin.parse_config(open("storage/experiments/Exchange/96Mplus/repeat=0/config.gin"))
# %%
train_set, train_loader = get_data(flag='train', batch_size=16)
# x, _, _, _ =train_set[0]
# x = x * 1.0
# %%
# x -= x[0]
# x /= x.std()
# plt.plot(x)
# # %%
# %%
model = get_model("deeptime2",
dim_size=train_set.data_x.shape[1],
datetime_feats=train_set.timestamps.shape[-1]).to(default_device())
model.load_state_dict(torch.load('storage/experiments/Exchange/96Mplus/repeat=0/model.pth'))
model = model.eval()
# %%
b = train_set[1]
b = [bb[None, :] for bb in b]
x, y, x_time, y_time = map(to_tensor, b)
with torch.no_grad():
forecast = model(x, x_time, y_time)
# %%
# %%
plt.title('inception inr')
import matplotlib.colors as mcolors
colors = list(mcolors.BASE_COLORS.keys())
l = x.shape[1]
forecast2 = forecast[0].detach().cpu().numpy()
x2 = x[0].cpu()
y2 = y[0].cpu()
i_past = list(range(l))
i_future = list(range(l, l*2))
for i in range(x.shape[-1]):
plt.plot(range(l), x2[:, i], c=colors[i])
for i in range(x.shape[-1]):
plt.plot(range(l, l*2), y2[:, i], c=colors[i])
for i in range(x.shape[-1]):
plt.plot(range(l, l*2), forecast2[:, i], c=colors[i], linestyle='--')
# %%
gin.clear_config()
gin.parse_config(open("storage/experiments/Exchange/96M/repeat=0/config.gin"))
train_set, train_loader = get_data(flag='train', batch_size=16)
model = get_model("deeptime",
dim_size=train_set.data_x.shape[1],
datetime_feats=train_set.timestamps.shape[-1]).to(default_device())
model.load_state_dict(torch.load('storage/experiments/Exchange/96M/repeat=0/model.pth'))
model = model.eval()
b = train_set[1]
b = [bb[None, :] for bb in b]
x, y, x_time, y_time = map(to_tensor, b)
with torch.no_grad():
forecast = model(x, x_time, y_time)
plt.title('mlp inr')
import matplotlib.colors as mcolors
colors = list(mcolors.BASE_COLORS.keys())
l = x.shape[1]
forecast2 = forecast[0].detach().cpu().numpy()
x2 = x[0].cpu()
y2 = y[0].cpu()
i_past = list(range(l))
i_future = list(range(l, l*2))
for i in range(x.shape[-1]):
plt.plot(range(l), x2[:, i], c=colors[i])
for i in range(x.shape[-1]):
plt.plot(range(l, l*2), y2[:, i], c=colors[i])
for i in range(x.shape[-1]):
plt.plot(range(l, l*2), forecast2[:, i], c=colors[i], linestyle='--')
# %%
gin.clear_config()
gin.parse_config(open("storage/experiments/Exchange/96Mplus2/repeat=0/config.gin"))
train_set, train_loader = get_data(flag='train', batch_size=16)
model = get_model("deeptime2",
dim_size=train_set.data_x.shape[1],
datetime_feats=train_set.timestamps.shape[-1]).to(default_device())
model.load_state_dict(torch.load('storage/experiments/Exchange/96Mplus2/repeat=0/model.pth'))
model = model.eval()
b = train_set[1]
b = [bb[None, :] for bb in b]
x, y, x_time, y_time = map(to_tensor, b)
with torch.no_grad():
forecast = model(x, x_time, y_time)
plt.title('inception inr')
import matplotlib.colors as mcolors
colors = list(mcolors.BASE_COLORS.keys())
l = x.shape[1]
forecast2 = forecast[0].detach().cpu().numpy()
x2 = x[0].cpu()
y2 = y[0].cpu()
l2 = y.shape[1]
i_past = list(range(l))
i_future = list(range(l, l+l2))
for i in range(x.shape[-1]):
plt.plot(i_past, x2[:, i], c=colors[i])
for i in range(x.shape[-1]):
plt.plot(i_future, y2[:, i], c=colors[i])
for i in range(x.shape[-1]):
plt.plot(i_future, forecast2[:, i], c=colors[i], linestyle='--')
# %%
gin.clear_config()
gin.parse_config(open("storage/experiments/Exchange/96M2/repeat=0/config.gin"))
train_set, train_loader = get_data(flag='train', batch_size=16)
model = get_model("deeptime",
dim_size=train_set.data_x.shape[1],
datetime_feats=train_set.timestamps.shape[-1]).to(default_device())
model.load_state_dict(torch.load('storage/experiments/Exchange/96M2/repeat=0/model.pth'))
model = model.eval()
b = train_set[1]
b = [bb[None, :] for bb in b]
x, y, x_time, y_time = map(to_tensor, b)
with torch.no_grad():
forecast = model(x, x_time, y_time)
plt.title('mlp inr2')
import matplotlib.colors as mcolors
colors = list(mcolors.BASE_COLORS.keys())
l = x.shape[1]
forecast2 = forecast[0].detach().cpu().numpy()
x2 = x[0].cpu()
y2 = y[0].cpu()
l2 = y.shape[1]
i_past = list(range(l))
i_future = list(range(l, l+l2))
for i in range(x.shape[-1]):
plt.plot(i_past, x2[:, i], c=colors[i])
for i in range(x.shape[-1]):
plt.plot(i_future, y2[:, i], c=colors[i])
for i in range(x.shape[-1]):
plt.plot(i_future, forecast2[:, i], c=colors[i], linestyle='--')
# %%