Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CHANGELOG.rst #112

Merged
merged 4 commits into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@
Change log
==========

0.9.2 (2023-10-20)
------------------

**Other changes**

- Fix a deprecation warning from one of Spox's dependencies.

0.9.1 (2023-10-05)
------------------

Expand All @@ -19,7 +26,7 @@ Change log
0.9.0 (2023-06-12)
------------------

**New features**
**New feature**

- The opset ``ai.onnx@19`` (ONNX 1.14) is now shipped with Spox.

Expand All @@ -36,7 +43,7 @@ Change log
0.8.1 (2023-05-xx)
------------------

**Bug fixes**
**Bug fixe**

- An explicit error is now raised when local subgraph arguments are leaked to an outer scope. This may happen when the subgraph callback uses side effects saving local variables, which would produce later a confusing error message.

Expand Down
10 changes: 4 additions & 6 deletions src/spox/_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,15 +150,13 @@ def __repr__(self):

def __post_init__(self):
if any(not isinstance(var, Var) for var in self._results.values()):
raise TypeError(
f"Graph results must be Vars, not {set(type(obj) for obj in self._results.values()) - {Var}}."
)
seen_types = {type(obj) for obj in self._results.values()}
raise TypeError(f"Graph results must be Vars, not {seen_types - {Var}}.")
if self._arguments is not None and any(
not isinstance(var, Var) for var in self._arguments
):
raise TypeError(
f"Graph results must be Vars, not {set(type(obj) for obj in self._arguments) - {Var}}."
)
seen_types = {type(obj) for obj in self._arguments}
raise TypeError(f"Build outputs must be Vars, not {seen_types - {Var}}.")

def with_name(self, name: str) -> "Graph":
"""Return a Graph with its name set to ``name``."""
Expand Down
10 changes: 4 additions & 6 deletions src/spox/_public.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,11 @@ def build(inputs: Dict[str, Var], outputs: Dict[str, Var]) -> onnx.ModelProto:
>>> model = build({'a': a, 'b': b, 'c': c}, {'r': q})
"""
if not all(isinstance(var, Var) for var in inputs.values()):
raise TypeError(
f"Build inputs must be Vars, not {set(type(obj) for obj in inputs.values()) - {Var} }."
)
seen_types = {type(obj) for obj in inputs.values()}
raise TypeError(f"Build inputs must be Vars, not {seen_types - {Var}}.")
if not all(isinstance(var, Var) for var in outputs.values()):
raise TypeError(
f"Build outputs must be Vars, not {set(type(obj) for obj in outputs.values()) - {Var} }."
)
seen_types = {type(obj) for obj in outputs.values()}
raise TypeError(f"Build outputs must be Vars, not {seen_types - {Var}}.")
if not all(isinstance(var._op, Argument) for var in inputs.values()):
raise TypeError(
"Build inputs must be `Var`s constructed using the `spox.argument` function. "
Expand Down
Loading