Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Support translation of local functions#60

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
sdpython merged 7 commits intomainfromgr2
Jan 8, 2024
Merged
Show file tree
Hide file tree
Changes from1 commit
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
PrevPrevious commit
NextNext commit
verbose
  • Loading branch information
@xadupre
xadupre committedJan 8, 2024
commite531c13f1763c47ec2d58dfebeaddb53fa2d20b6
7 changes: 5 additions & 2 deletions_unittests/ut_light_api/test_backend_export.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
import sys
import unittest
from typing import Any, Dict, List, Optional
from difflib import unified_diff
Expand DownExpand Up@@ -25,6 +26,8 @@
from onnx_array_api.light_api import translate
from onnx_array_api.plotting.text_plot import onnx_simple_text_plot

verbosity = 10 if "-v" in sys.argv or "--verbose" in sys.argv else 0


class ReferenceImplementationError(RuntimeError):
"Fails, export cannot be compared."
Expand All@@ -36,7 +39,7 @@ class ExportWrapper:

def __init__(self, model):
self.model = model
self.expected_sess = ExtendedReferenceEvaluator(self.model)
self.expected_sess = ExtendedReferenceEvaluator(self.model, verbose=verbosity)

@property
def input_names(self):
Expand DownExpand Up@@ -109,7 +112,7 @@ def run(
f"Unable to executed code for api {api!r}\n{new_code}"
) from e
export_model = locs["model"]
ref = ExtendedReferenceEvaluator(export_model)
ref = ExtendedReferenceEvaluator(export_model, verbose=verbosity)
try:
got = ref.run(names, feeds)
except (TypeError, AttributeError) as e:
Expand Down
22 changes: 9 additions & 13 deletionsonnx_array_api/light_api/make_helper.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -34,19 +34,15 @@ def make_node_extended(
"""
Constructs a NodeProto.

Args:
op_type: The name of the operator to construct
inputs: list of input names
outputs: list of output names
name: optional unique identifier for NodeProto
doc_string: optional documentation string for NodeProto
domain: optional domain for NodeProto.
If it's None, we will just use default domain (which is empty)
**kwargs (dict): the attributes of the node. The acceptable values
are documented in :func:`make_attribute`.

Returns:
NodeProto
:param op_type: The name of the operator to construct
:param inputs: list of input names
:param outputs: list of output names
:param name: optional unique identifier for NodeProto
:param doc_string: optional documentation string for NodeProto
:param domain: optional domain for NodeProto.
If it's None, we will just use default domain (which is empty)
:param kwargs: the attributes of the node.
:return: node proto
"""
node = NodeProto()
node.op_type = op_type
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp