mttf 1.1.4__py3-none-any.whl → 1.1.6__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.

Potentially problematic release.


This version of mttf might be problematic. Click here for more details.

mt/keras/__init__.py ADDED
@@ -0,0 +1,32 @@
1
+ """MT package that represents the working Keras 2 from the system."""
2
+
3
+ from packaging.version import Version
4
+ import tensorflow as tf
5
+
6
+ tf_ver = Version(tf.__version__)
7
+ if tf_ver >= Version("2.16"):
8
+ try:
9
+ import tf_keras
10
+ except:
11
+ raise ImportError(
12
+ f"mt.keras can only work with Keras 2. You have TF version {tf_ver}. Please install tf_keras."
13
+ )
14
+ from tf_keras import *
15
+
16
+ __version__ = tf_keras.__version__
17
+ __source__ = "tf_keras"
18
+ else:
19
+ try:
20
+ import keras
21
+
22
+ kr_ver = Version(keras.__version__)
23
+ except ImportError:
24
+ kr_ver = None
25
+ if kr_ver is None or kr_ver >= Version("3.0"):
26
+ __version__ = tf.__version__
27
+ __source__ = "tensorflow.python"
28
+ from tensorflow.keras import *
29
+ else:
30
+ __version__ = keras.__version__
31
+ __source__ = "keras"
32
+ from keras import *
mt/tf/init.py CHANGED
@@ -1,6 +1,6 @@
1
1
  """Initialises TensorFlow, monkey-patching if necessary."""
2
2
 
3
- from packaging import version
3
+ from packaging.version import Version
4
4
 
5
5
  __all__ = ["init"]
6
6
 
@@ -11,9 +11,9 @@ def init():
11
11
  import tensorflow
12
12
  import sys
13
13
 
14
- tf_ver = version.parse(tensorflow.__version__)
14
+ tf_ver = Version(tensorflow.__version__)
15
15
 
16
- if tf_ver < version.parse("2.8"):
16
+ if tf_ver < Version("2.8"):
17
17
  raise ImportError(
18
18
  f"The minimum TF version that mttf supports is 2.8. Your TF is {tf_ver}. "
19
19
  "Please upgrade."
mt/tf/version.py CHANGED
@@ -1,5 +1,5 @@
1
1
  MAJOR_VERSION = 1
2
2
  MINOR_VERSION = 1
3
- PATCH_VERSION = 4
3
+ PATCH_VERSION = 6
4
4
  version = '{}.{}.{}'.format(MAJOR_VERSION, MINOR_VERSION, PATCH_VERSION)
5
5
  __all__ = ['MAJOR_VERSION', 'MINOR_VERSION', 'PATCH_VERSION', 'version']
@@ -1,14 +1,14 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mttf
3
- Version: 1.1.4
4
- Summary: A package to detect and monkey-patch TensorFlow, for Minh-Tri Pham
3
+ Version: 1.1.6
4
+ Summary: A package to detect and monkey-patch TensorFlow and Keras, for Minh-Tri Pham
5
5
  Home-page: https://github.com/inteplus/mttf
6
6
  Author: ['Minh-Tri Pham']
7
7
  Project-URL: Documentation, https://mtdoc.readthedocs.io/en/latest/mt.tf/mt.tf.html
8
8
  Project-URL: Source Code, https://github.com/inteplus/mttf
9
9
  License-File: LICENSE
10
10
  Requires-Dist: pyyaml
11
- Requires-Dist: mtbase>=4.32
11
+ Requires-Dist: mtbase>=4.32.3
12
12
  Requires-Dist: mtnet>=0.3.2
13
13
  Dynamic: author
14
14
  Dynamic: home-page
@@ -1,8 +1,9 @@
1
+ mt/keras/__init__.py,sha256=Qv3x6wnkG-ytMPzgQ8xPNe4NxxiD4z9RG23rvvLyRvg,883
1
2
  mt/tf/__init__.py,sha256=M8xiJNdrAUJZgiZTOQOdfkehjO-CYzGpoxh5HVGBkms,338
2
- mt/tf/init.py,sha256=Hbp0-daCDTUEkQiDwNpbv2qqP7tr9qCyBFUafMklkos,1298
3
+ mt/tf/init.py,sha256=BUpw33uyA_DmeJjrN2fX4MIs8MynKxkwgc2oTGTqssU,1294
3
4
  mt/tf/mttf_version.py,sha256=ha53i-H9pE-crufFttUECgXHwPvam07zMKzApUts1Gs,206
4
5
  mt/tf/utils.py,sha256=Copl5VM0PpuFUchK-AcBuGO6QitDwHcEs4FruZb2GAI,2460
5
- mt/tf/version.py,sha256=wwYizgo5s_gw0_URJ5ObnIKjwfoG5wdSZG30y4tXWK4,206
6
+ mt/tf/version.py,sha256=WILNiQZrHE_E8TaKdRSqSywIA2x-8Z8oGUEwvLmUqMI,206
6
7
  mt/tf/keras_applications/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
8
  mt/tf/keras_applications/mobilenet_v3_split.py,sha256=1oPB3EX3k3c7iju9Ksuw9xyv32-mOKPs3uy2Mk5tLd8,19716
8
9
  mt/tf/keras_applications/mobilevit.py,sha256=VsKB_U-f9jwUEjpd0eq-YXL4rDsuAbKQ0yIzkbMfLzw,9949
@@ -19,14 +20,14 @@ mt/tfc/__init__.py,sha256=XFXAbmEi5uTAuZj797cBqw9ZBnVy6ptxP0TTzVauMNk,8446
19
20
  mt/tfg/__init__.py,sha256=6Ly2QImAyQTsg_ZszuAuK_L2n56v89Cix9yYmMVk0CM,304
20
21
  mt/tfp/__init__.py,sha256=AQkGCkmDRwswEt3qoOSpxe-fZekx78sHHBs2ZVz33gc,383
21
22
  mt/tfp/real_nvp.py,sha256=U9EmkXGqFcvtS2yeh5_RgbKlVKKlGFGklAb7Voyazz4,4440
22
- mttf-1.1.4.data/scripts/dmt_pipi.sh,sha256=NNsj4P332unHMqU4mAFjU9PQvxQ8TK5XQ42LC29IZY8,510
23
- mttf-1.1.4.data/scripts/dmt_twineu.sh,sha256=KZhcYwuCW0c36tWcOgCe7uxJmS08rz-J6YNY76Exy4M,193
24
- mttf-1.1.4.data/scripts/pipi.sh,sha256=kdo96bdaKq2QIa52Z4XFSiGPcbDm09SAU9cju6I2Lxo,289
25
- mttf-1.1.4.data/scripts/wml_nexus.py,sha256=kW0ju8_kdXc4jOjhdzKiMsFuO1MNpHmu87skrhu9SEg,1492
26
- mttf-1.1.4.data/scripts/wml_pipi.sh,sha256=CuidIcbuxyXSBNQqYRhCcSC8QbBaSGnQX0KAIFaIvKA,499
27
- mttf-1.1.4.data/scripts/wml_twineu.sh,sha256=av1JLN765oOWC5LPkv2eSWIVof26y60601tMGkuYdb8,180
28
- mttf-1.1.4.dist-info/licenses/LICENSE,sha256=e_JtcszdGZ2ZGfjcymTGrcxFj_9XPicZOVtnsrPvruk,1070
29
- mttf-1.1.4.dist-info/METADATA,sha256=yr74gOSqTLrx-cOm9pZPjFFGk5rDR6npCbs9Oy6pJV0,555
30
- mttf-1.1.4.dist-info/WHEEL,sha256=ck4Vq1_RXyvS4Jt6SI0Vz6fyVs4GWg7AINwpsaGEgPE,91
31
- mttf-1.1.4.dist-info/top_level.txt,sha256=WcqGFu9cV7iMZg09iam8eNxUvGpLSKKF2Iubf6SJVOo,3
32
- mttf-1.1.4.dist-info/RECORD,,
23
+ mttf-1.1.6.data/scripts/dmt_pipi.sh,sha256=NNsj4P332unHMqU4mAFjU9PQvxQ8TK5XQ42LC29IZY8,510
24
+ mttf-1.1.6.data/scripts/dmt_twineu.sh,sha256=KZhcYwuCW0c36tWcOgCe7uxJmS08rz-J6YNY76Exy4M,193
25
+ mttf-1.1.6.data/scripts/pipi.sh,sha256=kdo96bdaKq2QIa52Z4XFSiGPcbDm09SAU9cju6I2Lxo,289
26
+ mttf-1.1.6.data/scripts/wml_nexus.py,sha256=kW0ju8_kdXc4jOjhdzKiMsFuO1MNpHmu87skrhu9SEg,1492
27
+ mttf-1.1.6.data/scripts/wml_pipi.sh,sha256=CuidIcbuxyXSBNQqYRhCcSC8QbBaSGnQX0KAIFaIvKA,499
28
+ mttf-1.1.6.data/scripts/wml_twineu.sh,sha256=av1JLN765oOWC5LPkv2eSWIVof26y60601tMGkuYdb8,180
29
+ mttf-1.1.6.dist-info/licenses/LICENSE,sha256=e_JtcszdGZ2ZGfjcymTGrcxFj_9XPicZOVtnsrPvruk,1070
30
+ mttf-1.1.6.dist-info/METADATA,sha256=O8Ly1k7_qsC-jBLBywSh3jwYFRTCuaRfmfd3ovnAUos,567
31
+ mttf-1.1.6.dist-info/WHEEL,sha256=wXxTzcEDnjrTwFYjLPcsW_7_XihufBwmpiBeiXNBGEA,91
32
+ mttf-1.1.6.dist-info/top_level.txt,sha256=WcqGFu9cV7iMZg09iam8eNxUvGpLSKKF2Iubf6SJVOo,3
33
+ mttf-1.1.6.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.0.0)
2
+ Generator: setuptools (80.1.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
File without changes
File without changes
File without changes