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

Condense log statements in build_conda_pkg #2521

Merged
merged 6 commits into from
Jul 20, 2021

Conversation

freddyaboulton
Copy link
Contributor

@freddyaboulton freddyaboulton commented Jul 15, 2021

Pull Request Description

Fixes #2321
Fixes #2322

The fix is to upgrade the version of pytest in the conda build (this will avoid printing duplicate warnings on separate lines) and fix some of our code to avoid warnings. We can't get rid of all the warnings because some of them are coming from third party libraries. These are all the warnings written to log now - I think it's better now and there's much less scrolling.

2021-07-15T21:15:06.9891641Z $PREFIX/lib/python3.8/site-packages/skopt/space/space.py:273: 8 warnings
2021-07-15T21:15:06.9893743Z $PREFIX/lib/python3.8/site-packages/sktime/transformations/base.py:21: 8 warnings
2021-07-15T21:15:06.9894794Z evalml/tests/automl_tests/test_automl.py: 2845 warnings
2021-07-15T21:15:06.9895853Z evalml/tests/automl_tests/test_automl_utils.py: 1 warning
2021-07-15T21:15:06.9896656Z evalml/tests/automl_tests/test_automl_algorithm.py: 1 warning
2021-07-15T21:15:06.9897801Z evalml/tests/automl_tests/test_engine_base.py: 3 warnings
2021-07-15T21:15:06.9898967Z evalml/tests/pipeline_tests/test_pipelines.py: 13 warnings
2021-07-15T21:15:06.9899962Z evalml/tests/automl_tests/test_automl_search_regression.py: 4 warnings
2021-07-15T21:15:06.9901006Z evalml/tests/pipeline_tests/classification_pipeline_tests/test_binary_classification.py: 2 warnings
2021-07-15T21:15:06.9902228Z evalml/tests/pipeline_tests/test_time_series_pipeline.py: 2 warnings
2021-07-15T21:15:06.9903030Z evalml/tests/tuner_tests/test_grid_search_tuner.py: 3 warnings
2021-07-15T21:15:06.9906610Z evalml/tests/tuner_tests/test_random_search_tuner.py: 5 warnings
2021-07-15T21:15:06.9910452Z evalml/tests/tuner_tests/test_skopt_tuner.py: 8 warnings
2021-07-15T21:15:06.9914318Z evalml/tests/pipeline_tests/regression_pipeline_tests/test_regression.py: 3 warnings
2021-07-15T21:15:06.9919444Z evalml/tests/automl_tests/test_automl_search_classification.py: 8 warnings
2021-07-15T21:15:06.9925640Z   `np.float` is a deprecated alias for the builtin `float`. To silence this warning, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
2021-07-15T21:15:06.9930191Z   Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
2021-07-15T21:15:06.9931607Z 
2021-07-15T21:15:06.9939103Z $PREFIX/lib/python3.8/site-packages/patsy/constraint.py:13: 8 warnings
2021-07-15T21:15:06.9943669Z evalml/tests/automl_tests/test_automl.py: 8 warnings
2021-07-15T21:15:06.9951746Z   Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop working
2021-07-15T21:15:06.9953280Z 
2021-07-15T21:15:06.9962154Z evalml/tests/utils_tests/test_gen_utils.py:335: 8 warnings
2021-07-15T21:15:06.9974499Z evalml/tests/utils_tests/test_gen_utils.py:336: 8 warnings
2021-07-15T21:15:06.9987146Z evalml/tests/component_tests/test_components.py: 1 warning
2021-07-15T21:15:06.9996832Z evalml/tests/automl_tests/test_automl.py: 5 warnings
2021-07-15T21:15:07.0002788Z evalml/tests/automl_tests/test_time_series_split.py: 1 warning
2021-07-15T21:15:07.0015716Z evalml/tests/data_checks_tests/test_class_imbalance_data_check.py: 3 warnings
2021-07-15T21:15:07.0031521Z evalml/tests/data_checks_tests/test_target_leakage_data_check.py: 6 warnings
2021-07-15T21:15:07.0054350Z evalml/tests/component_tests/test_utils.py: 1 warning
2021-07-15T21:15:07.0055305Z evalml/tests/data_checks_tests/test_invalid_targets_data_check.py: 1 warning
2021-07-15T21:15:07.0056185Z evalml/tests/model_understanding_tests/test_graphs.py: 3 warnings
2021-07-15T21:15:07.0057038Z evalml/tests/component_tests/test_feature_selectors.py: 2 warnings
2021-07-15T21:15:07.0057852Z evalml/tests/component_tests/test_imputer.py: 4 warnings
2021-07-15T21:15:07.0058884Z evalml/tests/pipeline_tests/test_component_graph.py: 1 warning
2021-07-15T21:15:07.0059839Z evalml/tests/objective_tests/test_cost_benefit_matrix.py: 2 warnings
2021-07-15T21:15:07.0060636Z evalml/tests/pipeline_tests/test_pipelines.py: 6 warnings
2021-07-15T21:15:07.0061419Z evalml/tests/pipeline_tests/test_pipeline_utils.py: 3 warnings
2021-07-15T21:15:07.0062217Z evalml/tests/pipeline_tests/test_time_series_pipeline.py: 70 warnings
2021-07-15T21:15:07.0063034Z evalml/tests/problem_type_tests/test_problem_types.py: 1 warning
2021-07-15T21:15:07.0063760Z evalml/tests/utils_tests/test_gen_utils.py: 1 warning
2021-07-15T21:15:07.0065982Z   The default dtype for empty Series will be 'object' instead of 'float64' in a future version. Specify a dtype explicitly to silence this warning.
2021-07-15T21:15:07.0066791Z 
2021-07-15T21:15:07.0067337Z evalml/tests/automl_tests/test_automl.py: 69 warnings
2021-07-15T21:15:07.0068151Z evalml/tests/automl_tests/test_automl_search_regression.py: 1 warning
2021-07-15T21:15:07.0069234Z evalml/tests/automl_tests/test_automl_search_classification.py: 6 warnings
2021-07-15T21:15:07.0070606Z   Time series support in evalml is still in beta, which means we are still actively building its core features. Please be mindful of that when running search().
2021-07-15T21:15:07.0071377Z 
2021-07-15T21:15:07.0071885Z evalml/tests/automl_tests/test_automl.py: 1 warning
2021-07-15T21:15:07.0073387Z evalml/tests/pipeline_tests/test_component_graph.py: 16 warnings
2021-07-15T21:15:07.0074540Z   ComponentGraph.from_list will be deprecated in the next release. Please use a dictionary to specify your graph instead.
2021-07-15T21:15:07.0075307Z 
2021-07-15T21:15:07.0127103Z evalml/tests/component_tests/test_en_classifier.py::test_fit_predict_multi
2021-07-15T21:15:07.0127947Z   The max_iter was reached which means the coef_ did not converge
2021-07-15T21:15:07.0128381Z 
2021-07-15T21:15:07.0128984Z evalml/tests/component_tests/test_polynomial_detrender.py: 12 warnings
2021-07-15T21:15:07.0129870Z evalml/tests/pipeline_tests/test_time_series_pipeline.py: 10 warnings
2021-07-15T21:15:07.0131564Z   `np.int` is a deprecated alias for the builtin `int`. To silence this warning, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information.
2021-07-15T21:15:07.0134012Z   Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
2021-07-15T21:15:07.0134729Z 
2021-07-15T21:15:07.0135489Z evalml/tests/component_tests/test_lgbm_classifier.py::test_fit_string_features
2021-07-15T21:15:07.0136429Z evalml/tests/component_tests/test_lgbm_regressor.py::test_fit_string_features
2021-07-15T21:15:07.0137173Z   Using categorical_feature in Dataset.
2021-07-15T21:15:07.0137539Z 
2021-07-15T21:15:07.0138269Z evalml/tests/component_tests/test_estimators.py::test_estimators_feature_name_with_random_ascii
2021-07-15T21:15:07.0139483Z evalml/tests/component_tests/test_estimators.py::test_estimators_feature_name_with_random_ascii
2021-07-15T21:15:07.0140732Z   Objective did not converge. You might want to increase the number of iterations. Duality gap: 5296.866580401784, tolerance: 32.928629823951184
2021-07-15T21:15:07.0141400Z 
2021-07-15T21:15:07.0141958Z evalml/tests/component_tests/test_estimators.py: 2 warnings
2021-07-15T21:15:07.0142901Z evalml/tests/pipeline_tests/test_pipelines.py: 68 warnings
2021-07-15T21:15:07.0143525Z   lbfgs failed to converge (status=1):
2021-07-15T21:15:07.0144097Z   STOP: TOTAL NO. of ITERATIONS REACHED LIMIT.
2021-07-15T21:15:07.0144546Z   
2021-07-15T21:15:07.0145080Z   Increase the number of iterations (max_iter) or scale the data as shown in:
2021-07-15T21:15:07.0146402Z       https://scikit-learn.org/stable/modules/preprocessing.html
2021-07-15T21:15:07.0147718Z   Please also refer to the documentation for alternative solver options:
2021-07-15T21:15:07.0149417Z       https://scikit-learn.org/stable/modules/linear_model.html#logistic-regression
2021-07-15T21:15:07.0150624Z 
2021-07-15T21:15:07.0151618Z evalml/tests/model_understanding_tests/test_partial_dependence.py::test_partial_dependence_catboost[binary]
2021-07-15T21:15:07.0152835Z evalml/tests/model_understanding_tests/test_partial_dependence.py::test_partial_dependence_catboost[binary]
2021-07-15T21:15:07.0154057Z evalml/tests/model_understanding_tests/test_partial_dependence.py::test_partial_dependence_catboost[multiclass]
2021-07-15T21:15:07.0155284Z evalml/tests/model_understanding_tests/test_partial_dependence.py::test_partial_dependence_catboost[multiclass]
2021-07-15T21:15:07.0156658Z   Parameter 'thread_count' will be ignored. To use parallel threads, use the 'n_jobs' parameter instead.
2021-07-15T21:15:07.0157232Z 
2021-07-15T21:15:07.0157952Z evalml/tests/model_understanding_tests/prediction_explanations_tests/test_algorithms.py: 18 warnings
2021-07-15T21:15:07.0159060Z evalml/tests/model_understanding_tests/prediction_explanations_tests/test_explainers.py: 53 warnings
2021-07-15T21:15:07.0160290Z evalml/tests/model_understanding_tests/prediction_explanations_tests/test_force_plots.py: 42 warnings
2021-07-15T21:15:07.0161701Z   `np.bool` is a deprecated alias for the builtin `bool`. To silence this warning, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
2021-07-15T21:15:07.0163446Z   Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
2021-07-15T21:15:07.0164124Z 
2021-07-15T21:15:07.0164800Z evalml/tests/component_tests/test_estimators.py::test_estimator_predict_output_type
2021-07-15T21:15:07.0166071Z evalml/tests/component_tests/test_estimators.py::test_estimator_predict_output_type
2021-07-15T21:15:07.0167157Z evalml/tests/component_tests/test_estimators.py::test_estimator_predict_output_type
2021-07-15T21:15:07.0168235Z evalml/tests/component_tests/test_estimators.py::test_estimator_predict_output_type
2021-07-15T21:15:07.0187072Z   Objective did not converge. You might want to increase the number of iterations. Duality gap: 0.027714983279878425, tolerance: 0.0025
2021-07-15T21:15:07.0187884Z 
2021-07-15T21:15:07.0188779Z evalml/tests/component_tests/test_featuretools.py::test_transform
2021-07-15T21:15:07.0189664Z evalml/tests/component_tests/test_featuretools.py::test_transform_subset
2021-07-15T21:15:07.0190598Z   Only one entity in entityset, changing max_depth to 1 since deeper features cannot be created
2021-07-15T21:15:07.0191136Z 
2021-07-15T21:15:07.0191786Z evalml/tests/objective_tests/test_standard_metrics.py::test_balanced_accuracy_multi
2021-07-15T21:15:07.0192498Z   y_pred contains classes not in y_true
2021-07-15T21:15:07.0192830Z 
2021-07-15T21:15:07.0194751Z evalml/tests/model_understanding_tests/prediction_explanations_tests/test_algorithms.py::test_shap[LightGBMClassifier-binary-1]
2021-07-15T21:15:07.0196780Z evalml/tests/model_understanding_tests/prediction_explanations_tests/test_algorithms.py::test_shap[LightGBMClassifier-binary-5]
2021-07-15T21:15:07.0198477Z evalml/tests/model_understanding_tests/prediction_explanations_tests/test_explainers.py::test_explain_predictions_oversampler[LightGBMClassifier]
2021-07-15T21:15:07.0199788Z   LightGBM binary classifier with TreeExplainer shap values output has changed to a list of ndarray
2021-07-15T21:15:07.0200543Z 
2021-07-15T21:15:07.0201301Z evalml/tests/model_understanding_tests/test_partial_dependence.py::test_partial_dependence_ice_plot
2021-07-15T21:15:07.0202810Z evalml/tests/model_understanding_tests/test_partial_dependence.py::test_two_way_partial_dependence_ice_plot
2021-07-15T21:15:07.0203915Z evalml/tests/model_understanding_tests/test_partial_dependence.py::test_two_way_partial_dependence_ice_plot
2021-07-15T21:15:07.0205303Z   There are null values in the features, which will cause NaN values in the partial dependence output. Fill in these values to remove the NaN values.
2021-07-15T21:15:07.0206005Z 
2021-07-15T21:15:07.0206628Z evalml/tests/pipeline_tests/test_component_graph.py::test_component_graph_with_X_y_inputs_y
2021-07-15T21:15:07.0207339Z   divide by zero encountered in log
2021-07-15T21:15:07.0207662Z 
2021-07-15T21:15:07.0208424Z evalml/tests/model_understanding_tests/prediction_explanations_tests/test_force_plots.py: 852 warnings
2021-07-15T21:15:07.0209766Z   `np.str` is a deprecated alias for the builtin `str`. To silence this warning, use `str` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.str_` here.
2021-07-15T21:15:07.0211465Z   Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
2021-07-15T21:15:07.0212126Z 
2021-07-15T21:15:07.0212763Z evalml/tests/automl_tests/test_automl_search_regression.py::test_categorical_regression
2021-07-15T21:15:07.0213786Z   Objective did not converge. You might want to increase the number of iterations. Duality gap: 5.658896462524993, tolerance: 0.02687505030674846

After creating the pull request: in order to pass the release_notes_updated check you will need to update the "Future Release" section of docs/source/release_notes.rst to include this pull request by adding :pr:123.

@freddyaboulton freddyaboulton changed the title 2321 fix log statements Fix log statements in build_conda_pkg Jul 15, 2021
@codecov
Copy link

codecov bot commented Jul 15, 2021

Codecov Report

Merging #2521 (15daf58) into main (b01fe69) will not change coverage.
The diff coverage is 100.0%.

❗ Current head 15daf58 differs from pull request most recent head 4673c24. Consider uploading reports for the commit 4673c24 to get more accurate results
Impacted file tree graph

@@          Coverage Diff          @@
##            main   #2521   +/-   ##
=====================================
  Coverage   99.7%   99.7%           
=====================================
  Files        283     283           
  Lines      25808   25808           
=====================================
  Hits       25707   25707           
  Misses       101     101           
Impacted Files Coverage Δ
evalml/tests/automl_tests/dask_test_utils.py 66.7% <100.0%> (ø)
.../tests/automl_tests/dask_tests/test_automl_dask.py 100.0% <100.0%> (ø)
.../tests/automl_tests/dask_tests/test_dask_engine.py 100.0% <100.0%> (ø)
...lml/tests/model_understanding_tests/test_graphs.py 100.0% <100.0%> (ø)
evalml/tests/utils_tests/test_logger.py 100.0% <100.0%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b01fe69...4673c24. Read the comment docs.

@@ -47,7 +47,7 @@ def do_delay(*args, **kw):
return wrap


class TestPipelineWithFitError(BinaryClassificationPipeline):
class DaskPipelineWithFitError(BinaryClassificationPipeline):
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So that pytest doesn't think these are test cases and issue warnings

@freddyaboulton freddyaboulton marked this pull request as ready for review July 19, 2021 14:15
@freddyaboulton freddyaboulton changed the title Fix log statements in build_conda_pkg Condense log statements in build_conda_pkg Jul 19, 2021
Copy link
Contributor

@jeremyliweishih jeremyliweishih left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

Copy link
Contributor

@bchen1116 bchen1116 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Contributor

@chukarsten chukarsten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@freddyaboulton freddyaboulton merged commit b892fc9 into main Jul 20, 2021
@freddyaboulton freddyaboulton deleted the 2321-fix-log-statements branch July 20, 2021 16:03
@chukarsten chukarsten mentioned this pull request Jul 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix warning in build_conda_pkg build_conda_pkg: Repetitive, blank logging statements
4 participants