Skip to content

Commit

Permalink
Project import generated by Copybara. (#120)
Browse files Browse the repository at this point in the history
GitOrigin-RevId: bbba74b134aa6fa9d66cb37f439477b0a94817b0

Co-authored-by: Snowflake Authors <[email protected]>
  • Loading branch information
sfc-gh-gkannan and Snowflake Authors authored Oct 17, 2024
1 parent 6186ce6 commit f54ab9f
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.3.0
6.3.2
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# Release History

## 1.6.3
## 1.6.4

### Bug Fixes

- Registry: Fix an issue that leads to incident when using `ModelVersion.run` with service.

## 1.6.3 (2024-10-07)

- Model Registry (PrPr) has been removed.

Expand Down
2 changes: 1 addition & 1 deletion bazel/requirements/templates/meta.tpl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ build:
requirements:
build:
- python
- bazel==6.3.0
- bazel==6.3.2
run:
- python>=3.8,<3.12

Expand Down
4 changes: 2 additions & 2 deletions ci/conda_recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ build:
noarch: python
package:
name: snowflake-ml-python
version: 1.6.3
version: 1.6.4
requirements:
build:
- python
- bazel==6.3.0
- bazel==6.3.2
run:
- absl-py>=0.15,<2
- aiohttp!=4.0.0a0, !=4.0.0a1
Expand Down
24 changes: 6 additions & 18 deletions snowflake/ml/model/_client/sql/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@
import textwrap
from typing import Any, Dict, List, Optional, Tuple

from packaging import version

from snowflake import snowpark
from snowflake.ml._internal.utils import (
identifier,
query_result_checker,
snowflake_env,
sql_identifier,
)
from snowflake.ml.model._client.sql import _base
Expand Down Expand Up @@ -120,21 +117,12 @@ def invoke_function_method(
args_sql_list.append(input_arg_value)
args_sql = ", ".join(args_sql_list)

if snowflake_env.get_current_snowflake_version(
self._session, statement_params=statement_params
) >= version.parse("8.39.0"):
fully_qualified_service_name = self.fully_qualified_object_name(
actual_database_name, actual_schema_name, service_name
)
fully_qualified_function_name = f"{fully_qualified_service_name}!{method_name.identifier()}"

else:
function_name = identifier.concat_names([service_name.identifier(), "_", method_name.identifier()])
fully_qualified_function_name = identifier.get_schema_level_object_identifier(
actual_database_name.identifier(),
actual_schema_name.identifier(),
function_name,
)
function_name = identifier.concat_names([service_name.identifier(), "_", method_name.identifier()])
fully_qualified_function_name = identifier.get_schema_level_object_identifier(
actual_database_name.identifier(),
actual_schema_name.identifier(),
function_name,
)

sql = textwrap.dedent(
f"""{with_sql}
Expand Down
7 changes: 0 additions & 7 deletions snowflake/ml/model/_client/sql/service_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,6 @@ def test_deploy_model(self) -> None:
def test_invoke_function_method(self) -> None:
m_statement_params = {"test": "1"}
m_df = mock_data_frame.MockDataFrame()
m_df0 = mock_data_frame.MockDataFrame(collect_result=[Row(CURRENT_VERSION="1")])
self.m_session.add_mock_sql("SELECT CURRENT_VERSION() AS CURRENT_VERSION", m_df0)

self.m_session.add_mock_sql(
"""SELECT *,
Expand Down Expand Up @@ -143,9 +141,6 @@ def test_invoke_function_method(self) -> None:

def test_invoke_function_method_1(self) -> None:
m_statement_params = {"test": "1"}
m_df0 = mock_data_frame.MockDataFrame(collect_result=[Row(CURRENT_VERSION="1")])
self.m_session.add_mock_sql("SELECT CURRENT_VERSION() AS CURRENT_VERSION", m_df0)

m_df = mock_data_frame.MockDataFrame()
self.m_session.add_mock_sql(
"""SELECT *,
Expand Down Expand Up @@ -188,8 +183,6 @@ def test_invoke_function_method_1(self) -> None:

def test_invoke_function_method_2(self) -> None:
m_statement_params = {"test": "1"}
m_df0 = mock_data_frame.MockDataFrame(collect_result=[Row(CURRENT_VERSION="1")])
self.m_session.add_mock_sql("SELECT CURRENT_VERSION() AS CURRENT_VERSION", m_df0)
m_df = mock_data_frame.MockDataFrame()
self.m_session.add_mock_sql(
"""WITH SNOWPARK_ML_MODEL_INFERENCE_INPUT_ABCDEF0123 AS (query_1)
Expand Down
2 changes: 1 addition & 1 deletion snowflake/ml/version.bzl
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This is parsed by regex in conda reciper meta file. Make sure not to break it.
VERSION = "1.6.3"
VERSION = "1.6.4"

0 comments on commit f54ab9f

Please sign in to comment.