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
12 changes: 9 additions & 3 deletions google/cloud/bigquery_v2/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from .encryption_config import EncryptionConfiguration
from .encryption_config import (
EncryptionConfiguration,
)
from .model import (
DeleteModelRequest,
GetModelRequest,
Expand All @@ -22,14 +24,18 @@
Model,
PatchModelRequest,
)
from .model_reference import ModelReference
from .model_reference import (
ModelReference,
)
from .standard_sql import (
StandardSqlDataType,
StandardSqlField,
StandardSqlStructType,
StandardSqlTableType,
)
from .table_reference import TableReference
from .table_reference import (
TableReference,
)

__all__ = (
"EncryptionConfiguration",
Expand Down
4 changes: 2 additions & 2 deletions google/cloud/bigquery_v2/types/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class Model(proto.Message):
model.
friendly_name (str):
Optional. A descriptive name for this model.
labels (Sequence[google.cloud.bigquery_v2.types.Model.LabelsEntry]):
labels (Mapping[str, str]):
The labels associated with this model. You
can use these to organize and group your models.
Label keys and values can be no longer than 63
Expand Down Expand Up @@ -1200,7 +1200,7 @@ class TrainingOptions(proto.Message):
initial_learn_rate (float):
Specifies the initial learning rate for the
line search learn rate strategy.
label_class_weights (Sequence[google.cloud.bigquery_v2.types.Model.TrainingRun.TrainingOptions.LabelClassWeightsEntry]):
label_class_weights (Mapping[str, float]):
Weights associated with each label class, for
rebalancing the training data. Only applicable
for classification models.
Expand Down
19 changes: 19 additions & 0 deletions owlbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,25 @@
from synthtool import gcp
from synthtool.languages import python

default_version = "v2"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm pretty sure this was added back by accident. The bigquery_v2 modules are legacy and only for some backwards compatibility use cases.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Originally removed in in 76d88fb


for library in s.get_staging_dirs(default_version):
# Avoid breaking change due to change in field renames.
# https://github.com/googleapis/python-bigquery/issues/319
s.replace(
library / f"google/cloud/bigquery_{library.name}/types/standard_sql.py",
r"type_ ",
"type ",
)
# Patch docs issue
s.replace(
library / f"google/cloud/bigquery_{library.name}/types/model.py",
r"""\"predicted_\"""",
"""`predicted_`""",
)
s.move(library / f"google/cloud/bigquery_{library.name}/types")
s.remove_staging_dirs()

common = gcp.CommonTemplates()

# ----------------------------------------------------------------------------
Expand Down