Commit 918bd556 authored by James Keeling's avatar James Keeling Committed by Anna R
Browse files

Prevent warning every time someone imports contrib.learn.datasets.base

Everything in contrib/learn/python/learn/datasets/base.py has been deprecated. One of the function in there is a decorator, retry. Because another function in that file is decorated with retry, the function is called upon import, which prints a warning.

I have fixed this by adding a private function, _internal_retry, which is used internally, and redefining retry to simply call this. That way, using retry in user-code will still print the deprecated warning, but it's not printed upon every import.

I also cleaned up the docstrings slightly.

PiperOrigin-RevId: 190626717
parent 92f13e8e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment