Skip to content

Commit 0437127

Browse files
committed
pre-commit run
1 parent 9c4b38b commit 0437127

File tree

116 files changed

+46269
-40993
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

116 files changed

+46269
-40993
lines changed

RELEASE.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
* Enable passing `tf.saved_model.SaveOptions` to model saving functionality.
6868
* Census and sentiment examples updated to only use Keras instead of
6969
estimator.
70-
* Depends on `apache-beam[gcp]>=2.53.0,<3` for Python 3.11 and on
70+
* Depends on `apache-beam[gcp]>=2.53.0,<3` for Python 3.11 and on
7171
`apache-beam[gcp]>=2.47.0,<3` for 3.9 and 3.10.
7272
* Depends on `protobuf>=4.25.2,<5` for Python 3.11 and on `protobuf>3.20.3,<5`
7373
for 3.9 and 3.10.
@@ -1535,4 +1535,3 @@ the generated vocab_filename on a downstream component.
15351535
* Update tensorflow_transform to use `tf.saved_model` APIs.
15361536
* Add default values on example proto coder.
15371537
* Various performance and stability improvements.
1538-

docs/build_tft_beam_docs.py

Lines changed: 33 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -25,51 +25,53 @@
2525
```
2626
2727
"""
28-
from absl import app
29-
from absl import flags
3028

31-
from tensorflow_docs.api_generator import doc_controls
32-
from tensorflow_docs.api_generator import generate_lib
33-
from tensorflow_docs.api_generator import public_api
34-
import tensorflow_transform.beam as tft_beam
29+
from absl import app, flags
30+
from tensorflow_docs.api_generator import doc_controls, generate_lib, public_api
3531

32+
import tensorflow_transform.beam as tft_beam
3633

37-
flags.DEFINE_string('output_dir', '/tmp/tft_beam_api/',
38-
'The path to output the files to')
34+
flags.DEFINE_string(
35+
"output_dir", "/tmp/tft_beam_api/", "The path to output the files to"
36+
)
3937

4038
flags.DEFINE_string(
41-
'code_url_prefix',
42-
'https://github.com/tensorflow/transform/tree/master/tensorflow_transform',
43-
'The url prefix for links to code.')
39+
"code_url_prefix",
40+
"https://github.com/tensorflow/transform/tree/master/tensorflow_transform",
41+
"The url prefix for links to code.",
42+
)
4443

45-
flags.DEFINE_bool('search_hints', True,
46-
'Include metadata search hints in the generated files')
44+
flags.DEFINE_bool(
45+
"search_hints", True, "Include metadata search hints in the generated files"
46+
)
4747

48-
flags.DEFINE_string('site_path', 'tfx/transform/api_docs/python',
49-
'Path prefix in the _toc.yaml')
48+
flags.DEFINE_string(
49+
"site_path", "tfx/transform/api_docs/python", "Path prefix in the _toc.yaml"
50+
)
5051

5152
FLAGS = flags.FLAGS
5253

5354

5455
def main(args):
55-
if args[1:]:
56-
raise ValueError('Unrecognized Command line args', args[1:])
56+
if args[1:]:
57+
raise ValueError("Unrecognized Command line args", args[1:])
5758

58-
doc_controls.do_not_generate_docs(tft_beam.analyzer_impls)
59+
doc_controls.do_not_generate_docs(tft_beam.analyzer_impls)
5960

60-
doc_generator = generate_lib.DocGenerator(
61-
root_title='TFT-Beam',
62-
py_modules=[('tft_beam', tft_beam)],
63-
code_url_prefix=FLAGS.code_url_prefix + '/beam',
64-
search_hints=FLAGS.search_hints,
65-
site_path=FLAGS.site_path,
66-
callbacks=[
67-
public_api.explicit_package_contents_filter,
68-
public_api.local_definitions_filter
69-
])
61+
doc_generator = generate_lib.DocGenerator(
62+
root_title="TFT-Beam",
63+
py_modules=[("tft_beam", tft_beam)],
64+
code_url_prefix=FLAGS.code_url_prefix + "/beam",
65+
search_hints=FLAGS.search_hints,
66+
site_path=FLAGS.site_path,
67+
callbacks=[
68+
public_api.explicit_package_contents_filter,
69+
public_api.local_definitions_filter,
70+
],
71+
)
7072

71-
doc_generator.build(FLAGS.output_dir)
73+
doc_generator.build(FLAGS.output_dir)
7274

7375

74-
if __name__ == '__main__':
75-
app.run(main)
76+
if __name__ == "__main__":
77+
app.run(main)

docs/build_tft_docs.py

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -25,45 +25,46 @@
2525
```
2626
2727
"""
28-
from absl import app
29-
from absl import flags
3028

31-
from tensorflow_docs.api_generator import generate_lib
32-
from tensorflow_docs.api_generator import public_api
33-
import tensorflow_transform as transform
29+
from absl import app, flags
30+
from tensorflow_docs.api_generator import generate_lib, public_api
3431

32+
import tensorflow_transform as transform
3533

36-
flags.DEFINE_string('output_dir', '/tmp/tft_api/',
37-
'The path to output the files to')
34+
flags.DEFINE_string("output_dir", "/tmp/tft_api/", "The path to output the files to")
3835

3936
flags.DEFINE_string(
40-
'code_url_prefix',
41-
'https://github.com/tensorflow/transform/tree/master/tensorflow_transform',
42-
'The url prefix for links to code.')
37+
"code_url_prefix",
38+
"https://github.com/tensorflow/transform/tree/master/tensorflow_transform",
39+
"The url prefix for links to code.",
40+
)
4341

44-
flags.DEFINE_bool('search_hints', True,
45-
'Include metadata search hints in the generated files')
42+
flags.DEFINE_bool(
43+
"search_hints", True, "Include metadata search hints in the generated files"
44+
)
4645

47-
flags.DEFINE_string('site_path', 'tfx/transform/api_docs/python',
48-
'Path prefix in the _toc.yaml')
46+
flags.DEFINE_string(
47+
"site_path", "tfx/transform/api_docs/python", "Path prefix in the _toc.yaml"
48+
)
4949

5050
FLAGS = flags.FLAGS
5151

5252

5353
def main(args):
54-
if args[1:]:
55-
raise ValueError('Unrecognized Command line args', args[1:])
54+
if args[1:]:
55+
raise ValueError("Unrecognized Command line args", args[1:])
5656

57-
doc_generator = generate_lib.DocGenerator(
58-
root_title='TF-Transform',
59-
py_modules=[('tft', transform)],
60-
code_url_prefix=FLAGS.code_url_prefix,
61-
search_hints=FLAGS.search_hints,
62-
site_path=FLAGS.site_path,
63-
callbacks=[public_api.explicit_package_contents_filter])
57+
doc_generator = generate_lib.DocGenerator(
58+
root_title="TF-Transform",
59+
py_modules=[("tft", transform)],
60+
code_url_prefix=FLAGS.code_url_prefix,
61+
search_hints=FLAGS.search_hints,
62+
site_path=FLAGS.site_path,
63+
callbacks=[public_api.explicit_package_contents_filter],
64+
)
6465

65-
doc_generator.build(FLAGS.output_dir)
66+
doc_generator.build(FLAGS.output_dir)
6667

6768

68-
if __name__ == '__main__':
69-
app.run(main)
69+
if __name__ == "__main__":
70+
app.run(main)

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ The [`tft`](api_docs/python/tft)
1111
module documentation is the only module that is relevant to TFX users.
1212
The [`tft_beam`](api_docs/python/tft-beam)
1313
module is relevant only when using Transform as a standalone library.
14-
Typically, a TFX user constructs a `preprocessing_fn`, and the rest of the
14+
Typically, a TFX user constructs a `preprocessing_fn`, and the rest of the
1515
Transform library calls are made by the Transform component.
1616

1717
You can also use the Apache Beam `MLTransform`

docs/javascripts/mathjax.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ window.MathJax = {
1111
}
1212
};
1313

14-
document$.subscribe(() => {
14+
document$.subscribe(() => {
1515
MathJax.startup.output.clearCache()
1616
MathJax.typesetClear()
1717
MathJax.texReset()

0 commit comments

Comments
 (0)