Edward Loper
8232f94fa3
Internal symbol name change.
...
PiperOrigin-RevId: 350215627
Change-Id: I05b5f5bab417e9e23e646d68526974270c44482a
2021-01-05 14:15:45 -08:00
Dan Moldovan
365442b8d0
Remove unused file from build. A subsequent change will remove it.
...
PiperOrigin-RevId: 339267778
Change-Id: Id846c9d20cf1f0ad698d9f1674f0d018ffd6e57a
2020-10-27 09:58:14 -07:00
Dan Moldovan
3b7416dc43
Switch all sources to PY3 only.
...
PiperOrigin-RevId: 338459870
Change-Id: I27338c3b4d12fa6e23bf6fd550f65363109e96e4
2020-10-22 06:34:09 -07:00
Dan Moldovan
99d1481fc6
Add extra checks for shape and dtype for control flow conditionals.
...
PiperOrigin-RevId: 335096700
Change-Id: I742518d56648aa4d99bba374c824587f25c2c220
2020-10-02 14:17:32 -07:00
A. Unique TensorFlower
3abfb8c74b
BUILD file cleanup
...
PiperOrigin-RevId: 334697975
Change-Id: Ic2e677dabd70d442f7ada6b7f16cb0af6ce84388
2020-09-30 16:11:46 -07:00
Dan Moldovan
4507fa1347
Fix bug in occurring handling when composite symbols enter a undefined into a TF loop.
...
PiperOrigin-RevId: 326004271
Change-Id: I1a8641ca4d71bd9396fd2b5d73dc49c0c8fb9612
2020-08-11 05:53:23 -07:00
Dan Moldovan
e1654c78fe
Retire temporary release toggle.
...
PiperOrigin-RevId: 325831070
Change-Id: If723c0bd89255522c8cbfd02156c30db23ea53b8
2020-08-10 10:29:17 -07:00
Dan Moldovan
c0374a95df
Allow creating symbols in TF loops. This is on a best-effort basis, and only works in cases when the symbol being created doesn't depend on previous iterations.
...
This change only adds the feature, but does not enable it yet. It will be enabled separately.
PiperOrigin-RevId: 325282159
Change-Id: I29fd9792454c6dac4189d0756d517f9ff0390700
2020-08-06 12:18:25 -07:00
Dan Moldovan
be88c5f8a7
Internal cleanup: set up boilerplate for tests which require running inside a tf.function. The boilerplate helps keep the tests clean, although its mechanism may be tricky.
...
PiperOrigin-RevId: 322444035
Change-Id: I56bbb1e1eb2feb65e16b8171d4a1bd20e1b190a5
2020-07-21 15:07:37 -07:00
Gaurav Jain
75d9ed443a
Enable tests blocked by b/117943489
...
PiperOrigin-RevId: 311034341
Change-Id: Iab60ac2be4c1352aa39d3e266df09ba45a2feada
2020-05-11 18:13:41 -07:00
Dan Moldovan
1d09cfa6be
Clean up dead code.
...
PiperOrigin-RevId: 305953853
Change-Id: Ib039bc96a6fd930b41ca61d42d02ffb77cdafbd4
2020-04-10 15:22:55 -07:00
Dan Moldovan
ff551c9f20
Internal cleanup: Move the bulk of the source code transformation infrastructure into the generic pyct module.
...
PiperOrigin-RevId: 305135067
Change-Id: Ifb84546c35a603942fd864769e7320a7ae95da3b
2020-04-06 15:51:41 -07:00
Dan Moldovan
469200828c
Flush stdout when printing a warning.
...
PiperOrigin-RevId: 292251228
Change-Id: Iae81bf012c1ac60131df7f3b0129bc8717d016cb
2020-01-29 17:27:43 -08:00
Dan Moldovan
b00d66ebe0
Swap out modules in py2 mode in a cleaner fashion.
...
PiperOrigin-RevId: 288526813
Change-Id: I86efd4d804c0c873856307cf4a969270eb7bbae8
2020-01-07 10:46:31 -08:00
Dan Moldovan
c62ff15fc3
Fix compat_util to properly import the fallback module, and include a helper that can emulate nonlocal
.
...
PiperOrigin-RevId: 288375862
Change-Id: Ia87b9abe5448188c6ec667a931c423ddfd8b2944
2020-01-06 14:29:41 -08:00
Dan Moldovan
8e83ed8729
Branch the current version and freeze it for Python 2, which is no longer supported going forward. This enables taking advantage of Python 3 features for simpler and more robust implementations.
...
PiperOrigin-RevId: 287986003
Change-Id: I8a15bd6ea0bdde50782cea44e875c0759ae75c37
2020-01-03 07:00:12 -08:00
Hye Soo Yang
6be93e0bca
Python 3 Migration. //tensorflow/(tools|contrib|python)
...
PiperOrigin-RevId: 281786348
Change-Id: Idc03f3af289295fa478e42b2c83a4269c20b6a06
2019-11-21 11:09:10 -08:00
Dan Moldovan
dd3ec92602
Optimize away the calculation of a range tensor for the pattern for i in tf.range
. Along with the performance improvement, this is more compatible with XLA because it avoids generating dynamically-shaped tensors. Fixes #30182 .
...
PiperOrigin-RevId: 257394214
2019-07-10 06:53:29 -07:00
TensorFlower Gardener
3c1287bffa
Merge pull request #29519 from ghchinoy:patch-3
...
PiperOrigin-RevId: 253930277
2019-06-18 22:04:06 -07:00
G. Hussain Chinoy
f24abcb251
modified wording for 'control'
2019-06-16 12:03:06 -06:00
Dan Moldovan
b807d424a0
Do not dispatch to TF conditionals for SparseTensor arguments.
...
PiperOrigin-RevId: 252076962
2019-06-07 11:57:06 -07:00
A. Unique TensorFlower
df8cb73f95
Adjust structure of all BUILD files to recommended style ( https://docs.bazel.build/versions/master/skylark/build-style.html#file-structure ), moving loads to top.
...
PiperOrigin-RevId: 252038015
2019-06-07 06:31:32 -07:00
G. Hussain Chinoy
6113337060
Update ag_logging.py with clarity and reference
...
* fixes typo
* adds clarity to text
* adds reference to absl's logging doc page
ref #29250
2019-06-06 21:13:16 -06:00
A. Unique TensorFlower
9ec8e24524
Apply 'buildozer fix moveLicensesAndDistribs movePackageToTop' to all BUILD files.
...
PiperOrigin-RevId: 249812723
2019-05-24 04:58:47 -07:00
Dan Moldovan
7ca022acc8
Internal change.
...
PiperOrigin-RevId: 245566538
2019-04-27 07:47:19 -07:00
A. Unique TensorFlower
866b89feff
n/a
...
PiperOrigin-RevId: 244837138
2019-04-23 05:46:11 -07:00
Dan Moldovan
750d8f2178
Mirror logging to stdout more consistently.
...
PiperOrigin-RevId: 239862166
2019-03-22 15:13:15 -07:00
Lukas Geiger
3ebc496a1b
var = dict() --> var = {}
2019-03-11 11:58:29 +00:00
Dan Moldovan
d584984e82
Fix verbosity in interactive prompts.
...
PiperOrigin-RevId: 233482282
2019-02-11 14:47:14 -08:00
Dan Moldovan
9495d47609
Fix bullet list in docstring.
...
PiperOrigin-RevId: 232889358
2019-02-07 09:40:39 -08:00
Dan Moldovan
14c78f9675
Always convert function calls dynamically. This greatly simplifies the implementation at the cost of less readability of the output.
...
Also included is a cleanup of the tests that had to be updated due to this change. Addresses #25281 , #24759 .
Lastly, the CL enables the automatic fallback on compilation error.
PiperOrigin-RevId: 232135777
2019-02-02 13:10:16 -08:00
A. Unique TensorFlower
9628503d8e
Handle variables defined in a single conditional branch. They will still not work in TensorFlow, but this is sometimes valid in pure Python code. The error for TensorFlow or misbehaving Python code will now happen at runtime rather than compile-time which allows for well-behaved Python to execute as expected.
...
PiperOrigin-RevId: 231414805
2019-01-29 09:27:06 -08:00
Dan Moldovan
cb49fa39e5
Always raise internal error. In a subsequent change we can raise syntax errors separately. Add more logging.
...
PiperOrigin-RevId: 231223885
2019-01-28 08:35:20 -08:00
Dan Moldovan
146dffb15a
Expose a few autograph debugging primitives.
...
PiperOrigin-RevId: 230709287
2019-01-24 06:18:38 -08:00
Dan Moldovan
bf6c9500be
Use a logging mechanism that allows greater output control.
...
Requirements that this mechanism meets:
* users should be able to change the verbosity programmatically (ag.set_verbosity)
* users should be able to change the verbosity without touching the code (AUTOGRAPH_VERBOSITY env variable)
* different levels of verbosity should be supported, ala vlog
* the mechanism should work in interactive prompts like Jupyter by mirroring the log messages to console
All these controls are global (at least for now).
PiperOrigin-RevId: 230514195
2019-01-23 05:45:32 -08:00
Dan Moldovan
4ff0c987c3
Account for the possibility that fully qualified name objects may not be normalized. Improve the consistency between function and classes in namer.
...
PiperOrigin-RevId: 229379978
2019-01-15 09:31:23 -08:00
Dan Moldovan
71ea120a1b
Use eager_py_func instead of the deprecated py_func. Add a bit of extra logic to account for the potential use of tf.print in Python 2.
...
PiperOrigin-RevId: 224574979
2018-12-07 14:13:37 -08:00
Gaurav Jain
5c25275eba
Limit tests exercising list resizing until it has been fixed
...
PiperOrigin-RevId: 223850169
2018-12-03 13:24:43 -08:00
Gaurav Jain
24f578cd66
Add @run_deprecated_v1 annotation to tests failing in v2
...
PiperOrigin-RevId: 223422907
2018-11-29 15:43:25 -08:00
Gaurav Jain
b17d53c0cd
Replace a few calls of Session run
with evaluate
...
In order to support tests running in eager mode we need to avoid
unnecessary use of Sessions in tests. This moves to remove some
of the uses of the `run` function in favor of `evaluate`.
PiperOrigin-RevId: 223009795
2018-11-27 10:09:00 -08:00
Alexandre Passos
f6ce9fd485
Automated rollback of commit 1fdd7c7408
...
PiperOrigin-RevId: 222434204
2018-11-21 11:14:22 -08:00
Sergei Lebedev
95d7bbb2fc
Replaced list comprehensions inside all/any/sum with generator expressions
...
PiperOrigin-RevId: 222429778
2018-11-21 10:44:43 -08:00
Gaurav Jain
1fdd7c7408
Replace a few calls of Session run
with evaluate
...
In order to support tests running in eager mode we need to avoid
unnecessary use of Sessions in tests. This moves to remove some
of the uses of the `run` function in favor of `evaluate`.
PiperOrigin-RevId: 222013881
2018-11-18 20:05:24 -08:00
Dan Moldovan
402e5862fa
Use the conversion options object throughout the process (including during the deferred runtime conversions), and remove its arg_types field.
...
This is necessary for the correct behavior when converting dynamic functions - converted_call must operate in a manner consistent with the original parameters.
PiperOrigin-RevId: 216587135
2018-10-10 13:57:09 -07:00
Dan Moldovan
e09ddb4290
Port the conditional control flow conversion to the new operators.
...
PiperOrigin-RevId: 216548561
2018-10-10 10:09:43 -07:00
Dan Moldovan
226cc7c47e
Allow unsupported comparison operators to be passed through and scale back the coverage of overloads.
...
It's up for discussion whether we allow overloading everything or let the users rely on the existing operator overloading mechanisms instead. The one case that we do want to support is the equality operator.
PiperOrigin-RevId: 212809447
2018-09-13 07:30:24 -07:00
Dan Moldovan
668c079f4e
Move AutoGraph to core. This CL moves the entirety of the code base, keeping the frontend autograph module in contrib for backward compatibility. Certain files, like notebooks and the readme file may be referenced from the outside, so a copy of those is kept as well. In addition, the notebooks subdirectory of examples is also kept in contrib because the extension the build file relies on is not available in the PIP package.
...
PiperOrigin-RevId: 212543067
2018-09-11 16:32:19 -07:00