-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into feature/pep8
- Loading branch information
Showing
10 changed files
with
163 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,7 @@ __pycache__/* | |
.pydevproject | ||
.settings | ||
.idea | ||
.vscode | ||
|
||
# Package files | ||
*.egg | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,123 +1,94 @@ | ||
# Travis Build file for tsfresh | ||
## Travis Build file for tsfresh | ||
|
||
language: python | ||
# We want the pip folder to be cached, to speed up installation | ||
os: linux | ||
notifications: | ||
slack: tsfresh:uIzPVnlBQs32xE5jbq34f0Cq | ||
|
||
# We want the pip folder to be cached to speed up installation | ||
cache: | ||
directories: | ||
- $HOME/.cache/pip | ||
|
||
# Installation of packages | ||
install: | ||
# Begin by updating pip to its newest version | ||
- pip install --upgrade pip wheel setuptools | ||
# Then install the requirements as they are defined | ||
- pip install -r requirements.txt -r test-requirements.txt | ||
- pip install -U . | ||
- pip freeze | ||
jobs: | ||
include: | ||
- stage: Run tests on newest set of dependencies (Python 3.5.3) | ||
env: NUMPY="latest", PANDAS="latest", SCIKITLEARN="latest", DASK="latest", DISTRIBUTED="latest", SCIPY="latest" | ||
before_script: | ||
- pip install --upgrade numpy | ||
- pip install --upgrade pandas | ||
- pip install --upgrade scikit-learn | ||
- pip install --upgrade dask | ||
- pip install --upgrade distributed | ||
- pip install --upgrade scipy | ||
- pip list | ||
script: | ||
- sed -i 's/\-n auto/\-n 2/g' setup.cfg | ||
- "if [ $TRAVIS_PULL_REQUEST == false ] && ! [ $TRAVIS_BRANCH == 'master' ]; then pytest tests/units -n2; else pytest tests; fi" | ||
python: 3.5.3 | ||
# Then install the package | ||
- pip install . | ||
# Now downgrade packages if required by environment variables | ||
- "[ \"$NUMPY\" = latest ] && pip install --upgrade numpy || [ -z \"$NUMPY\" ] || pip install numpy==$NUMPY" | ||
- "[ \"$PANDAS\" = latest ] && pip install --upgrade pandas || [ -z \"$PANDAS\" ] || pip install pandas==$PANDAS" | ||
- "[ \"$SCIKITLEARN\" = latest ] && pip install --upgrade scikit-learn || [ -z \"$SCIKITLEARN\" ] || pip install scikit-learn==$SCIKITLEARN" | ||
- "[ \"$DASK\" = latest ] && pip install --upgrade dask || [ -z \"$DASK\" ] || pip install dask==$DASK" | ||
- "[ \"$DISTRIBUTED\" = latest ] && pip install --upgrade distributed || [ -z \"$DISTRIBUTED\" ] || pip install distributed==$DISTRIBUTED" | ||
# need to downgrade tornado manually | ||
- "[ \"$SCIPY\" = latest ] || [ -z \"$SCIPY\" ] || pip install tornado==4.5.3" | ||
- "[ \"$SCIPY\" = latest ] && pip install --upgrade scipy || [ -z \"$SCIPY\" ] || pip install scipy==$SCIPY" | ||
# Print out the pip versions for debugging | ||
- pip list | ||
# Only use two cores | ||
- sed -i -e 's/-n auto/-n 2/g' setup.cfg | ||
# we want to run coverage only inside a single job | ||
- sed -e '/^\s*--cov tsfresh/d' setup.cfg > setup-nocov.cfg | ||
|
||
- stage: Run tests on newest set of dependencies (Python 3.6) | ||
env: NUMPY="latest", PANDAS="latest", SCIKITLEARN="latest", DASK="latest", DISTRIBUTED="latest", SCIPY="latest" | ||
before_script: | ||
- pip install --upgrade numpy | ||
- pip install --upgrade pandas | ||
- pip install --upgrade scikit-learn | ||
- pip install --upgrade dask | ||
- pip install --upgrade distributed | ||
- pip install --upgrade scipy | ||
- pip list | ||
script: | ||
- sed -i 's/\-n auto/\-n 2/g' setup.cfg | ||
- "if [ $TRAVIS_PULL_REQUEST == false ] && ! [ $TRAVIS_BRANCH == 'master' ]; then pytest tests/units -n2; else pytest tests; fi" | ||
python: 3.6 | ||
# all jobs call pytest with setup-nocov.cfg to not run coverage test - except one which overrides this variable | ||
env: | ||
global: | ||
- PYTEST_ADDOPTS="-c setup-nocov.cfg" | ||
|
||
# The script to call on tests | ||
script: "if [ $TRAVIS_PULL_REQUEST = false ] && ! [ $TRAVIS_BRANCH = master ]; then pytest tests/units; else pytest tests; fi" | ||
|
||
# Now define the different stages | ||
jobs: | ||
include: | ||
# First stage: tests | ||
- stage: Run tests | ||
env: NUMPY="latest" PANDAS="latest" SCIKITLEARN="latest" DASK="latest" DISTRIBUTED="latest" SCIPY="latest" | ||
python: 3.8 | ||
|
||
- stage: Run tests on newest set of dependencies (Python 3.7) | ||
env: NUMPY="latest", PANDAS="latest", SCIKITLEARN="latest", DASK="latest", DISTRIBUTED="latest", SCIPY="latest" | ||
before_script: | ||
- pip install --upgrade numpy | ||
- pip install --upgrade pandas | ||
- pip install --upgrade scikit-learn | ||
- pip install --upgrade dask | ||
- pip install --upgrade distributed | ||
- pip install --upgrade scipy | ||
- pip list | ||
script: | ||
- sed -i 's/\-n auto/\-n 2/g' setup.cfg | ||
- "if [ $TRAVIS_PULL_REQUEST == false ] && ! [ $TRAVIS_BRANCH == 'master' ]; then pytest tests/units -n2; else pytest tests; fi" | ||
- env: NUMPY="latest" PANDAS="latest" SCIKITLEARN="latest" DASK="latest" DISTRIBUTED="latest" SCIPY="latest" PYTEST_ADDOPTS="-c setup.cfg" | ||
python: 3.7 | ||
# We only run coverage tests here (we also set a different setup.cfg script here) | ||
after_success: | ||
- coveralls | ||
|
||
- stage: Run tests on oldest set of dependencies (Python 3.5.3) | ||
env: NUMPY="1.12.0", PANDAS="0.20.3", SCIKITLEARN="0.19.0", DASK="0.15.2", DISTRIBUTED="1.18.3", SCIPY="1.2.0" | ||
before_script: | ||
- pip install numpy==1.12.0 # First version with official python 3.6 support. | ||
- pip install pandas==0.20.3 | ||
- pip install scikit-learn==0.19.0 | ||
- pip install dask==0.15.2 | ||
- pip install distributed==1.18.3 | ||
# need to downgrade tornado manually | ||
- pip install tornado==4.5.3 | ||
- pip install scipy==1.2.0 | ||
- pip list | ||
script: | ||
- sed -i 's/\-n auto/\-n 2/g' setup.cfg | ||
- "if [ $TRAVIS_PULL_REQUEST == false ] && ! [ $TRAVIS_BRANCH == 'master' ]; then pytest tests/units -n2; else pytest tests; fi" | ||
- env: NUMPY="latest" PANDAS="latest" SCIKITLEARN="latest" DASK="latest" DISTRIBUTED="latest" SCIPY="latest" | ||
python: 3.6 | ||
|
||
- env: NUMPY="latest" PANDAS="latest" SCIKITLEARN="latest" DASK="latest" DISTRIBUTED="latest" SCIPY="latest" | ||
# newest pandas (>= 0.25) requires python >= 3.5.3 | ||
python: 3.5.3 | ||
|
||
- stage: Run tests on oldest set of dependencies (Python 3.6) | ||
env: NUMPY="1.12.0", PANDAS="0.20.3", SCIKITLEARN="0.19.0", DASK="0.15.2", DISTRIBUTED="1.18.3", SCIPY="1.2.0" | ||
before_script: | ||
- pip install numpy==1.12.0 # First version with official python 3.6 support. | ||
- pip install pandas==0.20.3 | ||
- pip install scikit-learn==0.19.0 | ||
- pip install dask==0.15.2 | ||
- pip install distributed==1.18.3 | ||
# need to downgrade tornado manually | ||
- pip install tornado==4.5.3 | ||
- pip install scipy==1.2.0 | ||
- pip list | ||
script: | ||
- sed -i 's/\-n auto/\-n 2/g' setup.cfg | ||
- "if [ $TRAVIS_PULL_REQUEST == false ] && ! [ $TRAVIS_BRANCH == 'master' ]; then pytest tests/units -n2; else pytest tests; fi" | ||
- env: NUMPY="1.15.1" PANDAS="0.23.2" SCIKITLEARN="0.19.2" DASK="0.16.1" DISTRIBUTED="1.18.3" SCIPY="1.2.0" | ||
# python 3.7 requires pandas >= 0.23.2 | ||
python: 3.7 | ||
|
||
- env: NUMPY="1.12.0" PANDAS="0.20.3" SCIKITLEARN="0.19.0" DASK="0.15.2" DISTRIBUTED="1.18.3" SCIPY="1.2.0" | ||
python: 3.6 | ||
|
||
- stage: Run tests on oldest set of dependencies (Python 3.7) | ||
env: NUMPY="1.15.1", PANDAS="0.23.2", SCIKITLEARN="0.19.2", DASK="0.16.1", DISTRIBUTED="1.18.3", SCIPY="1.2.0" | ||
before_script: | ||
- pip install numpy==1.15.1 # First version with official python 3.7 support. | ||
- pip install pandas==0.23.2 # First version with official python 3.7 support. | ||
- pip install scikit-learn==0.19.2 # First version with python 3.7 support. | ||
- pip install dask==0.16.1 | ||
- pip install distributed==1.18.3 | ||
# need to downgrade tornado manually | ||
- pip install tornado==4.5.3 | ||
- pip install scipy==1.2.0 | ||
- pip list | ||
script: | ||
- sed -i 's/\-n auto/\-n 2/g' setup.cfg | ||
- "if [ $TRAVIS_PULL_REQUEST == false ] && ! [ $TRAVIS_BRANCH == 'master' ]; then pytest tests/units -n2; else pytest tests; fi" | ||
python: 3.7 | ||
- env: NUMPY="1.12.0" PANDAS="0.20.3" SCIKITLEARN="0.19.0" DASK="0.15.2" DISTRIBUTED="1.18.3" SCIPY="1.2.0" | ||
python: 3.5.3 | ||
|
||
|
||
# Second stage: deploy | ||
- stage: Deploy | ||
if: tag IS present AND fork = false | ||
python: 3.7 | ||
script: skip | ||
deploy: | ||
provider: pypi | ||
user: MaxChrist | ||
password: | ||
secure: Jh0Z69Mh+esOpegXyXoecFOkpMhaQaiJbQVEvVvQ2K1rCmCE20a19/TGfPUrynpqOYXZvvb5Ok6CtlzAi9J5huA3MRSf4iYPsUe8i7n0FK4JU5BP7VqM3/7cQZMdD5SeYFV3e3JURDcKYfoG7N+DNb+LfluYK5MBkRLhdEVRqSeHocPY4QRzzhJi1ljX99ThdRPrsQqYaD3tpZxJhbJDgHLtvMr39+407uQSDnubvFz3iu90DZiN2fIP5bEN6PDuaGXNZMA1p40DjSkGc7epg0U4vHn6CSya1nXlqjXUqXYJY5Ha2kbMAN7hfmU+gId09+FSHQRuanKJkRqSBksVgATCAeSAiqAe3EPAsG75ewhXDeusQZMzRy7DxQzjOJG9oIyWMVmZFlIoNlpg2eifN9uUc7FfyGHiVfWwUDslszpc/81hQViMPP0NoMAop4zcWR3ChCMnHMycPQEmWuV65WfL7yN6SuTokxSmepubPtFs+4UIlI0rgZWCHVIgGZqI8LFn958pLtpQ+32Ew8HGU3IiOfao9HbGreQ2Lgqo2L2EyNDWiHfJ3oZ1+6BP/1GqI6j7x7oPdwoE1jvY4CSC7iMAiieZNnrvywvmJpZB69CGefxQJzWcm+yD03QwNBFFaabCbKwbn+q3eUOUrPRuvTkhVLRWDxQNH/zaZyuZQ+Q= | ||
distributions: "sdist bdist_wheel" | ||
on: | ||
tags: true | ||
repo: blue-yonder/tsfresh | ||
notifications: | ||
slack: tsfresh:uIzPVnlBQs32xE5jbq34f0Cq | ||
|
||
# Some dependencies are not yet ready for Python 3.8 | ||
allow_failures: | ||
- python: 3.8 | ||
# Make sure to not wait for Python 3.8 | ||
fast_finish: true | ||
|
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from tsfresh.examples.robot_execution_failures import download_robot_execution_failures, load_robot_execution_failures | ||
from tsfresh import extract_features | ||
from tsfresh.utilities.dataframe_functions import impute | ||
from tsfresh.feature_extraction import ComprehensiveFCParameters | ||
from tsfresh.utilities.distribution import ClusterDaskDistributor | ||
|
||
|
||
if __name__ == "__main__": | ||
download_robot_execution_failures() | ||
df, y = load_robot_execution_failures() | ||
|
||
extraction_settings = ComprehensiveFCParameters() | ||
|
||
X = extract_features(df, | ||
column_id='id', column_sort='time', | ||
default_fc_parameters=extraction_settings, | ||
chunksize=100, distributor=ClusterDaskDistributor("tcp://192.168.178.235:8786")) | ||
|
||
print(X) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters