class_docstr: Represents a NumPy dataset for use with MLflow Tracking.
class_docstr_tok: ["Represents","a","NumPy","dataset","for","use","with","MLflow","Tracking","."]
docstr: A profile of the dataset. May be ``None`` if a profile cannot be computed.
docstr_tok: ["A","profile","of","the","dataset",".","May","be","``","None","``","if","a","profile","can","not","be","computed","."]
code: def profile(self) -> Optional[Any]:
      """
      A profile of the dataset. May be ``None`` if a profile cannot be computed.
      """
  
      def get_profile_attribute(numpy_data, attr_name):
          if isinstance(numpy_data, dict):
              return {
                  key: getattr(array, attr_name)
                  for key, array in numpy_data.items()
              }
          else:
              return getattr(numpy_data, attr_name)
  
      profile = {
          "features_shape": get_profile_attribute(
              self._features, "shape"
          ),
          "features_size": get_profile_attribute(
              self._features, "size"
          ),
          "features_nbytes": get_profile_attribute(
              self._features, "nbytes"
          ),
      }
      if self._targets is not None:
          profile.update(
              {
                  "targets_shape": get_profile_attribute(
                      self._targets, "shape"
                  ),
                  "targets_size": get_profile_attribute(
                      self._targets, "size"
                  ),
                  "targets_nbytes": get_profile_attribute(
                      self._targets, "nbytes"
                  ),
              }
          )
  
      return profile
  
imports: import json
  import logging
  from functools import cached_property
  from typing import Any, Dict, Optional, Union
  import numpy
  from mlflow.data.dataset import Dataset
  from mlflow.data.dataset_source import DatasetSource
  from mlflow.data.digest_utils import compute_numpy_digest
  from mlflow.data.pyfunc_dataset_mixin import PyFuncConvertibleDatasetMixin, PyFuncInputsOutputs
  from mlflow.data.schema import TensorDatasetSchema
  from mlflow.models.evaluation.base import EvaluationDataset
  from mlflow.types.utils import _infer_schema
  from mlflow.utils.annotations import experimental
label_desc: Use image node_id 7 for calling the NumpyDataset obj's underlying member method code with example usage: obj.profile() and returns: profile, unknown, getattr