surrogates_interface 4.3.0__tar.gz → 4.3.2__tar.gz

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.
@@ -1,17 +1,18 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: surrogates_interface
3
- Version: 4.3.0
3
+ Version: 4.3.2
4
4
  Summary: Interface for surrogate models.
5
5
  License: MIT
6
6
  Author: DTU Wind and Energy Systems
7
7
  Maintainer: Riccardo Riva
8
8
  Maintainer-email: ricriv@dtu.dk
9
- Requires-Python: >=3.10,<3.13
9
+ Requires-Python: >=3.10,<3.14
10
10
  Classifier: License :: OSI Approved :: MIT License
11
11
  Classifier: Programming Language :: Python :: 3
12
12
  Classifier: Programming Language :: Python :: 3.10
13
13
  Classifier: Programming Language :: Python :: 3.11
14
14
  Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Programming Language :: Python :: 3.13
15
16
  Provides-Extra: code-style
16
17
  Provides-Extra: docs
17
18
  Provides-Extra: om
@@ -42,7 +43,7 @@ Requires-Dist: sphinx-copybutton (>=0.5.2,<1.0.0) ; extra == "docs"
42
43
  Requires-Dist: sphinx-sitemap (>=2.6.0,<3.0.0) ; extra == "docs"
43
44
  Requires-Dist: sphinx_design (>=0.6.1,<1.0.0) ; extra == "docs"
44
45
  Requires-Dist: spyder-kernels (>=3.0.0,<3.1.0) ; extra == "spyder"
45
- Requires-Dist: tensorflow (>=2.10.0,<2.20.0) ; extra == "tf"
46
+ Requires-Dist: tensorflow (>=2.10.0,<3.0.0) ; extra == "tf"
46
47
  Requires-Dist: tensorflow-io-gcs-filesystem (==0.31.0) ; (python_version < "3.12") and (extra == "tf")
47
48
  Requires-Dist: tomli (>=2.0.0,<3.0.0) ; python_version < "3.11"
48
49
  Requires-Dist: torch (>=2.0.0,<3.0.0) ; extra == "torch"
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "surrogates_interface"
3
- version = "4.3.0"
3
+ version = "4.3.2"
4
4
  description = "Interface for surrogate models."
5
5
  authors = [
6
6
  {name = "DTU Wind and Energy Systems"}
@@ -11,7 +11,7 @@ maintainers = [
11
11
  ]
12
12
  license = { text = "MIT" }
13
13
  readme = "README.md"
14
- requires-python = ">=3.10,<3.13"
14
+ requires-python = ">=3.10,<3.14"
15
15
 
16
16
  dependencies = [
17
17
  "tomli >=2.0.0, <3.0.0; python_version<'3.11'",
@@ -52,7 +52,7 @@ spyder = [
52
52
  ]
53
53
 
54
54
  tf = [
55
- "tensorflow >=2.10.0, <2.20.0",
55
+ "tensorflow >=2.10.0, <3.0.0",
56
56
  "tensorflow-io-gcs-filesystem == 0.31.0 ; python_version<'3.12'",
57
57
  ]
58
58
 
@@ -62,8 +62,8 @@ test = [
62
62
  # "pytest-xdist >=3.6.1, <4.0.0",
63
63
  ]
64
64
 
65
- torch = ["torch >=2.0.0,<3.0.0",
66
- "keras >=3.0.0,<4.0.0",
65
+ torch = ["torch >=2.0.0, <3.0.0",
66
+ "keras >=3.0.0, <4.0.0",
67
67
  ]
68
68
 
69
69
  [project.urls]
@@ -427,13 +427,12 @@ class SurrogateModel:
427
427
  Predict the complete model output and Jacobian, including all input and output transformations.
428
428
 
429
429
  Let's recall that the predicted output is given by
430
-
430
+
431
431
  .. math::
432
432
  \hat{y} = g_1^{-1}(g_2^{-1}(g_m^{-1}(s(f_n(f_2(f_1(x)))))))
433
-
434
433
  By indicating with :math:`J_h(z)` the Jacobian of :math:`h` evaluated at :math:`z`, we obtain
435
434
  the Jacobian of the predicted output by applying the chain rule
436
-
435
+
437
436
  .. math::
438
437
  J = &J_{g_1^{-1}}(g_2^{-1}(g_m^{-1}(s(f_n(f_2(f_1(x))))))) \\
439
438
  &J_{g_2^{-1}}(g_m^{-1}(s(f_n(f_2(f_1(x)))))) \\
@@ -803,7 +802,7 @@ class TensorFlowModel(SurrogateModel):
803
802
  Output data.
804
803
  """
805
804
  # TODO: Add support also for other arguments of predict, like use_multiprocessing.
806
- y = self.model.predict(x, batch_size=x.shape[0], verbose=0)
805
+ y = self.model(x, training=False).numpy()
807
806
  return y
808
807
 
809
808
  def _predict_model_output_and_jacobian_rev(self, x):