|
16 | 16 | import unittest
|
17 | 17 |
|
18 | 18 | import tensorflow as tf
|
19 |
| -from tfx.examples.ranking import ranking_pipeline |
20 |
| -from tfx.orchestration import metadata |
21 |
| -from tfx.orchestration.beam.beam_dag_runner import BeamDagRunner |
| 19 | +# from tfx.orchestration import metadata |
| 20 | +# from tfx.orchestration.beam.beam_dag_runner import BeamDagRunner |
| 21 | + |
| 22 | +# This is due to TF Ranking not supporting TensorFlow 2.16, We should re-enable it when support is added. |
| 23 | +# from tfx.examples.ranking import ranking_pipeline |
| 24 | + |
22 | 25 |
|
23 | 26 | try:
|
24 | 27 | import struct2tensor # pylint: disable=g-import-not-at-top
|
@@ -62,23 +65,23 @@ def assertExecutedOnce(self, component) -> None:
|
62 | 65 | execution = tf.io.gfile.listdir(os.path.join(component_path, output))
|
63 | 66 | self.assertEqual(1, len(execution))
|
64 | 67 |
|
65 |
| - def testPipeline(self): |
66 |
| - BeamDagRunner().run( |
67 |
| - ranking_pipeline._create_pipeline( |
68 |
| - pipeline_name=self._pipeline_name, |
69 |
| - pipeline_root=self._tfx_root, |
70 |
| - data_root=self._data_root, |
71 |
| - module_file=self._module_file, |
72 |
| - serving_model_dir=self._serving_model_dir, |
73 |
| - metadata_path=self._metadata_path, |
74 |
| - beam_pipeline_args=['--direct_num_workers=1'])) |
75 |
| - self.assertTrue(tf.io.gfile.exists(self._serving_model_dir)) |
76 |
| - self.assertTrue(tf.io.gfile.exists(self._metadata_path)) |
| 68 | + #def testPipeline(self): |
| 69 | + # BeamDagRunner().run( |
| 70 | + # ranking_pipeline._create_pipeline( |
| 71 | + # pipeline_name=self._pipeline_name, |
| 72 | + # pipeline_root=self._tfx_root, |
| 73 | + # data_root=self._data_root, |
| 74 | + # module_file=self._module_file, |
| 75 | + # serving_model_dir=self._serving_model_dir, |
| 76 | + # metadata_path=self._metadata_path, |
| 77 | + # beam_pipeline_args=['--direct_num_workers=1'])) |
| 78 | + # self.assertTrue(tf.io.gfile.exists(self._serving_model_dir)) |
| 79 | + # self.assertTrue(tf.io.gfile.exists(self._metadata_path)) |
77 | 80 |
|
78 |
| - metadata_config = metadata.sqlite_metadata_connection_config( |
79 |
| - self._metadata_path) |
80 |
| - with metadata.Metadata(metadata_config) as m: |
81 |
| - artifact_count = len(m.store.get_artifacts()) |
82 |
| - execution_count = len(m.store.get_executions()) |
83 |
| - self.assertGreaterEqual(artifact_count, execution_count) |
84 |
| - self.assertEqual(9, execution_count) |
| 81 | + # metadata_config = metadata.sqlite_metadata_connection_config( |
| 82 | + # self._metadata_path) |
| 83 | + # with metadata.Metadata(metadata_config) as m: |
| 84 | + # artifact_count = len(m.store.get_artifacts()) |
| 85 | + # execution_count = len(m.store.get_executions()) |
| 86 | + # self.assertGreaterEqual(artifact_count, execution_count) |
| 87 | + # self.assertEqual(9, execution_count) |
0 commit comments