Construct the OperatorInstance and handle the processing of all inputs and arguments. Parameters ---------- inputs : tuple of DataNode Positional inputs to operator instance. arg_inputs : dict of DataNode Argument inputs - named DataNode input
(self, inputs, arg_inputs, arguments, _processed_arguments, op)
| 360 | """ |
| 361 | |
| 362 | def __init__(self, inputs, arg_inputs, arguments, _processed_arguments, op): |
| 363 | """Construct the OperatorInstance and handle the processing of all inputs and arguments. |
| 364 | |
| 365 | Parameters |
| 366 | ---------- |
| 367 | inputs : tuple of DataNode |
| 368 | Positional inputs to operator instance. |
| 369 | arg_inputs : dict of DataNode |
| 370 | Argument inputs - named DataNode inputs to operator. |
| 371 | arguments : dict of scalar values |
| 372 | Scalar arguments to be added to OpSpec. |
| 373 | _processed_arguments : dict of scalar values |
| 374 | Remaining scalar arguments. Available here for completeness, for historical reasons |
| 375 | already validated in Operator.__init__. |
| 376 | NOTE: they are already added to the `op.spec`! |
| 377 | op : Operator class. |
| 378 | Operator class containing the schema, and spec filled with `processed_arguments`. |
| 379 | """ |
| 380 | |
| 381 | if _Pipeline.current(): |
| 382 | self._pipeline = weakref.ref(_Pipeline.current()) |
| 383 | else: |
| 384 | self._pipeline = None |
| 385 | self._id = None |
| 386 | self._outputs = [] |
| 387 | self._op = op |
| 388 | self._spec = op.spec.copy() |
| 389 | self._relation_id = None |
| 390 | |
| 391 | if _conditionals.conditionals_enabled(): |
| 392 | inputs, arg_inputs = _conditionals.apply_conditional_split_to_args(inputs, arg_inputs) |
| 393 | _conditionals.inject_implicit_scope_argument(op._schema, arg_inputs) |
| 394 | |
| 395 | self._process_instance_name(arguments) |
| 396 | self._process_trace(arguments) |
| 397 | self._spec.AddArg("preserve_name", not self._autoname) |
| 398 | _process_arguments(op._schema, self._spec, arguments, op._operator_name()) |
| 399 | |
| 400 | self._inputs = _process_inputs(op._schema, self._spec, inputs, op._operator_name()) |
| 401 | self._inputs += _process_argument_inputs( |
| 402 | op._schema, self._spec, arg_inputs, op._operator_name() |
| 403 | ) |
| 404 | |
| 405 | _handle_op_deprecation( |
| 406 | self._op.schema, _processed_arguments["_module"], _processed_arguments["_display_name"] |
| 407 | ) |
| 408 | |
| 409 | self._generate_outputs() |
| 410 | |
| 411 | if _conditionals.conditionals_enabled(): |
| 412 | _conditionals.register_data_nodes(self.outputs, inputs, arg_inputs) |
| 413 | |
| 414 | def check_args(self): |
| 415 | self._op.schema.CheckArgs(self._spec) |
nothing calls this directly
no test coverage detected