Skip to content

SNOW-2112697: IndexError: list index out of range #157

@deadsoul44

Description

@deadsoul44
backend-fastapi\app\routers\inference.py:233: in get_endpoints
    services = v.list_services().to_dict(orient="records")
.venv\Lib\site-packages\snowflake\ml\_internal\telemetry.py:539: in wrap
    return ctx.run(execute_func_with_statement_params)
.venv\Lib\site-packages\snowflake\ml\_internal\telemetry.py:500: in execute_func_with_statement_params
    result = func(*args, **kwargs)
.venv\Lib\site-packages\snowflake\ml\model\_client\model\model_version_impl.py:871: in list_services
    self._model_ops.show_services(
.venv\Lib\site-packages\snowflake\ml\model\_client\ops\model_ops.py:651: in show_services
    service_status, _ = self._service_client.get_service_status(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _  

self = <snowflake.ml.model._client.sql.service.ServiceSQLClient object at 0x000001F957972510>

    def get_service_status(
        self,
        *,
        database_name: Optional[sql_identifier.SqlIdentifier],
        schema_name: Optional[sql_identifier.SqlIdentifier],
        service_name: sql_identifier.SqlIdentifier,
        include_message: bool = False,
        statement_params: Optional[dict[str, Any]] = None,
    ) -> tuple[ServiceStatus, Optional[str]]:
        system_func = "SYSTEM$GET_SERVICE_STATUS"
        rows = (
            query_result_checker.SqlResultValidator(
                self._session,
                f"CALL {system_func}('{self.fully_qualified_object_name(database_name, schema_name, service_name)}')",
                statement_params=statement_params,
            )
            .has_dimensions(expected_rows=1, expected_cols=1)
            .validate()
        )
>       metadata = json.loads(rows[0][system_func])[0]
E       IndexError: list index out of range

.venv\Lib\site-packages\snowflake\ml\model\_client\sql\service.py:212: IndexError

I don't know why but I started to get the error above when trying to list services for a model version. Maybe due to a backward compatibility issue.
Could you please help me to find a soluiton?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions