[DOC]: DOE_ML: Update the keras model definition to match the supported API
Maintainers usually reply within 1 day
A pull request for this has already been merged.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- python, tensorflow
- Domain
- documentation, machine-learning
Research direction
The failing line is in the DOE_ML example script, DOE_ML_Mixing_Elbow.py, which the docs page DOE_ML renders; the traceback places ModelType: TypeAlias = keras.models.Model[...] near line 377. Replace the subscripted alias with keras.Model and change keras.models.Sequential( to keras.Sequential(, then run the example against TensorFlow 2.21 to confirm it no longer raises TypeError. Done means the example runs without that error and the docs page still builds.
Written by the indexing model from the issue text.
Description
🔗 Affected page or URL
https://fluent.docs.pyansys.com/version/stable/examples/00-fluent/DOE_ML.html
⚠️ What is wrong or missing?
APIS for keras are outdated
TensorFlow version is: 2.21.0
Traceback (most recent call last):
File "C:\Users\jdovalro\AppData\Local\Temp\flute_jdovalro\261009173539_SNPS-9pEDENLtzs\pyfluent\examples\DOE_ML_Mixing_Elbow.XoXISg\DOE_ML_Mixing_Elbow.py", line 377, in <module>
ModelType: TypeAlias = keras.models.Model[
~~~~~~~~~~~~~~~~~~^
npt.NDArray[np.float64], npt.NDArray[np.float64]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
]
^
TypeError: type 'Model' is not subscriptable
✏️ Suggested improvement
Chenge this:
ModelType: TypeAlias = keras.models.Model[
npt.NDArray[np.float64], npt.NDArray[np.float64]
]
to:
ModelType: TypeAlias = keras.Model
and:
keras.models.Sequential(
to:
keras.Sequential(
📌 Additional context
No response
- Dominant language
- Python
- Stars
- 550
- Forks
- 86
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 58
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ansys/pyfluent
-
documentation
Difficulty 1/5 Under an hour Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
ansys/pyfluent#5515 · 2 reactions ·
Maintainers usually reply within 1 day
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
[DOC]: Lunar Lander Outdated APIPossibly taken A pull request linked to this issue is open or already merged. Opendocumentation
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
documentation
Difficulty 2/5 1-2 days Newbie friendliness 68/100
Maintainers usually reply within 1 day
Similar issues
-
`gitlab_importer_v2` pipeline failing due to malformed YAML filePossibly taken @Gowri213 claimed this today. Openbug Pipeline: Failure Priority: high
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
aboutcode-org/vulnerablecode#2523 · 1 comment ·
Maintainers usually reply within 5 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
intuitem/ciso-assistant-community#5380 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
confluentinc/cp-ansible#2767 ·
Maintainers usually reply within 3 days
-
bug docs
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Maintainers usually reply within 2 days