Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions vertexai/preview/tuning/_supervised_tuning.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@
#

from typing import Dict, Literal, Optional, Union
import warnings

from google.cloud.aiplatform.preview import datasets
from google.cloud.aiplatform.utils import _ipython_utils
from google.cloud.aiplatform_v1beta1.types import (
tuning_job as gca_tuning_job_types,
)
from google.cloud.aiplatform_v1beta1.types import tuning_job as gca_tuning_job_types
from vertexai import generative_models
from vertexai.preview.tuning import _tuning
from vertexai.preview.tuning._tuning import SourceModel
Expand Down Expand Up @@ -65,6 +64,11 @@ def train(
Returns:
A `TuningJob` object.
"""
warnings.warn(
"This method is deprecated. Please use the `train` method in the `vertexai.tuning` package instead.",
DeprecationWarning,
stacklevel=2,
)
if tuning_mode is None:
tuning_mode_value = None
elif tuning_mode == "FULL":
Expand Down
6 changes: 6 additions & 0 deletions vertexai/preview/tuning/_tuning.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"""Classes to support Tuning."""

from typing import Dict, List, Optional, Union
import warnings

from google.auth import credentials as auth_credentials

Expand Down Expand Up @@ -74,6 +75,11 @@ def __init__(
custom_base_model: str = "",
):
r"""Initializes SourceModel."""
warnings.warn(
"vertexai.preview.tuning.SourceModel is deprecated. Please use the `vertexai.tuning.SourceModel` instead.",
DeprecationWarning,
stacklevel=2,
)
self.base_model = base_model
self.custom_base_model = custom_base_model

Expand Down