Skip to content

Commit 184d763

Browse files
authored
Merge branch 'main' into sycai_ai_gen_text
2 parents 943f6ac + 318752a commit 184d763

File tree

5 files changed

+39
-0
lines changed

5 files changed

+39
-0
lines changed

tests/system/large/bigquery/test_ml.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,30 @@ def test_generate_embedding_with_options(embedding_model):
6262
assert "ml_generate_embedding_status" in result.columns
6363
embedding = result["ml_generate_embedding_result"].to_pandas()
6464
assert len(embedding[0]) == 256
65+
66+
67+
def test_create_model_linear_regression(dataset_id):
68+
df = bpd.DataFrame({"x": [1, 2, 3], "y": [2, 4, 6]})
69+
model_name = f"{dataset_id}.linear_regression_model"
70+
71+
result = ml.create_model(
72+
model_name=model_name,
73+
options={"model_type": "LINEAR_REG", "input_label_cols": ["y"]},
74+
training_data=df,
75+
)
76+
77+
assert result["modelType"] == "LINEAR_REGRESSION"
78+
79+
80+
def test_create_model_with_transform(dataset_id):
81+
df = bpd.DataFrame({"x": [1, 2, 3], "y": [2, 4, 6]})
82+
model_name = f"{dataset_id}.transform_model"
83+
84+
result = ml.create_model(
85+
model_name=model_name,
86+
options={"model_type": "LINEAR_REG", "input_label_cols": ["y"]},
87+
training_data=df,
88+
transform=["x * 2 AS x_doubled", "y"],
89+
)
90+
91+
assert result["modelType"] == "LINEAR_REGRESSION"

tests/system/large/blob/test_function.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
from bigframes import dtypes
2727
import bigframes.pandas as bpd
2828

29+
pytest.skip("Skipping blob tests due to b/481790217", allow_module_level=True)
30+
2931

3032
@pytest.fixture(scope="function")
3133
def images_output_folder() -> Generator[str, None, None]:

tests/system/small/blob/test_io.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
import bigframes
2121
import bigframes.pandas as bpd
2222

23+
pytest.skip("Skipping blob tests due to b/481790217", allow_module_level=True)
24+
25+
2326
idisplay = pytest.importorskip("IPython.display")
2427

2528

tests/system/small/blob/test_properties.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,13 @@
1313
# limitations under the License.
1414

1515
import pandas as pd
16+
import pytest
1617

1718
import bigframes.dtypes as dtypes
1819
import bigframes.pandas as bpd
1920

21+
pytest.skip("Skipping blob tests due to b/481790217", allow_module_level=True)
22+
2023

2124
def test_blob_uri(images_uris: list[str], images_mm_df: bpd.DataFrame):
2225
actual = images_mm_df["blob_col"].blob.uri().to_pandas()

tests/system/small/blob/test_urls.py

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

15+
import pytest
16+
1517
import bigframes.pandas as bpd
1618

19+
pytest.skip("Skipping blob tests due to b/481790217", allow_module_level=True)
20+
1721

1822
def test_blob_read_url(images_mm_df: bpd.DataFrame):
1923
urls = images_mm_df["blob_col"].blob.read_url()

0 commit comments

Comments
 (0)