Skip to content

Commit

Permalink
Add an inheritable warning to the base Estimator class.
Browse files Browse the repository at this point in the history
With this change the doc generator will add the warning to any subclass of Estimator, in any project on tensorflow.org the next time that their doc-generator is run.

PiperOrigin-RevId: 383739212
Change-Id: I3a513362ae31b83301aaa339566495048fe063b3
  • Loading branch information
MarkDaoust authored and tensorflower-gardener committed Jul 8, 2021
1 parent eba007f commit c11c774
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tensorflow/tools/docs/doc_controls.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,18 @@ def set_deprecated(obj: T) -> T:
return obj


_INHERITABLE_HEADER = "_tf_docs_inheritable_header"


def inheritable_header(text):

def _wrapped(cls):
setattr(cls, _INHERITABLE_HEADER, text)
return cls

return _wrapped


_DO_NOT_DOC = "_tf_docs_do_not_document"


Expand Down

0 comments on commit c11c774

Please sign in to comment.