@@ -36,7 +36,10 @@ python.Execution = class {
3636 this.set(key, value);
3737 }
3838 __getitem__(key) {
39- return this.get(key);
39+ if (!super.has(key)) {
40+ throw new python.Error(`KeyError: ${key}`);
41+ }
42+ return super.get(key);
4043 }
4144 __delitem__(key) {
4245 this.delete(key);
@@ -19811,13 +19814,13 @@ python.Execution = class {
1981119814 }
1981219815 deserialize_graph_output(output) {
1981319816 if (output.type === 'as_tensor') {
19814- return this.serialized_name_to_node.get (output.as_tensor.name);
19817+ return this.serialized_name_to_node.__getitem__ (output.as_tensor.name);
1981519818 } else if (output.type === 'as_sym_int') {
19816- return this.serialized_name_to_node.get (output.as_sym_int.as_name);
19819+ return this.serialized_name_to_node.__getitem__ (output.as_sym_int.as_name);
1981719820 } else if (output.type === 'as_sym_bool') {
19818- return this.serialized_name_to_node.get (output.as_sym_bool.as_name);
19821+ return this.serialized_name_to_node.__getitem__ (output.as_sym_bool.as_name);
1981919822 } else if (output.type === 'as_sym_float') {
19820- return this.serialized_name_to_node.get (output.as_sym_float.as_name);
19823+ return this.serialized_name_to_node.__getitem__ (output.as_sym_float.as_name);
1982119824 } else if (output.type === 'as_int') {
1982219825 return output.as_int;
1982319826 } else if (output.type === 'as_float') {
@@ -20201,7 +20204,13 @@ python.Execution = class {
2020120204 return result;
2020220205 } else if (typ_ === 'as_ints' || typ_ === 'as_floats' || typ_ === 'as_bools' || typ_ === 'as_strings') {
2020320206 return Array.from(value);
20204- } else if (typ_ === 'as_sym_ints' || typ_ === 'as_sym_bools') {
20207+ } else if (typ_ === 'as_int_lists') {
20208+ return value.map((dims) => Array.from(dims));
20209+ } else if (typ_ === 'as_float_lists') {
20210+ return value.map((floats) => Array.from(floats));
20211+ } else if (typ_ === 'as_nested_tensors') {
20212+ return value.map((inner_list) => inner_list.map((arg) => this.serialized_name_to_node.get(arg.name)));
20213+ } else if (typ_ === 'as_sym_ints' || typ_ === 'as_sym_bools' || typ_ === 'as_sym_floats') {
2020520214 return value.map((arg) => this.deserialize_sym_argument(arg));
2020620215 } else if (typ_ === 'as_optional_tensors') {
2020720216 const deserialize_optional_tensor_args = (a) => {
0 commit comments