Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 20 for create_tempdir (0.5 sec)

  1. tensorflow/compiler/mlir/quantization/tensorflow/python/pywrap_quantize_model_test.py

      """Test cases for quantize_model python wrappers."""
    
      def test_quantize_model_fails_when_invalid_quant_options_serialization(self):
        src_saved_model_path = self.create_tempdir().full_path
        dst_saved_model_path = self.create_tempdir().full_path
        signature_def_keys = ['serving_default']
        quant_opts_serialized = 'invalid proto serialization string'.encode('utf-8')
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Jan 05 02:09:24 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/common/python/testing_test.py

    
    class FileSizeTestCase(test.TestCase):
    
      def setUp(self):
        super().setUp()
    
        self.path_a = self.create_tempdir('dir_a').full_path
        self.create_tempfile(file_path='dir_a/w.txt', content='abcd')
    
        self.path_b = self.create_tempdir('dir_b').full_path
        self.create_tempfile(file_path='dir_b/x.txt', content='1234')
        self.create_tempfile(file_path='dir_b/y.txt', content='56')
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Mar 21 08:51:46 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/quantization/stablehlo/python/integration_test/quantize_model_test_base.py

        self._input_saved_model_path = self.create_tempdir('input').full_path
        self._output_saved_model_path = self.create_tempdir('output').full_path
        # Extra output path occasionally used for comparing two different
        # quantized models.
        self._output_saved_model_path_2 = self.create_tempdir('output2').full_path
    
      def _extract_first_xla_call_module_op(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 14 06:31:57 UTC 2024
    - 18.2K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/tensorflow/python/integration_test/quantize_model_test_base.py

        self._input_saved_model_path = self.create_tempdir('input').full_path
        self._output_saved_model_path = self.create_tempdir('output').full_path
        # Extra output path occasionally used for comparing two different
        # quantized models.
        self._output_saved_model_path_2 = self.create_tempdir('output2').full_path
    
      def _get_dir_size(self, path: str = '.'):
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Mar 21 08:51:46 UTC 2024
    - 51.2K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/stablehlo/python/integration_test/quantize_model_test.py

        path_map = {'serving_default': dataset_path}
        repr_dataset.TfRecordRepresentativeDatasetSaver(path_map).save(
            {'serving_default': data_gen()}
        )
    
        calibration_data_dir = self.create_tempdir('calibration_data').full_path
        config = qc.QuantizationConfig(
            static_range_ptq_preset=qc.StaticRangePtqPreset(
                representative_datasets=[
                    qc.RepresentativeDatasetConfig(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 14 06:31:57 UTC 2024
    - 51.4K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/tensorflow/python/integration_test/quantize_model_test.py

      ):
        input_type = dtypes.int64
        model = self._create_gather_model(input_type, use_variable)
        input_saved_model_path = self.create_tempdir('input').full_path
        saved_model_save.save(model, input_saved_model_path)
    
        tags = {tag_constants.SERVING}
        output_directory = self.create_tempdir().full_path
    
        quantization_options = quant_opts_pb2.QuantizationOptions(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 03:36:50 UTC 2024
    - 235.6K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/quantization/stablehlo/quantization_test.cc

    #include "tsl/platform/status_matchers.h"
    
    namespace tensorflow {
    namespace {
    
    using ::stablehlo::quantization::QuantizationConfig;
    using ::stablehlo::quantization::io::CreateTmpDir;
    using ::testing::HasSubstr;
    using ::tsl::testing::IsOk;
    using ::tsl::testing::StatusIs;
    
    // Test cases for `RunQuantization` mainly tests for error cases because testing
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Mar 11 19:29:56 UTC 2024
    - 3.1K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/quantization/stablehlo/cc/io_test.cc

      absl::StatusOr<std::string> tmp_dir = CreateTmpDir();
    
      ASSERT_THAT(tmp_dir, IsOk());
    
      auto* const env = tsl::Env::Default();
      EXPECT_THAT(env->FileExists(*tmp_dir), IsOk());
    }
    
    TEST(IoTest, CreateTmpDirWhenInvalidPathReturnsInternalError) {
      TestEnvBrokenFileSystem test_env{};
      absl::StatusOr<std::string> tmp_dir = CreateTmpDir(&test_env);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Apr 24 03:28:15 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/stablehlo/cc/io.cc

    }
    
    absl::StatusOr<std::string> CreateTmpDir(tsl::Env* const env) {
      TF_ASSIGN_OR_RETURN(std::string tmp_dir, GetLocalTmpFileName(env));
    
      if (!env->RecursivelyCreateDir(tmp_dir).ok()) {
        return absl::InternalError(
            absl::StrFormat("Failed to create tmp dir: '%s'", tmp_dir));
      }
    
      return tmp_dir;
    }
    
    absl::StatusOr<std::string> CreateTmpDir() {
      // The overloaded function uses the default env.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Apr 24 03:28:15 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/io/IoTestCase.java

          }
        }
    
        if (testDir == null) {
          // testdata resources aren't file:// urls, so create a directory to store them in and then
          // copy the resources to the filesystem as needed
          testDir = createTempDir();
        }
    
        return testDir;
      }
    
      /** Returns the file with the given name under the testdata directory. */
      protected final @Nullable File getTestFile(String name) throws IOException {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Fri May 31 12:36:13 UTC 2024
    - 5.6K bytes
    - Viewed (0)
Back to top