|
13 | 13 | # limitations under the License.
|
14 | 14 | from __future__ import absolute_import
|
15 | 15 |
|
16 |
| -from google.cloud.aiplatform.v1beta1.schema.trainingjob import definition |
| 16 | +from google.cloud.aiplatform.v1.schema.trainingjob import definition |
| 17 | +from google.cloud.aiplatform.v1beta1.schema.trainingjob import ( |
| 18 | +definition as definition_v1beta1, |
| 19 | +) |
17 | 20 |
|
18 | 21 | ModelType = definition.AutoMlImageClassificationInputs().ModelType
|
19 | 22 | test_training_input = definition.AutoMlImageClassificationInputs(
|
|
23 | 26 | disable_early_stopping=False,
|
24 | 27 | )
|
25 | 28 |
|
| 29 | +ModelType_v1beta1 = definition_v1beta1.AutoMlImageClassificationInputs().ModelType |
| 30 | +test_training_input_v1beta1 = definition.AutoMlImageClassificationInputs( |
| 31 | +multi_label=True, |
| 32 | +model_type=ModelType_v1beta1.CLOUD, |
| 33 | +budget_milli_node_hours=8000, |
| 34 | +disable_early_stopping=False, |
| 35 | +) |
| 36 | + |
26 | 37 |
|
27 |
| -def test_exposes_to_value_method(): |
| 38 | +# Test the v1 enhanced types. |
| 39 | +def test_exposes_to_value_method_v1(): |
28 | 40 | assert hasattr(test_training_input, "to_value")
|
29 | 41 |
|
30 | 42 |
|
31 |
| -def test_exposes_from_value_method(): |
| 43 | +def test_exposes_from_value_method_v1(): |
32 | 44 | assert hasattr(test_training_input, "from_value")
|
33 | 45 |
|
34 | 46 |
|
35 |
| -def test_exposes_from_map_method(): |
| 47 | +def test_exposes_from_map_method_v1(): |
36 | 48 | assert hasattr(test_training_input, "from_map")
|
| 49 | + |
| 50 | + |
| 51 | +# Test the v1beta1 enhanced types. |
| 52 | +def test_exposes_to_value_method_v1beta1(): |
| 53 | +assert hasattr(test_training_input_v1beta1, "to_value") |
| 54 | + |
| 55 | + |
| 56 | +def test_exposes_from_value_method_v1beta1(): |
| 57 | +assert hasattr(test_training_input_v1beta1, "from_value") |
| 58 | + |
| 59 | + |
| 60 | +def test_exposes_from_map_method_v1beta1(): |
| 61 | +assert hasattr(test_training_input_v1beta1, "from_map") |
0 commit comments