Skip to content

Commit bfc4fdf

Browse files
committed
fix lint errors
1 parent 8b08869 commit bfc4fdf

File tree

5 files changed

+15
-6
lines changed

5 files changed

+15
-6
lines changed

bigframes/bigquery/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
import sys
2020

21-
from bigframes.bigquery import ai
21+
from bigframes.bigquery import ai, ml
2222
from bigframes.bigquery._operations.approx_agg import approx_top_count
2323
from bigframes.bigquery._operations.array import (
2424
array_agg,
@@ -157,4 +157,5 @@
157157
"struct",
158158
# Modules / SQL namespaces
159159
"ai",
160+
"ml",
160161
]

bigframes/bigquery/_operations/ml.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
from __future__ import annotations
1616

17-
import typing
1817
from typing import Mapping, Optional, TYPE_CHECKING, Union
1918

2019
import bigframes.core.log_adapter as log_adapter

bigframes/bigquery/ml.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,12 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
"""This module integrates BigQuery ML functions."""
15+
"""This module exposes `BigQuery ML
16+
<https://docs.cloud.google.com/bigquery/docs/bqml-introduction>`_ functions
17+
by directly mapping to the equivalent function names in SQL syntax.
18+
19+
For an interface more familiar to Scikit-Learn users, see :mod:`bigframes.ml`.
20+
"""
1621

1722
from bigframes.bigquery._operations.ml import create_model
1823

bigframes/core/sql/ml.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
from __future__ import annotations
1616

17-
import typing
1817
from typing import Mapping, Optional, Union
1918

2019
import bigframes.core.compile.googlesql as googlesql

tests/unit/core/sql/test_ml.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
import pytest
16-
1715
import bigframes.core.sql.ml
1816

1917

@@ -25,6 +23,7 @@ def test_create_model_basic(snapshot):
2523
)
2624
snapshot.assert_match(sql, "create_model_basic.sql")
2725

26+
2827
def test_create_model_replace(snapshot):
2928
sql = bigframes.core.sql.ml.create_model_ddl(
3029
model_name="my_model",
@@ -34,6 +33,7 @@ def test_create_model_replace(snapshot):
3433
)
3534
snapshot.assert_match(sql, "create_model_replace.sql")
3635

36+
3737
def test_create_model_if_not_exists(snapshot):
3838
sql = bigframes.core.sql.ml.create_model_ddl(
3939
model_name="my_model",
@@ -43,6 +43,7 @@ def test_create_model_if_not_exists(snapshot):
4343
)
4444
snapshot.assert_match(sql, "create_model_if_not_exists.sql")
4545

46+
4647
def test_create_model_transform(snapshot):
4748
sql = bigframes.core.sql.ml.create_model_ddl(
4849
model_name="my_model",
@@ -52,6 +53,7 @@ def test_create_model_transform(snapshot):
5253
)
5354
snapshot.assert_match(sql, "create_model_transform.sql")
5455

56+
5557
def test_create_model_remote(snapshot):
5658
sql = bigframes.core.sql.ml.create_model_ddl(
5759
model_name="my_remote_model",
@@ -62,6 +64,7 @@ def test_create_model_remote(snapshot):
6264
)
6365
snapshot.assert_match(sql, "create_model_remote.sql")
6466

67+
6568
def test_create_model_remote_default(snapshot):
6669
sql = bigframes.core.sql.ml.create_model_ddl(
6770
model_name="my_remote_model",
@@ -70,6 +73,7 @@ def test_create_model_remote_default(snapshot):
7073
)
7174
snapshot.assert_match(sql, "create_model_remote_default.sql")
7275

76+
7377
def test_create_model_training_data_and_holiday(snapshot):
7478
sql = bigframes.core.sql.ml.create_model_ddl(
7579
model_name="my_arima_model",
@@ -79,6 +83,7 @@ def test_create_model_training_data_and_holiday(snapshot):
7983
)
8084
snapshot.assert_match(sql, "create_model_training_data_and_holiday.sql")
8185

86+
8287
def test_create_model_list_option(snapshot):
8388
sql = bigframes.core.sql.ml.create_model_ddl(
8489
model_name="my_model",

0 commit comments

Comments
 (0)