d0eb4a21ff3a746c8431fdd74104b48bd2d17e54,src/sagemaker/tensorflow/estimator.py,TensorFlow,_validate_args,#TensorFlow#Any#Any#,160

Before Change


            )
            raise AttributeError(msg)

        if (not self._script_mode_enabled) and self._only_script_mode_supported():
            logger.warning(
                "Legacy mode is deprecated in versions 1.13 and higher. Using script mode instead."
            )
            self._script_mode_enabled = True

        if self._only_legacy_mode_supported():
            // TODO: add link to docs to explain how to use legacy mode with v2
            logger.warning(
                "TF %s supports only legacy mode. If you were using any legacy mode parameters "

After Change


            )
            raise AttributeError(msg)

        if self._only_legacy_mode_supported() and self.image_name is None:
            legacy_image_uri = fw.create_image_uri(
                self.sagemaker_session.boto_region_name,
                "tensorflow",
                self.train_instance_type,
                self.framework_version,
                self.py_version,
            )

            // TODO: add link to docs to explain how to use legacy mode with v2
            msg = (
                "TF {} supports only legacy mode. Please supply the image URI directly with "
                ""image_name={}" and set "model_dir=False". If you are using any legacy parameters "
                "(training_steps, evaluation_steps, checkpoint_path, requirements_file), "
                "make sure to pass them directly as hyperparameters instead."
            ).format(self.framework_version, legacy_image_uri)

            raise ValueError(msg)

    def _only_legacy_mode_supported(self):
        Placeholder docstring
        return version.Version(self.framework_version) <= self._HIGHEST_LEGACY_MODE_ONLY_VERSION
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: aws/sagemaker-python-sdk
Commit Name: d0eb4a21ff3a746c8431fdd74104b48bd2d17e54
Time: 2020-06-02
Author: 6631887+laurenyu@users.noreply.github.com
File Name: src/sagemaker/tensorflow/estimator.py
Class Name: TensorFlow
Method Name: _validate_args


Project Name: home-assistant/home-assistant
Commit Name: ab8c127a4a466f2c137239c0eb06c8143adea106
Time: 2018-11-18
Author: JeffLIrion@users.noreply.github.com
File Name: homeassistant/components/media_player/firetv.py
Class Name:
Method Name: setup_platform


Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: 53cea5c21ef3bb1c1a4f04d86cb99b6ad7b304c0
Time: 2016-04-20
Author: skschneider@users.noreply.github.com
File Name: perfkitbenchmarker/providers/azure/util.py
Class Name:
Method Name: _CheckAzureVersion