From 2e809ff5826be97c03481b900fea191dca6b17ba Mon Sep 17 00:00:00 2001 From: Mikhail Golubev Date: Tue, 21 Mar 2023 18:33:04 +0200 Subject: [PATCH] PY-53599 Add the post 2.6.0 Tensorflow module layout In 2.6.0, keras became a standalone package re-exported in tensorflow. GitOrigin-RevId: afbaea8bde1ddb078b15579eecf9fd2f1aef225e --- .../src/com/jetbrains/tensorFlow/PyTensorFlow.kt | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/python/python-psi-impl/src/com/jetbrains/tensorFlow/PyTensorFlow.kt b/python/python-psi-impl/src/com/jetbrains/tensorFlow/PyTensorFlow.kt index 1bc1372d8b1e..2449434fc272 100644 --- a/python/python-psi-impl/src/com/jetbrains/tensorFlow/PyTensorFlow.kt +++ b/python/python-psi-impl/src/com/jetbrains/tensorFlow/PyTensorFlow.kt @@ -15,7 +15,17 @@ import com.jetbrains.python.psi.resolve.PyQualifiedNameResolveContext import com.jetbrains.python.psi.resolve.resolveQualifiedName private val LAYOUT_PER_VERSION: List>> = listOf( - VersionRange("2.0.0a0", null) to mapOf( + VersionRange("2.6.0", null) to mapOf( + "keras" to "keras.api._v2.keras", + "estimator" to "tensorflow_estimator.python.estimator.api._v2.estimator", + "initializers" to "keras.api._v2.keras.initializers", + "losses" to "keras.api._v2.keras.losses", + "metrics" to "keras.api._v2.keras.metrics", + "optimizers" to "keras.api._v2.keras.optimizers", + "summary" to "tensorboard.summary._tf.summary", + "*" to "tensorflow._api.v2", + ), + VersionRange("2.0.0a0", "2.6.0") to mapOf( "compiler" to "tensorflow_core.compiler", "core" to "tensorflow_core.core", "tools" to "tensorflow_core.tools",