tfp-nightly 0.26.0.dev20250808__py2.py3-none-any.whl → 0.26.0.dev20251103__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tensorflow_probability/python/__init__.py +10 -2
- tensorflow_probability/python/internal/backend/jax/numpy_math.py +4 -0
- tensorflow_probability/python/internal/backend/numpy/numpy_math.py +4 -0
- tensorflow_probability/python/internal/distribution_util.py +1 -0
- tensorflow_probability/python/version.py +1 -1
- tensorflow_probability/substrates/jax/internal/distribution_util.py +1 -0
- tensorflow_probability/substrates/numpy/internal/distribution_util.py +1 -0
- {tfp_nightly-0.26.0.dev20250808.dist-info → tfp_nightly-0.26.0.dev20251103.dist-info}/METADATA +1 -1
- {tfp_nightly-0.26.0.dev20250808.dist-info → tfp_nightly-0.26.0.dev20251103.dist-info}/RECORD +11 -11
- {tfp_nightly-0.26.0.dev20250808.dist-info → tfp_nightly-0.26.0.dev20251103.dist-info}/WHEEL +0 -0
- {tfp_nightly-0.26.0.dev20250808.dist-info → tfp_nightly-0.26.0.dev20251103.dist-info}/top_level.txt +0 -0
|
@@ -47,6 +47,13 @@ def _validate_tf_environment(package):
|
|
|
47
47
|
raise
|
|
48
48
|
|
|
49
49
|
import distutils.version
|
|
50
|
+
import packaging.version
|
|
51
|
+
|
|
52
|
+
def _loose_version(version: str):
|
|
53
|
+
try:
|
|
54
|
+
return packaging.version.Version(version)
|
|
55
|
+
except packaging.version.InvalidVersion:
|
|
56
|
+
return distutils.version.LooseVersion(version)
|
|
50
57
|
|
|
51
58
|
#
|
|
52
59
|
# Update this whenever we need to depend on a newer TensorFlow release.
|
|
@@ -54,8 +61,9 @@ def _validate_tf_environment(package):
|
|
|
54
61
|
required_tensorflow_version = '2.18'
|
|
55
62
|
# required_tensorflow_version = '1.15' # Needed internally -- DisableOnExport
|
|
56
63
|
|
|
57
|
-
if (
|
|
58
|
-
|
|
64
|
+
if _loose_version(tf.__version__) < _loose_version(
|
|
65
|
+
required_tensorflow_version
|
|
66
|
+
):
|
|
59
67
|
raise ImportError(
|
|
60
68
|
'This version of TensorFlow Probability requires TensorFlow '
|
|
61
69
|
'version >= {required}; Detected an installation of version {present}. '
|
|
@@ -203,6 +203,8 @@ def _bincount(arr, weights=None, minlength=None, maxlength=None, # pylint: disa
|
|
|
203
203
|
"""Counts number of occurences of each value in `arr`."""
|
|
204
204
|
# TODO(https://github.com/google/jax/issues/5719): Use np.bincount directly?
|
|
205
205
|
if not JAX_MODE:
|
|
206
|
+
if minlength is None:
|
|
207
|
+
minlength = 0
|
|
206
208
|
return np.bincount(arr, weights, minlength).astype(utils.numpy_dtype(dtype))
|
|
207
209
|
|
|
208
210
|
dtype = utils.numpy_dtype(dtype)
|
|
@@ -414,6 +416,8 @@ def _reduce_logsumexp(input_tensor, axis=None, keepdims=False, name=None): # py
|
|
|
414
416
|
or np.issubdtype(dtype, np.complexfloating)):
|
|
415
417
|
# Match TF error
|
|
416
418
|
raise TypeError('Input must be either real or complex')
|
|
419
|
+
if not input_tensor.shape:
|
|
420
|
+
return input_tensor
|
|
417
421
|
if input_tensor.size == 0:
|
|
418
422
|
# On empty arrays, mimic TF in returning `-inf` instead of failing, and
|
|
419
423
|
# preserve error message if `axis` arg is incompatible with an empty array.
|
|
@@ -203,6 +203,8 @@ def _bincount(arr, weights=None, minlength=None, maxlength=None, # pylint: disa
|
|
|
203
203
|
"""Counts number of occurences of each value in `arr`."""
|
|
204
204
|
# TODO(https://github.com/google/jax/issues/5719): Use np.bincount directly?
|
|
205
205
|
if not JAX_MODE:
|
|
206
|
+
if minlength is None:
|
|
207
|
+
minlength = 0
|
|
206
208
|
return np.bincount(arr, weights, minlength).astype(utils.numpy_dtype(dtype))
|
|
207
209
|
|
|
208
210
|
dtype = utils.numpy_dtype(dtype)
|
|
@@ -414,6 +416,8 @@ def _reduce_logsumexp(input_tensor, axis=None, keepdims=False, name=None): # py
|
|
|
414
416
|
or np.issubdtype(dtype, np.complexfloating)):
|
|
415
417
|
# Match TF error
|
|
416
418
|
raise TypeError('Input must be either real or complex')
|
|
419
|
+
if not input_tensor.shape:
|
|
420
|
+
return input_tensor
|
|
417
421
|
if input_tensor.size == 0:
|
|
418
422
|
# On empty arrays, mimic TF in returning `-inf` instead of failing, and
|
|
419
423
|
# preserve error message if `axis` arg is incompatible with an empty array.
|
|
@@ -1281,6 +1281,7 @@ def parent_frame_arguments():
|
|
|
1281
1281
|
|
|
1282
1282
|
# Remove the *varargs, and flatten the **kwargs. Both are
|
|
1283
1283
|
# nested lists.
|
|
1284
|
+
local_vars = dict(local_vars)
|
|
1284
1285
|
local_vars.pop(variable_arg_name, {})
|
|
1285
1286
|
keyword_args = local_vars.pop(keyword_arg_name, {})
|
|
1286
1287
|
|
|
@@ -1281,6 +1281,7 @@ def parent_frame_arguments():
|
|
|
1281
1281
|
|
|
1282
1282
|
# Remove the *varargs, and flatten the **kwargs. Both are
|
|
1283
1283
|
# nested lists.
|
|
1284
|
+
local_vars = dict(local_vars)
|
|
1284
1285
|
local_vars.pop(variable_arg_name, {})
|
|
1285
1286
|
keyword_args = local_vars.pop(keyword_arg_name, {})
|
|
1286
1287
|
|
|
@@ -1281,6 +1281,7 @@ def parent_frame_arguments():
|
|
|
1281
1281
|
|
|
1282
1282
|
# Remove the *varargs, and flatten the **kwargs. Both are
|
|
1283
1283
|
# nested lists.
|
|
1284
|
+
local_vars = dict(local_vars)
|
|
1284
1285
|
local_vars.pop(variable_arg_name, {})
|
|
1285
1286
|
keyword_args = local_vars.pop(keyword_arg_name, {})
|
|
1286
1287
|
|
{tfp_nightly-0.26.0.dev20250808.dist-info → tfp_nightly-0.26.0.dev20251103.dist-info}/RECORD
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
tensorflow_probability/__init__.py,sha256=qyOYw4eGComQ1GLNlJ0-OvaWBjQ5B0-Hjo02hlJ40VI,1222
|
|
2
|
-
tensorflow_probability/python/__init__.py,sha256=
|
|
3
|
-
tensorflow_probability/python/version.py,sha256=
|
|
2
|
+
tensorflow_probability/python/__init__.py,sha256=qQRo06XbmO2sHYKllnDEpq9v1IhMUbO3bt9QoRyTwL8,5879
|
|
3
|
+
tensorflow_probability/python/version.py,sha256=J_7mEk6VZSBiT5au2aAz1d-By2gtkVtsFMOGEQQdHiw,1476
|
|
4
4
|
tensorflow_probability/python/bijectors/__init__.py,sha256=t_jgecHvPmsxGIfqfayVn8UvdhKwODhftsn7mN6SGqM,8822
|
|
5
5
|
tensorflow_probability/python/bijectors/absolute_value.py,sha256=Lwfp3Px3YacTaxf3qqarsloiuMUtqugPRlVtf54wv3k,3664
|
|
6
6
|
tensorflow_probability/python/bijectors/ascending.py,sha256=BeXeuA1tKDGsqP0GofGwGDwzZzYGd1I15MAsuswnc8Y,3124
|
|
@@ -362,7 +362,7 @@ tensorflow_probability/python/internal/cache_util.py,sha256=3Bg-3yyg6PrD5HbGJeql
|
|
|
362
362
|
tensorflow_probability/python/internal/callable_util.py,sha256=e4BV15DuxzTlstGdmTd97CG_zjch32vKUf8KaZ9NO5I,2556
|
|
363
363
|
tensorflow_probability/python/internal/custom_gradient.py,sha256=imYsiQra8qTY1quuSFekxjR9jzICBhsree4749rEKps,5618
|
|
364
364
|
tensorflow_probability/python/internal/distribute_lib.py,sha256=RadeQBdsNtqUXYBFXE4Om6W8BJAMMXM_OXbKgxuVzfQ,13254
|
|
365
|
-
tensorflow_probability/python/internal/distribution_util.py,sha256=
|
|
365
|
+
tensorflow_probability/python/internal/distribution_util.py,sha256=nNR8K_wnNUgxk4UclI0r2XUzk6Z-8BIR2z-ZBke3oq4,57599
|
|
366
366
|
tensorflow_probability/python/internal/docstring_util.py,sha256=hCJRTyCoTk65vsl2kwKtgcrtT9iTVZ0LEGA-z3nznM8,1588
|
|
367
367
|
tensorflow_probability/python/internal/dtype_util.py,sha256=HHUADLzQTqnGqX27SmLe5W_MF3qsnC4TbHpNbErxYRk,14758
|
|
368
368
|
tensorflow_probability/python/internal/empirical_statistical_testing.py,sha256=1U78-qIbeBKuqu2C40Re0rAvqD5JBahIQT5QB2dzGbA,22679
|
|
@@ -414,7 +414,7 @@ tensorflow_probability/python/internal/backend/jax/nn.py,sha256=K9-Xy9L2dxM0cWCR
|
|
|
414
414
|
tensorflow_probability/python/internal/backend/jax/numpy_array.py,sha256=Fos2U2Y534-EFLGu5nO73I0NPE7g5cSpVuY2XYKRhDI,16036
|
|
415
415
|
tensorflow_probability/python/internal/backend/jax/numpy_keras.py,sha256=TxdcvCnfl2XqhdX5PhTOSKkE1e5y4leiNYb7Ioui9_U,856
|
|
416
416
|
tensorflow_probability/python/internal/backend/jax/numpy_logging.py,sha256=ilfbgVoQImReqK7oGCJCAA2K9D4J0gIx2v0b-yfRKUQ,3496
|
|
417
|
-
tensorflow_probability/python/internal/backend/jax/numpy_math.py,sha256=
|
|
417
|
+
tensorflow_probability/python/internal/backend/jax/numpy_math.py,sha256=V2efAtvtGMZb7QAnBFIKdn3eJMIBrcOIbgWuBbOrfaA,31881
|
|
418
418
|
tensorflow_probability/python/internal/backend/jax/numpy_signal.py,sha256=ZPtGu59PxlaMBUFxHnrx1kX8EbIHAtu_YaBw6teiDEs,3442
|
|
419
419
|
tensorflow_probability/python/internal/backend/jax/ops.py,sha256=tm7wDOCgGWt51y-69zBX5LR0hyDuBqHxP1qkvP3Y9HU,23480
|
|
420
420
|
tensorflow_probability/python/internal/backend/jax/private.py,sha256=3bObq-w9uujbkRfLcRopOo0c8HMC1Iw5-3pDuj70HdM,4484
|
|
@@ -481,7 +481,7 @@ tensorflow_probability/python/internal/backend/numpy/nn.py,sha256=R7pSVAlteOlwYG
|
|
|
481
481
|
tensorflow_probability/python/internal/backend/numpy/numpy_array.py,sha256=cTvK3H76ZVI2vKjSeLsXcHiGtngHg-YoFJ0tp86XrC4,16019
|
|
482
482
|
tensorflow_probability/python/internal/backend/numpy/numpy_keras.py,sha256=AmaNa8HFEJZAJkOGIfrb13d2sZu_pMkPRGa7n_qHNeo,857
|
|
483
483
|
tensorflow_probability/python/internal/backend/numpy/numpy_logging.py,sha256=yth3X0yznR2xg6_wIgKft2SE9T1d3zg6RGn1rbsbPBU,3497
|
|
484
|
-
tensorflow_probability/python/internal/backend/numpy/numpy_math.py,sha256=
|
|
484
|
+
tensorflow_probability/python/internal/backend/numpy/numpy_math.py,sha256=Br_plGiYKGTW-UQ57QfSc18DNzVjd2cizptpWfX07mI,31860
|
|
485
485
|
tensorflow_probability/python/internal/backend/numpy/numpy_signal.py,sha256=9BTjqYwR4Y4DeuWVm7RLL8AyAw9CLwA35n-EuXhVrqc,3420
|
|
486
486
|
tensorflow_probability/python/internal/backend/numpy/ops.py,sha256=MeZw1cp-MNjqhec-t4Fbeq5nlsCQDiVhlEFoKeSbeIk,23456
|
|
487
487
|
tensorflow_probability/python/internal/backend/numpy/private.py,sha256=CrT8Hi1WNhM5VX6DtOZpd4MozdW6rhf4Q0jYYqR4yY4,4461
|
|
@@ -959,7 +959,7 @@ tensorflow_probability/substrates/jax/internal/cache_util.py,sha256=PapeGtG-0_db
|
|
|
959
959
|
tensorflow_probability/substrates/jax/internal/callable_util.py,sha256=vDxXtQNl4ewhALdUvgx5P_WekVqtt1zfsmrEWDB99D8,3020
|
|
960
960
|
tensorflow_probability/substrates/jax/internal/custom_gradient.py,sha256=E_t8AJLMKR6CW-jwqA4SudBw2wmJ2MXBiTO05YCLYdM,6124
|
|
961
961
|
tensorflow_probability/substrates/jax/internal/distribute_lib.py,sha256=RBvSxFcVcol5BrZ5Uo82TLjNT1Hqrhrqxc0CroUVFXk,13771
|
|
962
|
-
tensorflow_probability/substrates/jax/internal/distribution_util.py,sha256=
|
|
962
|
+
tensorflow_probability/substrates/jax/internal/distribution_util.py,sha256=yBVYBmMeLuxOejje42OUDrSR6sGh029c4FyS3lp3ejY,58138
|
|
963
963
|
tensorflow_probability/substrates/jax/internal/dtype_util.py,sha256=0MkFifM1gXeZzI9hZS0W_4NWewAUqGfPyPTvq_paeII,15247
|
|
964
964
|
tensorflow_probability/substrates/jax/internal/empirical_statistical_testing.py,sha256=C45X-XxYh2HTIFiQ3oLCOT8ehEdxVvJQKDXgjvuoMiY,23115
|
|
965
965
|
tensorflow_probability/substrates/jax/internal/implementation_selection.py,sha256=avYl23pMo04siIRNZrHL5PYpPh5aC0CGiei1NA6TfuM,6404
|
|
@@ -1395,7 +1395,7 @@ tensorflow_probability/substrates/numpy/internal/cache_util.py,sha256=ABf4gQNMB1
|
|
|
1395
1395
|
tensorflow_probability/substrates/numpy/internal/callable_util.py,sha256=73EYzbKYRV1LE1KNTXyWxihXDiXNWhYWbNavsNI8mHE,3024
|
|
1396
1396
|
tensorflow_probability/substrates/numpy/internal/custom_gradient.py,sha256=MpacPtKvJ4bh_vgambxcM7n_di5_r7kqkm7g6yJJEpk,6131
|
|
1397
1397
|
tensorflow_probability/substrates/numpy/internal/distribute_lib.py,sha256=5_deiaYNuswnQcxuNpaBFtTspzo6C9pnWDMgMpP9Gjs,13784
|
|
1398
|
-
tensorflow_probability/substrates/numpy/internal/distribution_util.py,sha256=
|
|
1398
|
+
tensorflow_probability/substrates/numpy/internal/distribution_util.py,sha256=4SbuRDExDqFCsUjtygJNDJsPeq2mRQu_qiHr7mNpyFI,58152
|
|
1399
1399
|
tensorflow_probability/substrates/numpy/internal/dtype_util.py,sha256=fX_1AQS9YNM_ljHAUK4sUoZ-qYG-b46c0CbFcDAZHSg,15252
|
|
1400
1400
|
tensorflow_probability/substrates/numpy/internal/empirical_statistical_testing.py,sha256=2c1_SWQuSCGLHJ8TII2UqzbIj2swIhXOKtg1GXuDm1M,23117
|
|
1401
1401
|
tensorflow_probability/substrates/numpy/internal/implementation_selection.py,sha256=5L5nD9U4MacDFy_90VYcKQ6kIsx9wFQiODpYsc6ZwHk,6412
|
|
@@ -1535,7 +1535,7 @@ tensorflow_probability/substrates/numpy/util/seed_stream.py,sha256=Zqz5ctJoSpzHQ
|
|
|
1535
1535
|
tensorflow_probability/substrates/numpy/vi/__init__.py,sha256=NNJPo76kolD21ec0xIFRROooxIKibeFh3Q9gsANzX3I,3828
|
|
1536
1536
|
tensorflow_probability/substrates/numpy/vi/csiszar_divergence.py,sha256=804ioHtZkBBT1P65a89PABxOC-GYxYf_4ch3w7dIqKs,45484
|
|
1537
1537
|
tensorflow_probability/substrates/numpy/vi/optimization.py,sha256=MyYaWbRzYIwVz6ka7X5nB8ryAFqvHKoRBWih-acaAbs,33690
|
|
1538
|
-
tfp_nightly-0.26.0.
|
|
1539
|
-
tfp_nightly-0.26.0.
|
|
1540
|
-
tfp_nightly-0.26.0.
|
|
1541
|
-
tfp_nightly-0.26.0.
|
|
1538
|
+
tfp_nightly-0.26.0.dev20251103.dist-info/METADATA,sha256=tDLg4kreAauMh06hHtDBQBBXn2UcOA0bZHHlXdfZIC0,13609
|
|
1539
|
+
tfp_nightly-0.26.0.dev20251103.dist-info/WHEEL,sha256=Ll72iyqtt6Rbxp-Q7FSafYA1LeRv98X15xcZWRsFEmY,109
|
|
1540
|
+
tfp_nightly-0.26.0.dev20251103.dist-info/top_level.txt,sha256=Jb6JYoMHGjOqCQ1Wdlk-IJ5vPYkPr5PsNVH8K4KjYK4,23
|
|
1541
|
+
tfp_nightly-0.26.0.dev20251103.dist-info/RECORD,,
|
|
File without changes
|
{tfp_nightly-0.26.0.dev20250808.dist-info → tfp_nightly-0.26.0.dev20251103.dist-info}/top_level.txt
RENAMED
|
File without changes
|