class_docstr: Base class for Amazon first-party Estimator implementations.
  
  This class isn't intended to be instantiated directly.
class_docstr_tok: ["Base","class","for","Amazon","first-party","Estimator","implementations",".","This","class","is","n't","intended","to","be","instantiated","directly","."]
docstr: Build a :class:`~RecordSet` from a numpy :class:`~ndarray` matrix and label vector.
  
  For the 2D ``ndarray`` ``train``, each row is converted to a
  :class:`~Record` object. The vector is stored in the "values" entry of
  the ``features`` property of each Record. If ``labels`` is not None,
  each corresponding label is assigned to the "values" entry of the
  ``labels`` property of each Record.
  
  The collection of ``Record`` objects are protobuf serialized and
  uploaded to new S3 locations. A manifest file is generated containing
  the list of objects created and also stored in S3.
  
  The number of S3 objects created is controlled by the
  ``instance_count`` property on this Estimator. One S3 object is
  created per training instance.
  
  Args:
      train (numpy.ndarray): A 2D numpy array of training data.
      labels (numpy.ndarray): A 1D numpy array of labels. Its length must
          be equal to the number of rows in ``train``.
      channel (str): The SageMaker TrainingJob channel this RecordSet
          should be assigned to.
      encrypt (bool): Specifies whether the objects uploaded to S3 are
          encrypted on the server side using AES-256 (default: ``False``).
  
  Returns:
      RecordSet: A RecordSet referencing the encoded, uploading training
      and label data.
code: def record_set(
      self, train, labels=None, channel="train", encrypt=False
  ):
      """Build a :class:`~RecordSet` from a numpy :class:`~ndarray` matrix and label vector.
  
      For the 2D ``ndarray`` ``train``, each row is converted to a
      :class:`~Record` object. The vector is stored in the "values" entry of
      the ``features`` property of each Record. If ``labels`` is not None,
      each corresponding label is assigned to the "values" entry of the
      ``labels`` property of each Record.
  
      The collection of ``Record`` objects are protobuf serialized and
      uploaded to new S3 locations. A manifest file is generated containing
      the list of objects created and also stored in S3.
  
      The number of S3 objects created is controlled by the
      ``instance_count`` property on this Estimator. One S3 object is
      created per training instance.
  
      Args:
          train (numpy.ndarray): A 2D numpy array of training data.
          labels (numpy.ndarray): A 1D numpy array of labels. Its length must
              be equal to the number of rows in ``train``.
          channel (str): The SageMaker TrainingJob channel this RecordSet
              should be assigned to.
          encrypt (bool): Specifies whether the objects uploaded to S3 are
              encrypted on the server side using AES-256 (default: ``False``).
  
      Returns:
          RecordSet: A RecordSet referencing the encoded, uploading training
          and label data.
      """
      s3 = self.sagemaker_session.boto_session.resource(
          "s3", region_name=self.sagemaker_session.boto_region_name
      )
      parsed_s3_url = urlparse(self.data_location)
      bucket, key_prefix = parsed_s3_url.netloc, parsed_s3_url.path
      key_prefix = key_prefix + "{}-{}/".format(
          type(self).__name__, sagemaker_timestamp()
      )
      key_prefix = key_prefix.lstrip("/")
      logger.debug(
          "Uploading to bucket %s and key_prefix %s", bucket, key_prefix
      )
      manifest_s3_file = upload_numpy_to_s3_shards(
          self.instance_count,
          s3,
          bucket,
          key_prefix,
          train,
          labels,
          encrypt,
      )
      logger.debug("Created manifest file %s", manifest_s3_file)
      return RecordSet(
          manifest_s3_file,
          num_records=train.shape[0],
          feature_dim=train.shape[1],
          channel=channel,
      )
  
imports: from __future__ import absolute_import
  import json
  import logging
  import tempfile
  from typing import Union, Optional, Dict
  from six.moves.urllib.parse import urlparse
  from sagemaker import image_uris, s3_utils
  from sagemaker.amazon import validation
  from sagemaker.amazon.hyperparameter import Hyperparameter
  from sagemaker.amazon.common import write_numpy_to_dense_tensor
  from sagemaker.deprecations import renamed_warning
  from sagemaker.estimator import EstimatorBase, _TrainingJob
  from sagemaker.inputs import FileSystemInput, TrainingInput
  from sagemaker.utils import sagemaker_timestamp, check_and_get_run_experiment_config
  from sagemaker.workflow.entities import PipelineVariable
  from sagemaker.workflow.pipeline_context import runnable_by_pipeline
  from sagemaker.workflow import is_pipeline_variable
label_desc: Use image node_id 10 for calling the AmazonAlgorithmEstimatorBase obj's underlying member method code with example usage: obj.record_set(train, labels, channel, encrypt) and returns: RecordSet