# Path: tensorflow_decision_forests/tensorflow/ops/inference/op.py



import abc
import collections
import os
import uuid
import six
import tensorflow as tf
from typing import Text, Dict, List, Any, Optional
from absl import logging
from tensorflow.python.eager import context
from tensorflow.python.framework import ops
from tensorflow.python.training.tracking import base as trackable_base
from tensorflow.python.training.tracking import tracking
from tensorflow_decision_forests.tensorflow.ops.inference import op
from yggdrasil_decision_forests.dataset import data_spec_pb2
from yggdrasil_decision_forests.model import abstract_model_pb2
               verbose: Optional[bool] = True):
    """Initialize the model.

    The Yggdrasil model should be available at the "model_path" location both at
    the "Model" object creation, and during the call to "init_op()".

    Args:
      model_path: Path to the Yggdrasil model.
      tensor_model_path: Path of the model at execution time. If no provided,
        will use "model_path" instead. This argument can be use to load model
        from SavedModel assets.
      verbose: If true, prints information about the model and its integration
        in tensorflow.
    """

    self._verbose: Optional[bool] = verbose

    if self._verbose:
      logging.info("Create inference model for %s", model_path)

    # Identifier of the model tf resource. Allow a same model to be applied on
    # separate inputs tensors.
    self.model_identifier = _create_model_identifier()

    self.input_builder = _InferenceArgsBuilder(verbose)
    self.input_builder.build_from_model_path(model_path)

    # Model loading and initialization op.
    if tensor_model_path is None:
      tensor_model_path = model_path

# Path: tensorflow_decision_forests/tensorflow/ops/inference/op.py



# Path: tensorflow_decision_forests/tensorflow/ops/inference/api.py
import abc
import collections
import os
import uuid
import six
import tensorflow as tf
from typing import Text, Dict, List, Any, Optional
from absl import logging
from tensorflow.python.eager import context
from tensorflow.python.framework import ops
from tensorflow.python.training.tracking import base as trackable_base
from tensorflow.python.training.tracking import tracking
from tensorflow_decision_forests.tensorflow.ops.inference import op
from yggdrasil_decision_forests.dataset import data_spec_pb2
from yggdrasil_decision_forests.model import abstract_model_pb2

               verbose: Optional[bool] = True):
    """Initialize the model.

    The Yggdrasil model should be available at the "model_path" location both at
    the "Model" object creation, and during the call to "init_op()".

    Args:
      model_path: Path to the Yggdrasil model.
      tensor_model_path: Path of the model at execution time. If no provided,
        will use "model_path" instead. This argument can be use to load model
        from SavedModel assets.
      verbose: If true, prints information about the model and its integration
        in tensorflow.
    """

    self._verbose: Optional[bool] = verbose

    if self._verbose:
      logging.info("Create inference model for %s", model_path)

    # Identifier of the model tf resource. Allow a same model to be applied on
    # separate inputs tensors.
    self.model_identifier = _create_model_identifier()

    self.input_builder = _InferenceArgsBuilder(verbose)
    self.input_builder.build_from_model_path(model_path)

    # Model loading and initialization op.
    if tensor_model_path is None:
      tensor_model_path = model_path

    load_model_op = op.SimpleMLLoadModelFromPath(