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

Move pympler to test requirements #299

Merged
merged 1 commit into from Oct 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions featuretools/tests/dfs_tests/test_deep_feature_synthesis.py
Expand Up @@ -6,6 +6,7 @@
import numpy as np
import pandas as pd
import pytest
from pympler.asizeof import asizeof

from ..testing_utils import feature_with_name, make_ecommerce_entityset

Expand All @@ -30,7 +31,6 @@
make_agg_primitive
)
from featuretools.synthesis import DeepFeatureSynthesis
from featuretools.utils.gen_utils import getsize
from featuretools.utils.pickle_utils import save_obj_pickle
from featuretools.variable_types import Numeric

Expand Down Expand Up @@ -623,7 +623,7 @@ def test_pickle_features(es):
assert feat_1.entityset == feat_2.entityset

# file is smaller than entityset in memory
assert os.path.getsize(filepath) < getsize(es)
assert os.path.getsize(filepath) < asizeof(es)

# file is smaller than entityset pickled
assert os.path.getsize(filepath) < os.path.getsize(es_filepath)
Expand Down Expand Up @@ -660,7 +660,7 @@ def test_pickle_features_with_custom_primitive(es):
assert feat_1.entityset == feat_2.entityset

# file is smaller than entityset in memory
assert os.path.getsize(filepath) < getsize(es)
assert os.path.getsize(filepath) < asizeof(es)

# file is smaller than entityset pickled
assert os.path.getsize(filepath) < os.path.getsize(es_filepath)
Expand Down
@@ -1,9 +1,9 @@
import pytest
from pympler.asizeof import asizeof

from ..testing_utils import make_ecommerce_entityset

from featuretools.primitives import Feature, IdentityFeature, Last, Mode, Sum
from featuretools.utils.gen_utils import getsize
from featuretools.variable_types import Datetime, Numeric


Expand All @@ -27,9 +27,9 @@ def test_copy_features_does_not_copy_entityset(es):
where=IdentityFeature(es['log']['value']) == 2,
use_previous='4 days')
features = [agg, agg_where, agg_use_previous, agg_use_previous_where]
in_memory_size = getsize(locals())
in_memory_size = asizeof(locals())
copied = [f.copy() for f in features]
new_in_memory_size = getsize(locals())
new_in_memory_size = asizeof(locals())
assert new_in_memory_size < 2 * in_memory_size

for f, c in zip(features, copied):
Expand Down
1 change: 0 additions & 1 deletion featuretools/utils/gen_utils.py
@@ -1,6 +1,5 @@
import sys

from pympler.asizeof import asizeof as getsize # noqa
from tqdm import tqdm


Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Expand Up @@ -6,7 +6,6 @@ toolz>=0.8.2
pyyaml>=3.12
cloudpickle>=0.4.0
future>=0.16.0
pympler>=0.5
dask>=0.19.4
distributed>=1.23.3
psutil>=5.4.8
1 change: 1 addition & 0 deletions test-requirements.txt
@@ -1,5 +1,6 @@
pytest==3.8.2
mock==2.0.0
pympler==0.6
pytest-xdist==1.23.2
pytest-cov==2.6.0
fastparquet>=0.1.6