Unable to use multiple schemas in SQLDatabase

I'd like to be able to run a query via SQLDatabaseSequentialChain or SQLDatabaseChain involving multiple tables living in multiple different schemas, but it seems that as it is, the code is set up to only allow and look through just the one schema provided.

That would be huge! Thank you.

Change sql_database.py like this?
PS: It works, but it change the parameter schema type from Optional[str] to Optional[List[str]]. Or is it necessary to use schema as 'schema_1, schema_2' and self._schema = [s.strip() for s in schema.split(',')]?
"""SQLAlchemy wrapper around a database."""
from __future__ import annotations

import warnings
from typing import Any, Iterable, List, Optional

from sqlalchemy import MetaData, Table, create_engine, inspect, select, text
from sqlalchemy.engine import Engine
from sqlalchemy.exc import ProgrammingError, SQLAlchemyError
from sqlalchemy.schema import CreateTable

def _format_index(index: dict) -> str:
    return (
        f'Name: {index["name"]}, Unique: {index["unique"]},'
        f' Columns: {str(index["column_names"])}'
    )

class SQLDatabase:
    """SQLAlchemy wrapper around a database."""

    def __init__(
        self,
        engine: Engine,
        schema: Optional[List(str)] = None,
        metadata: Optional[MetaData] = None,
        ignore_tables: Optional[List[str]] = None,
        include_tables: Optional[List[str]] = None,
        sample_rows_in_table_info: int = 3,
        indexes_in_table_info: bool = False,
        custom_table_info: Optional[dict] = None,
        view_support: Optional[bool] = False,
    ):
        """Create engine from database URI."""
        self._engine = engine
        self._schema = schema
        if include_tables and ignore_tables:
            raise ValueError("Cannot specify both include_tables and ignore_tables")

        self._inspector = inspect(self._engine)

        self._all_tables_per_schema = {}
        for schema in self._schema:
            self._all_tables_per_schema[schema] = set(
                self._inspector.get_table_names(schema=schema)
                + (self._inspector.get_view_names(schema=schema) if view_support else [])
            )

        # including view support by adding the views as well as tables to the all
        # tables list if view_support is True
        self._all_tables = set(value for values in self._all_tables_per_schema.values() for value in values)

        self._include_tables = set(include_tables) if include_tables else set()
        if self._include_tables:
            missing_tables = self._include_tables - self._all_tables
            if missing_tables:
                raise ValueError(
                    f"include_tables {missing_tables} not found in database"
                )
        self._ignore_tables = set(ignore_tables) if ignore_tables else set()
        if self._ignore_tables:
            missing_tables = self._ignore_tables - self._all_tables
            if missing_tables:
                raise ValueError(
                    f"ignore_tables {missing_tables} not found in database"
                )
        usable_tables = self.get_usable_table_names()
        self._usable_tables = set(usable_tables) if usable_tables else self._all_tables

        if not isinstance(sample_rows_in_table_info, int):
            raise TypeError("sample_rows_in_table_info must be an integer")

        self._sample_rows_in_table_info = sample_rows_in_table_info
        self._indexes_in_table_info = indexes_in_table_info

        self._custom_table_info = custom_table_info
        if self._custom_table_info:
            if not isinstance(self._custom_table_info, dict):
                raise TypeError(
                    "table_info must be a dictionary with table names as keys and the "
                    "desired table info as values"
                )
            # only keep the tables that are also present in the database
            intersection = set(self._custom_table_info).intersection(self._all_tables)
            self._custom_table_info = dict(
                (table, self._custom_table_info[table])
                for table in self._custom_table_info
                if table in intersection
            )

        self._metadata = metadata or MetaData()
        # including view support if view_support = true
        for schema in self._schema:
            self._metadata.reflect(
                views=view_support,
                bind=self._engine,
                only=self._all_tables_per_schema[schema],
                schema=schema,
            )

    @classmethod
    def from_uri(
        cls, database_uri: str, engine_args: Optional[dict] = None, **kwargs: Any
    ) -> SQLDatabase:
        """Construct a SQLAlchemy engine from URI."""
        _engine_args = engine_args or {}
        return cls(create_engine(database_uri, **_engine_args), **kwargs)

    @property
    def dialect(self) -> str:
        """Return string representation of dialect to use."""
        return self._engine.dialect.name

    def get_usable_table_names(self) -> Iterable[str]:
        """Get names of tables available."""
        if self._include_tables:
            return self._include_tables
        return self._all_tables - self._ignore_tables

    def get_table_names(self) -> Iterable[str]:
        """Get names of tables available."""
        warnings.warn(
            "This method is deprecated - please use `get_usable_table_names`."
        )
        return self.get_usable_table_names()

    @property
    def table_info(self) -> str:
        """Information about all tables in the database."""
        return self.get_table_info()

    def get_table_info(self, table_names: Optional[List[str]] = None) -> str:
        """Get information about specified tables.

        Follows best practices as specified in: Rajkumar et al, 2022
        (https://arxiv.org/abs/2204.00498)

        If `sample_rows_in_table_info`, the specified number of sample rows will be
        appended to each table description. This can increase performance as
        demonstrated in the paper.
        """
        all_table_names = self.get_usable_table_names()
        if table_names is not None:
            missing_tables = set(table_names).difference(all_table_names)
            if missing_tables:
                raise ValueError(f"table_names {missing_tables} not found in database")
            all_table_names = table_names

        meta_tables = [
            tbl
            for tbl in self._metadata.sorted_tables
            if tbl.name in set(all_table_names)
            and not (self.dialect == "sqlite" and tbl.name.startswith("sqlite_"))
        ]

        tables = []
        for table in meta_tables:
            if self._custom_table_info and table.name in self._custom_table_info:
                tables.append(self._custom_table_info[table.name])
                continue

            # add create table command
            create_table = str(CreateTable(table).compile(self._engine))
            table_info = f"{create_table.rstrip()}"
            has_extra_info = (
                self._indexes_in_table_info or self._sample_rows_in_table_info
            )
            if has_extra_info:
                table_info += "\n\n/*"
            if self._indexes_in_table_info:
                table_info += f"\n{self._get_table_indexes(table)}\n"
            if self._sample_rows_in_table_info:
                table_info += f"\n{self._get_sample_rows(table)}\n"
            if has_extra_info:
                table_info += "*/"
            tables.append(table_info)
        final_str = "\n\n".join(tables)
        return final_str

    def _get_table_indexes(self, table: Table) -> str:
        indexes = self._inspector.get_indexes(table.name)
        indexes_formatted = "\n".join(map(_format_index, indexes))
        return f"Table Indexes:\n{indexes_formatted}"

    def _get_sample_rows(self, table: Table) -> str:
        # build the select command
        command = select([table]).limit(self._sample_rows_in_table_info)

        # save the columns in string format
        columns_str = "\t".join([col.name for col in table.columns])

        try:
            # get the sample rows
            with self._engine.connect() as connection:
                sample_rows = connection.execute(command)
                # shorten values in the sample rows
                sample_rows = list(
                    map(lambda ls: [str(i)[:100] for i in ls], sample_rows)
                )

            # save the sample rows in string format
            sample_rows_str = "\n".join(["\t".join(row) for row in sample_rows])

        # in some dialects when there are no rows in the table a
        # 'ProgrammingError' is returned
        except ProgrammingError:
            sample_rows_str = ""

        return (
            f"{self._sample_rows_in_table_info} rows from {table.name} table:\n"
            f"{columns_str}\n"
            f"{sample_rows_str}"
        )

    def run(self, command: str, fetch: str = "all") -> str:
        """Execute a SQL command and return a string representing the results.

        If the statement returns rows, a string of the results is returned.
        If the statement returns no rows, an empty string is returned.
        """
        with self._engine.begin() as connection:
            if self._schema is not None:
                connection.exec_driver_sql(f"SET search_path TO {self._schema}")
            cursor = connection.execute(text(command))
            if cursor.returns_rows:
                if fetch == "all":
                    result = cursor.fetchall()
                elif fetch == "one":
                    result = cursor.fetchone()[0]
                else:
                    raise ValueError("Fetch parameter must be either 'one' or 'all'")
                return str(result)
        return ""

    def get_table_info_no_throw(self, table_names: Optional[List[str]] = None) -> str:
        """Get information about specified tables.

        Follows best practices as specified in: Rajkumar et al, 2022
        (https://arxiv.org/abs/2204.00498)

        If `sample_rows_in_table_info`, the specified number of sample rows will be
        appended to each table description. This can increase performance as
        demonstrated in the paper.
        """
        try:
            return self.get_table_info(table_names)
        except ValueError as e:
            """Format the error message"""
            return f"Error: {e}"

    def run_no_throw(self, command: str, fetch: str = "all") -> str:
        """Execute a SQL command and return a string representing the results.

        If the statement returns rows, a string of the results is returned.
        If the statement returns no rows, an empty string is returned.

        If the statement throws an error, the error message is returned.
        """
        try:
            return self.run(command, fetch)
        except SQLAlchemyError as e:
            """Format the error message"""
            return f"Error: {e}"

Hello, is anyone currently working on this issue? It doesn't seem like there's an assignee.
If no one is on it, would it be okay if I take it on? 👀

I also had to support the same use case and I came up with this subclass of SQLDatabase.
It seems to work great for me. Maybe I should PR this changes? Although they would be a breaking change given the schema argument has been changed to schemas

"""SQLAlchemy wrapper around a database."""
from __future__ import annotations

from typing import Any, List, Optional

from sqlalchemy import MetaData, create_engine, inspect
from sqlalchemy.engine import Engine
from sqlalchemy.schema import CreateTable

from langchain import utils
from langchain import SQLDatabase as _SQLDatabase

class SQLDatabase(_SQLDatabase):
    """SQLAlchemy wrapper around a database."""

    def __init__(
        self,
        engine: Engine,
        schemas: List[str],
        metadata: Optional[MetaData] = None,
        ignore_tables: Optional[List[str]] = None,
        include_tables: Optional[List[str]] = None,
        sample_rows_in_table_info: int = 3,
        indexes_in_table_info: bool = False,
        custom_table_info: Optional[dict] = None,
        view_support: bool = False,
        max_string_length: int = 300,
    ):
        """Create engine from database URI."""
        self._engine = engine
        self._schema = None
        self._schemas = schemas
        if include_tables and ignore_tables:
            raise ValueError("Cannot specify both include_tables and ignore_tables")

        self._inspector = inspect(self._engine)

        # including view support by adding the views as well as tables to the all
        # tables list if view_support is True
        self._all_tables_per_schema = {}
        for schema in self._schemas:
            self._all_tables_per_schema[schema] = set(
                self._inspector.get_table_names(schema=schema)
                + (self._inspector.get_view_names(schema=schema) if view_support else [])
            )
        self._all_tables = set(f"{k}.{name}" for k, names in self._all_tables_per_schema.items() for name in names)

        self._include_tables = set(include_tables) if include_tables else set()
        if self._include_tables:
            missing_tables = self._include_tables - self._all_tables
            if missing_tables:
                raise ValueError(
                    f"include_tables {missing_tables} not found in database"
                )
        self._ignore_tables = set(ignore_tables) if ignore_tables else set()
        if self._ignore_tables:
            missing_tables = self._ignore_tables - self._all_tables
            if missing_tables:
                raise ValueError(
                    f"ignore_tables {missing_tables} not found in database"
                )
        usable_tables = self.get_usable_table_names()
        self._usable_tables = set(usable_tables) if usable_tables else self._all_tables

        if not isinstance(sample_rows_in_table_info, int):
            raise TypeError("sample_rows_in_table_info must be an integer")

        self._sample_rows_in_table_info = sample_rows_in_table_info
        self._indexes_in_table_info = indexes_in_table_info

        self._custom_table_info = custom_table_info
        if self._custom_table_info:
            if not isinstance(self._custom_table_info, dict):
                raise TypeError(
                    "table_info must be a dictionary with table names as keys and the "
                    "desired table info as values"
                )
            # only keep the tables that are also present in the database
            intersection = set(self._custom_table_info).intersection(self._all_tables)
            self._custom_table_info = dict(
                (table, self._custom_table_info[table])
                for table in self._custom_table_info
                if table in intersection
            )

        self._max_string_length = max_string_length

        self._metadata = metadata or MetaData()
        # including view support if view_support = true

        for schema in self._schemas:
            self._metadata.reflect(
                views=view_support,
                bind=self._engine,
                only=[v.split(".")[-1] for v in self._usable_tables if v.startswith(schema)],
                schema=schema,
            )

        # Add id to tables metadata
        for t in self._metadata.sorted_tables:
            t.id = f"{t.schema}.{t.name}"

    @classmethod
    def from_uri(
        cls,
        database_uri: str,
        schemas: Optional[List[str]] = None,
        engine_args: Optional[dict] = None,
        **kwargs: Any
    ) -> SQLDatabase:
        """Construct a SQLAlchemy engine from URI."""
        _engine_args = engine_args or {}
        engine = create_engine(database_uri, **_engine_args)
        return cls(engine, schemas=schemas, **kwargs)

    @classmethod
    def from_databricks(
        cls,
        catalog: str,
        schemas: Optional[List[str]] = None,
        host: Optional[str] = None,
        api_token: Optional[str] = None,
        warehouse_id: Optional[str] = None,
        cluster_id: Optional[str] = None,
        engine_args: Optional[dict] = None,
        **kwargs: Any,
    ) -> SQLDatabase:
        """
        Class method to create an SQLDatabase instance from a Databricks connection.
        This method requires the 'databricks-sql-connector' package. If not installed,
        it can be added using `pip install databricks-sql-connector`.

        Args:
            catalog (str): The catalog name in the Databricks database.
            schemas (List[str[): The schema name(s) in the catalog
            host (Optional[str]): The Databricks workspace hostname, excluding
                'https://' part. If not provided, it attempts to fetch from the
                environment variable 'DATABRICKS_HOST'. If still unavailable and if
                running in a Databricks notebook, it defaults to the current workspace
                hostname. Defaults to None.
            api_token (Optional[str]): The Databricks personal access token for
                accessing the Databricks SQL warehouse or the cluster. If not provided,
                it attempts to fetch from 'DATABRICKS_TOKEN'. If still unavailable
                and running in a Databricks notebook, a temporary token for the current
                user is generated. Defaults to None.
            warehouse_id (Optional[str]): The warehouse ID in the Databricks SQL. If
                provided, the method configures the connection to use this warehouse.
                Cannot be used with 'cluster_id'. Defaults to None.
            cluster_id (Optional[str]): The cluster ID in the Databricks Runtime. If
                provided, the method configures the connection to use this cluster.
                Cannot be used with 'warehouse_id'. If running in a Databricks notebook
                and both 'warehouse_id' and 'cluster_id' are None, it uses the ID of the
                cluster the notebook is attached to. Defaults to None.
            engine_args (Optional[dict]): The arguments to be used when connecting
                Databricks. Defaults to None.
            **kwargs (Any): Additional keyword arguments for the `from_uri` method.

        Returns:
            SQLDatabase: An instance of SQLDatabase configured with the provided
                Databricks connection details.

        Raises:
            ValueError: If 'databricks-sql-connector' is not found, or if both
                'warehouse_id' and 'cluster_id' are provided, or if neither
                'warehouse_id' nor 'cluster_id' are provided and it's not executing
                inside a Databricks notebook.
        """
        try:
            from databricks import sql  # noqa: F401
        except ImportError:
            raise ValueError(
                "databricks-sql-connector package not found, please install with"
                " `pip install databricks-sql-connector`"
            )
        context = None
        try:
            from dbruntime.databricks_repl_context import get_context

            context = get_context()
        except ImportError:
            pass

        default_host = context.browserHostName if context else None
        if host is None:
            host = utils.get_from_env("host", "DATABRICKS_HOST", default_host)

        default_api_token = context.apiToken if context else None
        if api_token is None:
            api_token = utils.get_from_env(
                "api_token", "DATABRICKS_TOKEN", default_api_token
            )

        if warehouse_id is None and cluster_id is None:
            if context:
                cluster_id = context.clusterId
            else:
                raise ValueError(
                    "Need to provide either 'warehouse_id' or 'cluster_id'."
                )

        if warehouse_id and cluster_id:
            raise ValueError("Can't have both 'warehouse_id' or 'cluster_id'.")

        if warehouse_id:
            http_path = f"/sql/1.0/warehouses/{warehouse_id}"
        else:
            http_path = f"/sql/protocolv1/o/0/{cluster_id}"

        uri = (
            f"databricks://token:{api_token}@{host}?"
            f"http_path={http_path}&catalog={catalog}"
        )
        return cls.from_uri(database_uri=uri, schemas=schemas, engine_args=engine_args, **kwargs)

    def get_table_info(self, table_names: Optional[List[str]] = None) -> str:
        """Get information about specified tables.

        Follows best practices as specified in: Rajkumar et al, 2022
        (https://arxiv.org/abs/2204.00498)

        If `sample_rows_in_table_info`, the specified number of sample rows will be
        appended to each table description. This can increase performance as
        demonstrated in the paper.
        """
        all_table_names = self.get_usable_table_names()
        if table_names is not None:
            missing_tables = set(table_names).difference(all_table_names)
            if missing_tables:
                raise ValueError(f"table_names {missing_tables} not found in database")
            all_table_names = table_names

        meta_tables = [
            tbl
            for tbl in self._metadata.sorted_tables
            if tbl.id in set(all_table_names)
            and not (self.dialect == "sqlite" and tbl.name.startswith("sqlite_"))
        ]

        tables = []
        for table in meta_tables:
            if self._custom_table_info and table.name in self._custom_table_info:
                tables.append(self._custom_table_info[table.name])
                continue

            # add create table command
            create_table = str(CreateTable(table).compile(self._engine))
            table_info = f"{create_table.rstrip()}"
            has_extra_info = (
                self._indexes_in_table_info or self._sample_rows_in_table_info
            )
            if has_extra_info:
                table_info += "\n\n/*"
            if self._indexes_in_table_info:
                table_info += f"\n{self._get_table_indexes(table)}\n"
            if self._sample_rows_in_table_info:
                table_info += f"\n{self._get_sample_rows(table)}\n"
            if has_extra_info:
                table_info += "*/"
            tables.append(table_info)
        final_str = "\n\n".join(tables)
        return final_str

Maybe it's an error specific to the engine you are using for your database / SQLAlchemy. I'm using Databricks SQL warehouse. What exactly is the error?

Is this currently being worked on? Our use case is impacted/limited by this too. Happy to contribute.

Same issue for me. Seems to take only one schema, no choice in the matter as well

Is there any update on this? I also need to access tables in different schemas.

If you are using MSSQL like me, search_path is not available so if you want to bypass this issue, you can create synonym for each table directly in MSSQL. It's not the best solution but it can fix that issue.

Is there any update to this issue?

I also had to support the same use case and I came up with this subclass of SQLDatabase.
It seems to work great for me. Maybe I should PR this changes? Although they would be a breaking change given the schema argument has been changed to schemas
"""SQLAlchemy wrapper around a database."""
from __future__ import annotations

from typing import Any, List, Optional

from sqlalchemy import MetaData, create_engine, inspect
from sqlalchemy.engine import Engine
from sqlalchemy.schema import CreateTable

from langchain import utils
from langchain import SQLDatabase as _SQLDatabase

class SQLDatabase(_SQLDatabase):
    """SQLAlchemy wrapper around a database."""

    def __init__(
        self,
        engine: Engine,
        schemas: List[str],
        metadata: Optional[MetaData] = None,
        ignore_tables: Optional[List[str]] = None,
        include_tables: Optional[List[str]] = None,
        sample_rows_in_table_info: int = 3,
        indexes_in_table_info: bool = False,
        custom_table_info: Optional[dict] = None,
        view_support: bool = False,
        max_string_length: int = 300,
    ):
        """Create engine from database URI."""
        self._engine = engine
        self._schema = None
        self._schemas = schemas
        if include_tables and ignore_tables:
            raise ValueError("Cannot specify both include_tables and ignore_tables")

        self._inspector = inspect(self._engine)

        # including view support by adding the views as well as tables to the all
        # tables list if view_support is True
        self._all_tables_per_schema = {}
        for schema in self._schemas:
            self._all_tables_per_schema[schema] = set(
                self._inspector.get_table_names(schema=schema)
                + (self._inspector.get_view_names(schema=schema) if view_support else [])
            )
        self._all_tables = set(f"{k}.{name}" for k, names in self._all_tables_per_schema.items() for name in names)

        self._include_tables = set(include_tables) if include_tables else set()
        if self._include_tables:
            missing_tables = self._include_tables - self._all_tables
            if missing_tables:
                raise ValueError(
                    f"include_tables {missing_tables} not found in database"
                )
        self._ignore_tables = set(ignore_tables) if ignore_tables else set()
        if self._ignore_tables:
            missing_tables = self._ignore_tables - self._all_tables
            if missing_tables:
                raise ValueError(
                    f"ignore_tables {missing_tables} not found in database"
                )
        usable_tables = self.get_usable_table_names()
        self._usable_tables = set(usable_tables) if usable_tables else self._all_tables

        if not isinstance(sample_rows_in_table_info, int):
            raise TypeError("sample_rows_in_table_info must be an integer")

        self._sample_rows_in_table_info = sample_rows_in_table_info
        self._indexes_in_table_info = indexes_in_table_info

        self._custom_table_info = custom_table_info
        if self._custom_table_info:
            if not isinstance(self._custom_table_info, dict):
                raise TypeError(
                    "table_info must be a dictionary with table names as keys and the "
                    "desired table info as values"
                )
            # only keep the tables that are also present in the database
            intersection = set(self._custom_table_info).intersection(self._all_tables)
            self._custom_table_info = dict(
                (table, self._custom_table_info[table])
                for table in self._custom_table_info
                if table in intersection
            )

        self._max_string_length = max_string_length

        self._metadata = metadata or MetaData()
        # including view support if view_support = true

        for schema in self._schemas:
            self._metadata.reflect(
                views=view_support,
                bind=self._engine,
                only=[v.split(".")[-1] for v in self._usable_tables if v.startswith(schema)],
                schema=schema,
            )

        # Add id to tables metadata
        for t in self._metadata.sorted_tables:
            t.id = f"{t.schema}.{t.name}"

    @classmethod
    def from_uri(
        cls,
        database_uri: str,
        schemas: Optional[List[str]] = None,
        engine_args: Optional[dict] = None,
        **kwargs: Any
    ) -> SQLDatabase:
        """Construct a SQLAlchemy engine from URI."""
        _engine_args = engine_args or {}
        engine = create_engine(database_uri, **_engine_args)
        return cls(engine, schemas=schemas, **kwargs)

    @classmethod
    def from_databricks(
        cls,
        catalog: str,
        schemas: Optional[List[str]] = None,
        host: Optional[str] = None,
        api_token: Optional[str] = None,
        warehouse_id: Optional[str] = None,
        cluster_id: Optional[str] = None,
        engine_args: Optional[dict] = None,
        **kwargs: Any,
    ) -> SQLDatabase:
        """
        Class method to create an SQLDatabase instance from a Databricks connection.
        This method requires the 'databricks-sql-connector' package. If not installed,
        it can be added using `pip install databricks-sql-connector`.

        Args:
            catalog (str): The catalog name in the Databricks database.
            schemas (List[str[): The schema name(s) in the catalog
            host (Optional[str]): The Databricks workspace hostname, excluding
                'https://' part. If not provided, it attempts to fetch from the
                environment variable 'DATABRICKS_HOST'. If still unavailable and if
                running in a Databricks notebook, it defaults to the current workspace
                hostname. Defaults to None.
            api_token (Optional[str]): The Databricks personal access token for
                accessing the Databricks SQL warehouse or the cluster. If not provided,
                it attempts to fetch from 'DATABRICKS_TOKEN'. If still unavailable
                and running in a Databricks notebook, a temporary token for the current
                user is generated. Defaults to None.
            warehouse_id (Optional[str]): The warehouse ID in the Databricks SQL. If
                provided, the method configures the connection to use this warehouse.
                Cannot be used with 'cluster_id'. Defaults to None.
            cluster_id (Optional[str]): The cluster ID in the Databricks Runtime. If
                provided, the method configures the connection to use this cluster.
                Cannot be used with 'warehouse_id'. If running in a Databricks notebook
                and both 'warehouse_id' and 'cluster_id' are None, it uses the ID of the
                cluster the notebook is attached to. Defaults to None.
            engine_args (Optional[dict]): The arguments to be used when connecting
                Databricks. Defaults to None.
            **kwargs (Any): Additional keyword arguments for the `from_uri` method.

        Returns:
            SQLDatabase: An instance of SQLDatabase configured with the provided
                Databricks connection details.

        Raises:
            ValueError: If 'databricks-sql-connector' is not found, or if both
                'warehouse_id' and 'cluster_id' are provided, or if neither
                'warehouse_id' nor 'cluster_id' are provided and it's not executing
                inside a Databricks notebook.
        """
        try:
            from databricks import sql  # noqa: F401
        except ImportError:
            raise ValueError(
                "databricks-sql-connector package not found, please install with"
                " `pip install databricks-sql-connector`"
            )
        context = None
        try:
            from dbruntime.databricks_repl_context import get_context

            context = get_context()
        except ImportError:
            pass

        default_host = context.browserHostName if context else None
        if host is None:
            host = utils.get_from_env("host", "DATABRICKS_HOST", default_host)

        default_api_token = context.apiToken if context else None
        if api_token is None:
            api_token = utils.get_from_env(
                "api_token", "DATABRICKS_TOKEN", default_api_token
            )

        if warehouse_id is None and cluster_id is None:
            if context:
                cluster_id = context.clusterId
            else:
                raise ValueError(
                    "Need to provide either 'warehouse_id' or 'cluster_id'."
                )

        if warehouse_id and cluster_id:
            raise ValueError("Can't have both 'warehouse_id' or 'cluster_id'.")

        if warehouse_id:
            http_path = f"/sql/1.0/warehouses/{warehouse_id}"
        else:
            http_path = f"/sql/protocolv1/o/0/{cluster_id}"

        uri = (
            f"databricks://token:{api_token}@{host}?"
            f"http_path={http_path}&catalog={catalog}"
        )
        return cls.from_uri(database_uri=uri, schemas=schemas, engine_args=engine_args, **kwargs)

    def get_table_info(self, table_names: Optional[List[str]] = None) -> str:
        """Get information about specified tables.

        Follows best practices as specified in: Rajkumar et al, 2022
        (https://arxiv.org/abs/2204.00498)

        If `sample_rows_in_table_info`, the specified number of sample rows will be
        appended to each table description. This can increase performance as
        demonstrated in the paper.
        """
        all_table_names = self.get_usable_table_names()
        if table_names is not None:
            missing_tables = set(table_names).difference(all_table_names)
            if missing_tables:
                raise ValueError(f"table_names {missing_tables} not found in database")
            all_table_names = table_names

        meta_tables = [
            tbl
            for tbl in self._metadata.sorted_tables
            if tbl.id in set(all_table_names)
            and not (self.dialect == "sqlite" and tbl.name.startswith("sqlite_"))
        ]

        tables = []
        for table in meta_tables:
            if self._custom_table_info and table.name in self._custom_table_info:
                tables.append(self._custom_table_info[table.name])
                continue

            # add create table command
            create_table = str(CreateTable(table).compile(self._engine))
            table_info = f"{create_table.rstrip()}"
            has_extra_info = (
                self._indexes_in_table_info or self._sample_rows_in_table_info
            )
            if has_extra_info:
                table_info += "\n\n/*"
            if self._indexes_in_table_info:
                table_info += f"\n{self._get_table_indexes(table)}\n"
            if self._sample_rows_in_table_info:
                table_info += f"\n{self._get_sample_rows(table)}\n"
            if has_extra_info:
                table_info += "*/"
            tables.append(table_info)
        final_str = "\n\n".join(tables)
        return final_str

this is not working. where all need to do the change?

Thanks @osoucy-newton , nice fix for this!
I think the line:

only=[v.split(".")[-1] for v in self._usable_tables if v.startswith(schema)]

May need to be changed to:

only=[v.split(".")[-1] for v in self._usable_tables if v ==schema]

Due to similar schemas (e.g. Schema 1 =  X, Schema 2 = XX) getting confused with the aforementioned logic

Any one is assigned to this issue?
It is very argent

If you are using MSSQL like me, search_path is not available so if you want to bypass this issue, you can create synonym for each table directly in MSSQL. It's not the best solution but it can fix that issue (i am referring synonym directly in the prompt).

Can you paste the code

Thanks @osoucy-newton. That seems to work fine. Locally, I made some minor changes to not prefix with the schema if there is only a single schema, but even without my modifications, your code seemed to work fine out of the box.

I have faced same issue, i had multiple schema in my database. this is how i fixed it.
db = SQLDatabase.from_uri(uri)
None of your tables are listed? You realize that your database is using custom schema and not ‘dbo’.
this will solve the issue-
db = SQLDatabase.from_uri(uri, **{'schema': 'your-custom-schema-name'})

I see this happening as well. What it appears is an inefficiency in the get_columns implementation in the DatabricksDialect:
https://github.com/databricks/databricks-sql-python/blob/main/src/databricks/sqlalchemy/base.py
get_columns is called for each table. So if you have many tables in the catalog and schema, it will take a while to load this metadata.

This is absolutely still an important issue that would be great to have a resolution for. People have also offered code for temporary workarounds, so hopefully, it shouldn't be too much of a pain to implement a more complete solution.


Layout shift when loading page

🐞 Bug report
Description
The layout shift drastically when the page is loaded (see video). How to omit this? I guess scully shows the prerendered text before the css is loaded.
🔬 Minimal Reproduction
Add scully to any ionic angular project and reload the page with clean cache.
💻Your Environment
Angular Version:

Angular CLI: 12.1.4
Node: 16.6.0 (Unsupported)
Package Manager: npm 7.20.3
OS: linux x64

Angular: 12.1.4
... cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router, service-worker

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1200.5
@angular-devkit/build-angular   12.1.4
@angular-devkit/core            12.0.5
@angular-devkit/schematics      12.1.4
@schematics/angular             12.1.4
rxjs                            6.6.7
typescript                      4.2.4

Scully Version:

 "@scullyio/init": "^1.1.2",
 "@scullyio/ng-lib": "^1.1.1",
 "@scullyio/scully": "^1.1.1",

🔥 Exception or Error

https://user-images.githubusercontent.com/35369883/127923687-9a6e7c38-7488-476b-84b9-da19edb41619.mp4

My app-routing:
@NgModule({
  imports: [
    RouterModule.forRoot(routes, {
      preloadingStrategy: PreloadAllModules,
      initialNavigation: 'enabled',
    }),
  ],
  exports: [RouterModule],
})

Can you provide a repo that reproduces this?
Ionic uses web-components, and this might be the problem. Perhaps when you switch to manual idle, the result is better.
We still have an open issue on being ionic compatible. That might be the problem too.

I'm going to close this due to lack of activity. As far as I can see this is a duplicate of the ionic compatibility issue.
If not please provide a reproduction repo, and we can take a look, and eventually reopen the issue.


Moved panes into subpackage

Codecov Report

Merging #283 into master will increase coverage by 0.06%.
The diff coverage is 85.2%.

@@            Coverage Diff             @@
##           master     #283      +/-   ##
==========================================
+ Coverage   88.11%   88.17%   +0.06%
==========================================
  Files          44       51       +7
  Lines        5645     5676      +31
==========================================
+ Hits         4974     5005      +31
  Misses        671      671

Impacted Files
Coverage Δ

panel/tests/test_vega.py
96.61% <100%> (ø)
:arrow_up:

panel/pipeline.py
80.68% <100%> (-0.14%)
:arrow_down:

panel/models/__init__.py
100% <100%> (ø)

panel/pane/holoviews.py
82.35% <100%> (ø)

panel/tests/test_plotly.py
97.59% <100%> (ø)
:arrow_up:

panel/interact.py
73.78% <100%> (+0.09%)
:arrow_up:

panel/param.py
89.65% <100%> (+0.02%)
:arrow_up:

panel/pane/vega.py
81.53% <100%> (ø)

panel/tests/test_links.py
97.4% <100%> (ø)
:arrow_up:

panel/models/plots.py
100% <100%> (ø)

... and 20 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3316fca...b1f921f. Read the comment docs.


Remove the License badge from README.md

The License is already in interfaces:
github.com:

npmjs.com:

No need to duplicate this info.

If you agree with this, we can consider removing this part of README.md in scope of this PR:

Sorry, but I don't like this. It's common practice to mention the Licence in the README.
The fact that it's visible in certain(!) interfaces doesn't matter, especially since the repository is also accessible from e.g. the git commandline, where such interface-information is not present.

@LinusBorg

the git commandline, where such interface-information is not present.

In command line you can always do cat LICENSE :) But it's ok, I understand your reasoning.


Cant resolve css or assets v1.0.7

It appears the project build is broken. Webpack 3.9.1, node v6.11.3, yarn 1.1.0. Digging deeper, none of the css or image assets are in the package.

I can confirm the same issue react-chat-window": "^1.0.7"

This should be resolved in react-chat-window": "^1.0.8". We needed to add --copy-files to the build.


Consider publishing to npm

I tend to use only npm these days and not bother with bower. This is one of the few client side packages I can't install via npm.

Sorry, I'm being an idiot: npm install cgross/angular-notify

It does'nt work for me...
Something changes ?

No, it should still work. What are you trying to do and how is it not working?

Thanks for your reply.
I don't know why but the problem comes from my proxy at work.
When I try npm install cgross/angular-notify on my own computer, all is fine.
So, forget my comment :)
Thanks


Moving Track class to new script

Created new script in app folder and moved the Track class to new script. Imported the class from the track script to the monitor script to maintain functionality.

Hello @idoria75, I managed to run the project on my machine no problem. The message you are getting seems to indicate that you may have a different working directory. Any idea how or why that's happening?

@youssefragab99 the project was made to be run through docker. The directory from my traceback is the directory from which the monitor script is ran within docker :)
Did you run the script in your own environment?


How to transfer files from FTP server to file storage with stream?

I want to transfer files from FTP to file storage with stream.
I can get the stream of the file from FTP, but when I use the file.UploadFromStream(response_Stream_from_FTP), an error occurs:"Operation is not valid due to the current state of the object."
The sample code I used as below:
FtpWebRequest request = (FtpWebRequest)WebRequest.Create(sourceURI + fileName);
request.Method = WebRequestMethods.Ftp.DownloadFile;
request.Credentials = new NetworkCredential(sourceUser, sourcePass);
FtpWebResponse response = (FtpWebResponse)request.GetResponse();
using (Stream responseStream = response.GetResponseStream())
{
     //error here
     cloudFile.UploadFromStream(responseStream);
}

But if I try to use UploadFromStream() of blob storage, it can successfully upload to the blob storage.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 0eff27d7-f909-fc99-14f6-ad572629907f
Version Independent ID: 57504146-9f89-e4d6-3f5b-5cd9af305d45
Content: Develop for Azure Files with .NET
Content Source: articles/storage/files/storage-dotnet-how-to-use-files.md
Service: storage
GitHub Login: @RenaShahMSFT
Microsoft Alias: renash

#reassign: @roygara

@imeya  Firstly, apologies for the delay in responding here and any inconvenience this issue may have caused.
Just for clarification, Have you referred to the suggestion mentioned in the below link:
https://stackoverflow.com/questions/47599211/transfer-files-directly-from-ftp-to-azure-file-storage-without-keeping-them-loca

@SumanthMarigowda-MSFT , thank you. The answer works.


CM for snow instead of MM

Would it be possible to display CM for snow instead of MM? Millimeters work great for rain but it seems snow is better represented in centimeters if this data is available from the providers.

@0-5-0 great idea. Not much snow this days so never really saw that :P will try to find a place to test it with

Thank you :), I searched a bit for snowy place and found these:
Aomori (JP), Sapporo (JP), Toyama (JP), St. John's Newfoundland (CA), also St. Moritz (CH).
Some have rain coming but hopefully the timing is just right when you have a chance to look at it :P

@0-5-0 it is now fixed in the new version on github

I noticed using St. John's New Foundland as a test, when it's mixed precipitation rain and snow on the same day there's only one icon showing up in the list at the bottom, not one for rain and a second for snow so I think it's adding the mm of rain + cm of snow strangely.
It's showing 19.3mm 100% with the snow icon for St. John's today but looking at the hourly there's a mix of both rain and snow. Not sure if a separate icon for rain and snow would have to be added down in the list?

@0-5-0 yes i use only one data. I show the total precipitation (snow+rain). as for the icon it chooses snow if there is some.
Not sure i want to add 2 icons. Uses a lot of space and not add that much. You ll get the details in the hourly view

Unless one mixed precipitation icon would do in that case?

you mean having an icon representing precipitation and snow at the same time ?

Exactly, for days where it's forecasting both rain and snow with a small snow flake and small rain drop maybe in the same icon.

@0-5-0 ok that i can do. i ll see if i find the right icon

I tried to find "something" icon wise but it seems slim.. just looking for an icon that might show a large snowflake with a large rain drop separated by / ... aside from that I think "sleet" might be a common term but it's always paired with a cloud so might not fit the design.
I found these interesting general icon sets.
https://basmilius.github.io/weather-icons/index-line.html
https://github.com/erikflowers/weather-icons
I was about to give up and found this one:
https://thenounproject.com/icon/snow-6498631/

Other examples:
https://www.veryicon.com/icons/miscellaneous/hekr/icon-defrost.html
https://www.iconfinder.com/icons/3625575/defrosting_drop_freezing_ice_rain_snow_weather_icon
https://www.iconfinder.com/icons/1813448/blood_drop_drops_rain_snow_water_weather_icon

@0-5-0 awesome ! really like the animated weather icons. Might try to add that to the app!
i actually created a new icon. Just need to implement it now

The one you made looks perfect, simple and very clear :)


Failed to copy Doxygen output in CI

https://github.com/isri-aist/NMPC/actions/runs/3627105794/jobs/6116692285
+ git checkout --quiet gh-pages
warning: unable to rmdir 'cmake': Directory not empty
+ rm -rf nmpc_ddp/ nmpc_fmpc/ nmpc_cgmres/
+ cp -r /home/runner/work/NMPC/NMPC/catkin_ws/build/nmpc_ddp/doc/html/ nmpc_ddp
cp: cannot stat '/home/runner/work/NMPC/NMPC/catkin_ws/build/nmpc_ddp/doc/html/': No such file or directory

After https://github.com/isri-aist/NMPC/pull/1, the output directories of Doxygen document have changed from catkin_ws/build/nmpc_ddp/doc/html/ to catkin_ws/build/nmpc_ddp/doc/doxygen-html/. It's OK, but do you know why?

The above commit should fix this. This is because of the adoption of jrl-cmakemodules which work very much the same way but default to doxygen-html


row-level ermrest ACL support

@karlcz what are the steps do we need to do to migrate to the new ACL in ermrest?

  You can see evidence of them as various "rights"
documents embedded inside the main /ermrest/catalog/N/schema/ response
document.
To make the front-end adapt to fine-grained rights, it should start to
consult those "rights" documents on each part of the model. At the
table level:

select: is client allowed to query the table
insert: is client allowed to insert new rows
update: is client allowed to edit existing rows
delete: is client allowed to delete existing rows

The answers can be true/false/null.  A null means that the access
decision is data-dependent (i.e. row-level policy) and cannot be
advertised statically for the entire table.  It may succeed or fail
on specific rows.
The column-level version of these rights says whether that particular
column can be addressed in select, insert, or update operations. You
might map this to ermrestjs concepts like:

insert false: column is "generated" during row insert
update false: column is "immutable" during row edits

Similarly, if column-level select rights are false, the column should
be dropped from any visible columns list since it will cause a
forbidden error if included.

From the meeting today, we decided to:

[ ] handle table right policy for canCreate, canUpdate, canDelete, canRead

null value should be treated as true.

[ ] column level policy

insert false: column is "generated" during row insert
update false: column is "immutable" during row edits
select false: show --hidden-- for the formatted value

[ ] rename canCreate to canInsert to be consistent with ermrest terms
[ ] rename canRead to canSelect to be consistent with ermrest terms

take a look at the epic associated with this issue. Karl has provided information on the new right in the epic.

Select for columns will be taken care by ermrest as mentioned in this issue https://github.com/informatics-isi-edu/ermrest/issues/167


fix: mask email and phone number on the backend

Fix: #554
After changing to mask phone and email by the backend, the frontend cannot get the real value of phone and email. This will affect 2 APIs, SendVerificationCode and Login().
I use the name to store the username on the frontend and pass it to 2 APIs. If the APIs get masked email and phone, they will query the user by the given username to get the real value of email and phone.
Signed-off-by: Yixiang Zhao<EMAIL_ADDRESS>

@seriouszyx demo site?

@hsluoyz http://<IP_ADDRESS>:8000/

@hsluoyz http://<IP_ADDRESS>:8000/


Should we use bullet lists?

The tables feel very difficult, and there are examples other aggregators that are just bullet lists. Should we just simplify and do something like this?

After some discussion and testing, I found it way easier to contribute after going to bulleted list format similar to other aggregators. It also consumes less screen space relatively speaking. Closing for now.


add flag to force full backup

Incremental backups increase the chance that Corso gets into a state where it can't complete a successful backup because new backups depend on the success and correctness of backups before them. Furthermore, the fact that Corso is going to default to trying to make an incremental backup makes it such that the user must delete older backups if they want to force a full backup for any reason.
We should provide a smoother and less destructive experience for making a full backup even when the incrementals code is enabled by providing a (possibly hidden) CLI flag that forces a full backup

Started with the inverse: a flag to enable incremental backups for exchange.  When we release that behavior and standardize incrementals for exchange, we can use this ticket to remove that feature flag and replace it with a forced full-backup operation.

Having a flag to disable a full backup may also require a minor change in how kopia.Wrapper works. Currently BackupCollections takes a single list of bases to make the incremental off of. These bases are used for both building the in-memory hierarchy to hand to kopia and giving to kopia to find cached files (aka kopia-assisted incrementals).
To disable delta token incrementals, we should skip handing the bases to the function that builds the in-memory hierarchy. However we should still take advantage of kopia-assisted incrementals


Error Printing Sam header

I am trying to convert blastn output to bam. However, I am getting "error printing sam header".
I would very much appreciate some help.

Hello,
This particular error can come from two things:
Either there is a problem with the reference file (fasta file) or, if you have one, with the read group you assigned. About the read group, it is imperative that it begins by @RG\tID:name\t... You can put whatever you want after the last \t. Of note, you shouldn't put the read group between quotes, the program already transforms the \t into tabulations for bam output.

Hello, I meet this problem too. There are my files：https://github.com/lirr-lichen/1_testdata.git
The command line I use:
blast2bam mCNS182020101601A1D1L1.blast.xml Human_alphaherpesvirus_1.dict mCNS182020101601A1D1L1.fq > out
I can't finger out this problem. Could you help me ? Thank you.

Hello lirr-lichen,
The issue is with your reference file.
Blast2bam needs the original reference file and not the dict version.
You should try the following command line:
blast2bam mCNS182020101601A1D1L1.blast.xml Human_alphaherpesvirus_1.fa mCNS182020101601A1D1L1.fq > out.sam
It should work.

Thanks for your help，it resolved my problem.


[keyvault] move azcertificates to security folder

Part of https://github.com/Azure/azure-sdk-for-go/issues/17906

/azp run prepare-pipelines

/azp run go - azcertificates - security


Detect SQLInjection and block their IP origin

Implements SQLInjection detector and IP Blocking that allow to detect hackers and block the IP where the connection was made, currently use a list on memory and a CSV, it's allow to check the blocked IPs on Excel or Calc.

SQLInjection detector implementation commit implements this behavior


Minor field documentation edits to default_parameters.json (shows up in Compute Studio)

@MaxGhenis Thanks for opening this PR to fix the typos.  Let me know if you want to add changes to punctuation (Issue #567) here also or if you'd rather me go ahead and merge this PR now.

Sure I'll add the punctuation changes

Codecov Report

Merging #568 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #568   +/-   ##
=======================================
  Coverage   84.18%   84.18%
=======================================
  Files          47       47
  Lines        6657     6657
=======================================
  Hits         5604     5604
  Misses       1053     1053

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bd9b897...b52ba6f. Read the comment docs.

@MaxGhenis Thank you for fixing these errors and inconsistencies.


Added support for mill 0.10.0-M2

Codecov Report

Merging #37 (ac75d74) into main (35a7dd6) will decrease coverage by 48.38%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##             main      #37       +/-   ##
===========================================
- Coverage   83.87%   35.48%   -48.39%
===========================================
  Files           2        2
  Lines          31       31
  Branches        0        2        +2
===========================================
- Hits           26       11       -15
- Misses          5       20       +15

Impacted Files
Coverage Δ

.../de/tobiasroeser/mill/vcs/version/VcsVersion.scala
0.00% <0.00%> (-83.34%)
:arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 35a7dd6...ac75d74. Read the comment docs.


Change "Cretonne" to "Cranelift"

Also, "cton" to "clif", for completeness.

Thanks! I forgot to do this when cretonne got renamed to cranelift.


Breaks reaction user list

It seems that the newly added github reactions are slightly broken by this plugin.
They appear as expected, however without the plugin I can hover the reaction and get a list of users who added it. With the plugin enabled this list doesn't display.
Example screenshot of working functionality:

Yeah, we remove all tooltips as most are completely useless. We should add an exception for this.


commands in general should act from the current active buffer path?

This is actually similar to #1884 , but more general.
I think it may be good that most : commands act from the path of the currently active buffer.
I think this is especially true for some sets of commands; for example, when working from a buffer, the :tabedit, :vsp, :sp etc commands are usually used to open other files in the same folder, so should be called with base path equal to the path to the active buffer. But I think that for almost more commands this should be the expected behavior anyways.

I like the idea, but think it should be opt-in, since it is not the expected behaviour (that I can think of at least...).
When I run a command, I expect it to be relative to the current working directory, which would be my project folder. Otherwise, its a case of :vsp ../../../../../A/B.re etc, versus :vsp src/A/B.re which is more auto-complete friendly (though I'd use the Ctrl-P menu in this case anyways but still). On the other hand, it makes :e C.re into having to navigate back through a bunch of layers of folders etc.
I believe the vim behaviour is to be relative to the cwd, but I could be wrong. There is various plugins that manipulate it in certain circumstances. Its possible we won't need to do anything except verify some existing vim settings and plugins work.

That sounds good. Possible this is modified by my settings in my vimrc et co.
I think that having either an opt-in, or a way to ask for it by adding a letter at the beginning or end of commands, may be good.


Calculate validation accuracy over all batches

Before this commit, validation accuracy was only computed over the last
batch.

Codecov Report

Merging #3 (f57a3f7) into master (e2bcf4e) will decrease coverage by 7.30%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master       #3      +/-   ##
==========================================
- Coverage   89.11%   81.80%   -7.31%
==========================================
  Files          37       38       +1
  Lines        1984     1990       +6
==========================================
- Hits         1768     1628     -140
- Misses        216      362     +146

Impacted Files
Coverage Δ

compy/models/model.py
86.66% <100.00%> (-3.81%)
:arrow_down:

compy/models/seqs/tf_seq_model.py
37.73% <0.00%> (-60.38%)
:arrow_down:

compy/models/graphs/tf_graph_model.py
38.49% <0.00%> (-46.95%)
:arrow_down:

compy/models/graphs/tf_graph_model_test.py
75.00% <0.00%> (-25.00%)
:arrow_down:

compy/models/seqs/tf_seq_model_test.py
81.81% <0.00%> (-18.19%)
:arrow_down:

compy/models/graphs/tf/utils.py
84.84% <0.00%> (-3.04%)
:arrow_down:

compy/representations/common.py
85.00% <0.00%> (-2.00%)
:arrow_down:

compy/__init__.py
100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e2bcf4e...f57a3f7. Read the comment docs.


input argument object is mutated

hi all,
It looks like get-pkg-repo is mutating the input argument object. Proof is here: https://runkit.com/embed/wvvbqgicfj9v
Basically, I assigned a real package.json into a variable and cloned it into a second-one. Then ran first through get-pkg-repo feeding it as argument. That was enough for it not to be deepEqual to second-one afterwards.
Either let's fix this or state in the readme that input args will be mutated. This causes issues during unit tests and people should be aware of it.
cheers

The readme states that this depends on normalize-package-data. and if you click on the link you'll know it mutates.

It may help to document that the input is mutated.
Though the usage example, and the wording sort of, demonstrates that the input is mutated by normalize-package-data, but it's not obvious that get-pkg-repo doesn't deep clone the input and avoid the mutation caused by normalize-package-data.

@hbetts That's my point. I guess adding extra deps like lodash.clonedeep would not be a big issue weight-wise, would it?
Having said that, if you guys feel this issue is a dud and don't agree action should be taken, feel free to close it. I already took measures to safeguard my APIs from it; I just want this documented/sorted for posterity.

If I were a maintainer I would have fixed it but documenting this will suffice I guess. Closing.
Having said that, thank you all for maintaining this library. I do appreciate your time and energy spent on this. It's very handy.

I meant that there might be many other hairy details on how they deal with the object. I did it in a generic way, linking them, so that I don't have to duplicate the docs. But I don't mind to add it if requested.


Allow useMachine to accept a new machine between renders

Bug or feature request?
Feature request: @xstate/react
Description:
Currently useMachine accepts only the first machine instance passed to it and logs a warning if a new instance is passed to it between renders. This prevents the use of a dynamically created machine derived from props. One such example is the createrCounterMachine factory function from the context docs. If the initial count is a prop and you intend to create a new machine and interpret whenever the count prop changes, this is not supported.
Workaround
One way around this is to leverage the useService hook as it supports resubscribing to a new service when the instance changes between renders. This is essentially how I am currently handling this. Note that useFirstMountState comes from react-use and is used to prevent overwriting the service created on the first render without stopping it.
const machine = useMemo(() => createrCounterMachine(count), [count]);
const [service, setService] = useState(() => interpret(machine).start());
const [state, send] = useService(service);
const isFirstMount = useFirstMountState();

useEffect(() => {
  if (!isFirstMount) {
    setService(interpret(machine).start());
  }

  return () => {
    service.stop();
  };
}, [machine]);

(Feature) Potential implementation:
The use-case described above could be accomplished in two different ways without an API change.

useMachine subscribes to changes to the context value passed in the options object.
useMachine subscribes to changes to the passed machine.

Although the former is a simpler API for the demonstrated use-case, it would be a breaking change as passing an object literal as the context value would result in the machine being reset between each render.
The latter would likely be a better solution as it is more generic and I believe would not qualify as a breaking change.
One potential solution could also be to introduce a new hook that explicitly supports an updatable machine instance as to avoid any changes in behavior with the existing useMachine hook.
Link to reproduction or proof-of-concept:
https://codesandbox.io/s/use-machine-6jg8j

Hey @jtmthf - this is one of those "can" vs. "should" questions.
Can we allow the machine to be dynamic? Absolutely, it would be very easy to support this.
Should we? Probably not.
Machines that describe the behavior/logic of a component should be as static and deterministic as possible. If we introduce functionality that allows the hot replacement of a machine at any time, then that defeats the entire purpose of using state machines in the first place.

Well, it would be great if we could support preserving the old machine instance (to keep its state) if we could compare the previous and current configs (to check if they are the same) and if they wouldnt be the same then we should force the whole component to reinitialize (with the new machine). This, of course, would only apply to the hot module replacement scenario. I'm not sure though how to hook into it. Also - the described logic actually matches how this works in React (roughly). It tries to keep the old state in a best-effort manner but when it recognizes that it just can't be done then it remounts the component (or refresh the whole page, this im not 100% sure).

@davidkpiano That makes sense. Perhaps I'm not approaching my problem in the correct way. In my situation, the value I need to initialize the context with is provided asynchronously. I imagine suspense will eventually solve this problem, but in the meantime I need to explore alternatives. Would a better solution for this use-case be to provide an internal transition for updating the context?

@jtmthf Here's a more idiomatic way you can alternatively do this:
// if the machine changes, and has a different ID (which it should),
// the component will reinitialize with a new machine.
<MyComponent machine={someMachine} key={someMachine.id} />

// ...

function MyComponent({ machine }) {
  // Just like normal
  const [state, send] = useMachine(machine);

  // ...
}

Another option would be to use useMachine(machine, { context: { ... }}).

@johnnyoshika it works OK because <Subreddit /> is rendered with a key prop. This is perhaps something that should be highlighted in the docs though

@Andarist oh interesting. I was wondering why that key prop was there. That makes sense, thank you!

useMemo did the job for me, similar to this:
const machine = useMemo(
    () =>
      createMachine<MachineContext>(machineDefinition, {
        guards: { ...myGuards },
      }),
    [machineDefinition]
  );

  const [state, send, service] = useMachine(machine, myMachineStub);

@johnnyoshika it works OK because <Subreddit /> is rendered with a key prop. This is perhaps something that should be highlighted in the docs though

@Andarist since the component is rendered with a key prop and the previous component instance is unmounted when name changes anyway, is there a point to calling useMemo there? The benefit of the performance optimization seems slim, if there's any at all (does useMemo's cache survive component remounts? I'm not familiar with the internals).

@Andarist since the component is rendered with a key prop and the previous component instance is unmounted when name changes anyway, is there a point to calling useMemo there?

This useMemo tries to ensure that the machine config stays the same throughout the lifetime of a single instance of this component (so when the key stays the same). Remember that the component might get rerendered for various reasons.
However, useMemo is not the best solution here. It doesn't come with any semantic guarantees. A better approach is to use use-constant or a lazy state pattern:
const [subredditMachine] = useState(() => createSubredditMachine(name))

This useMemo tries to ensure that the machine config stays the same throughout the lifetime of a single instance of this component (so when the key stays the same). Remember that the component might get rerendered for various reasons.

Gotcha. So, in theory, useMemo() here could be called with an empty dependency array, since it's never intended to return a value other than the one it returned upon mount.

However, useMemo is not the best solution here. It doesn't come with any semantic guarantees. A better approach is to use use-constant or a lazy state pattern:

Happy to make a doc PR if that's welcome (in which case, which style should we go for?).

Gotcha. So, in theory, useMemo() here could be called with an empty dependency array, since it's never intended to return a value other than the one it returned upon mount.

Yes. However, as I've mentioned, useMemo doesn't promise you that the returned value will be cached indefinitely even if you use an empty dependency array. That's why I've suggested those other two options.

Happy to make a doc PR if that's welcome (in which case, which style should we go for?).

The useState variant is builtin to React so perhaps we should just recommend that.


Masked and non-masked merge bug fix

Re-running tests

LGTM. Will merge after tests complete.

Masking tests are failing.

The error here is "TypeError: Tensors in list passed to 'values' of 'Concat' Op have types [uint8, float32] that don't all match." (with TF).
I believe a simple cast would fix it. Anyone looking at it? @pdasigi

@fchollet Yes, I will get to it later today. Thanks for the suggestion.

LGTM


Handle case where schedule has no user assigned to it

See issue #92 .

👍

Released with v2.1.17


Build fails because of dependancy on stretchr/testify/assert which depends on unsupported errors.Is

Versions - Latest version - v1.29.0
Please specify real version numbers or git SHAs, not just "Latest" since that changes fairly regularly.

Sarama
Kafka
Go

Configuration
What configuration values are you using for Sarama and Kafka?

Logs

github.com/stretchr/testify/assert
/root/go/pkg/mod/github.com/stretchr/testify@v1.7.0/assert/assertions.go:1704:5: undefined: errors.Is
/root/go/pkg/mod/github.com/stretchr/testify@v1.7.0/assert/assertions.go:1727:6: undefined: errors.Is
/root/go/pkg/mod/github.com/stretchr/testify@v1.7.0/assert/assertions.go:1750:5: undefined: errors.As
/root/go/pkg/mod/github.com/stretchr/testify@v1.7.0/assert/assertions.go:1767:7: undefined: errors.Unwrap
/root/go/pkg/mod/github.com/stretchr/testify@v1.7.0/assert/assertions.go:1771:7: undefined: errors.Unwrap
note: module requires Go 1.13

Problem Description
My app using Sarama v1.29.0 , and am using go.mod. When i am building my app, it seems there is dependancy on github.com/stretchr/testify/assert which has dependancy on unsupported apis and i get undefiend error as shown above.

@onkarbanerjee as per the end of your output:

note: module requires Go 1.13

https://github.com/Shopify/sarama/blob/master/go.mod#L3
Testify is calling the new errors apis that were added in Go 1.13 in 2019 such as errors.Is
We (Sarama) generally follow Go's official release policy which is that "Each major Go release is supported until there are two newer major releases". So we only official declare support for Go 1.15 and 1.16 at the moment as those are the two current major releases that are receiving security patches etc.
I imagine that we continue to work with 1.13 and 1.14, but no earlier releases.
I'd strongly recommend upgrading your Go toolchain to at least Go 1.13 if not 1.15/1.16


NLP and non-English data

Possible convo including the NLP Turing group?
Would like to discuss

low resource NLP tools, how these can be developed with humanities (e.g. cultural expertise) input
historical languages that are not English
multiple languages sources

Useful links:

https://stanfordnlp.github.io/stanza/#links
http://quinndombrowski.com/blog/2020/10/15/whats-word-multilingual-dh-and-english-default
https://newnlp.princeton.edu/
https://arxiv.org/abs/2103.11811

AWESOME YES LET'S DO IT!!

Invitation text: https://hackmd.io/GGuqNbzpS2qGvwh28N5e9w

slides: https://hackmd.io/_7ga9589T8OqQs1F6GWpEA


Toggles in questions cause page to reload from the top

When an admin is creating a screen and toggles something in one of the questions, like "optional" or "address correction", we reload the whole page and the user ends up at the top of the page.  This is a bit annoying from a UX perspective.  Ideally, it would toggle and leave them right where they are in the page.

Actually an issue for more things than just toggles, since we use redirects a lot.

@bion has thoughts about how to make this better.

I used htmx to fix this for the ProgramSettingsEditView, we can do the same here


initial commit for .NET landing page

Proposed changes
Add Getting Started for .NET to docs
Unreleased product version (optional)

Related issues (optional)

@spara Can we add a shortlink from https://pulumi.com/dotnet to this landing page? I'm planning to use this in partner materials like blog posts, docs, slides, etc. (@justinvp can help if needed.)


[Gardenlet] Sync shoot service account discovery metadata into Garden cluster

How to categorize this issue?

/area security
/kind enhancement
This proposal was insiped after several discussions on the topic "Bring your own OIDC compatible provider in the Garden cluster".
Kubernetes cluster can act as an OIDC compatible provider in a sense that they serve OIDC discovery documents. These documents if publicly accessible can be used by other systems to establish trust to such clusters by fetching the public key of the private key that is used to sign service account tokens. These public keys can be then used by external systems to verify that a service account token is issued by a particular cluster and then grant access to the bearer of that token. As example of such integration we can use Google's Workload Indentity Federation with a K8S Cluster.
By default Gardener creates clusters which expose such documents directly through the kube-apiserver. This has several drawbacks:

The kube-apiserver is protected and unless you have annonymous authentication on then the endpoint requires authn.
The certificate used to serve the documents is not signed by a trusted CA.

Gardener also provides means for users to tweak such config and overcome these drawbacks by using the following shoot configurations. Once the issuer of a shoot is changed the user can take over that domain and expose the OIDC metadata documents to the public. This poses another challenge since it requires additional involvement. Some users use istio/nginx igress to do so, others make use of projects like service-account-issuer-discovery, or combination of both.
I propose that we start thinking in the direction of taking ownership of a shoot's issuer. Ideally a central place which can serve all shoots OIDC discovery documents. AFAIK Google is already exposing such information for GKE clusters. URIs look something like https://container.googleapis.com/v1/projects/PROJECT/locations/LOCATION/clusters/NAME/.well-known/openid-configuration. See https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters.well-known/getOpenid-configuration. Mind that on Google side the documentation states "This API is not yet intended for general use, and is not available for all clusters."
What are the benefits?

Users will get out of the box solution which can serve their shoot's OIDC discovery documents. Even for clusters which reside in isolated environments, i.e. are protected by firewalls, have limited access to the outside etc.
The Garden cluster can be easily configured to trust shoot clusters by using Structured Authentication or OIDC Webhook Authenticator without giving regular users access to error prone trust configurations. It would also keep the control in Gardener's hands, i.e. user and groups prefixes will be configured so that overlaping and impersonation is not possible and when a shoot is deleted the trust can be immediatelly broken.
Users will be able to configure workloads in their clusters to directly communicate with the Gardener API, without transporting credentials to that cluster beforehand.

What needs to be done?

Gardenlet should start synchronizing OIDC metadata information for all (or just selected) shoots in the Garden cluster. This can be done in a configmap/secret or some CR in a dedicated namespace. Credential rotation should also be accounted for. Even this step alone will provide with the ability to configure "offline" trust via openidconnect CRs (see example).
Shoots should have an immutable trigger that means "manage my issuer". This should be available for new shoots and shoots that do not make use of custom serviceaccount issuer configs.
A publicly exposed component should be taught to serve the metadata information for all (or selected number) of shoots.

Related requests:

https://github.com/gardener/gardener/issues/8859

@dimityrmirchev Do you maybe have another link/docs where Google gives more details on GKE and this information? The page you referenced says:

This API is not yet intended for general use, and is not available for all clusters.
I would be interested to know:
a.) What does Google mean with "not yet intended for general use"?
b.) For which clusters is that feature available and for which is it not?

I would be interested to know:
a.) What does Google mean with "not yet intended for general use"?
b.) For which clusters is that feature available and for which is it not?

Sadly, I did not find any other documents about this feature in Google docs. I might open a question directly to their support. I also did some experimenting with AKS and EKS.
In AKS it is possible to enable this feature which changes the issuer of a cluster and then this gets served on a central endpoint. Here is the documentation for this feature. They even warn that if enabled this cannot be changed back to disabled state.
For EKS I created a cluster and it seems that they already have this ON by default. I did not find any way to disable/influence it.

I also got back from GCP support. They reached out to their their internal product specialist team and I got informed that the API mentioned in https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters.well-known/getOpenid-configuration is available for general use and also for all clusters. I guess that their documentation is outdated.

Excellent.

We are one of those using the service-account-issuer-discovery and we'll appreciate if we get the out of the box solution from Gardener.
Looking forward to this enhancement.

We are one of those using the service-account-issuer-discovery and we'll appreciate if we get the out of the box solution from Gardener.
Looking forward to this enhancement.

Same from our side. Would be very helpful, if we can enable the service-account-issuer-discovery via shoot spec.

The functionalities are mostly implemented by https://github.com/gardener/gardener/issues/9157

The Garden cluster can be easily configured to trust shoot clusters by using Structured Authentication or OIDC Webhook Authenticator without giving regular users access to error prone trust configurations. It would also keep the control in Gardener's hands, i.e. user and groups prefixes will be configured so that overlaping and impersonation is not possible and when a shoot is deleted the trust can be immediatelly broken.

This part can be achieved but is not automated as of now and is probably out of the scope of this issue, so we can close it for now.
/close


License file

Thank you for the great work. Would you please add a license file?

Thank you for the great work. Would you please add a license file?

Hi, Thank you for your affirmation, I have already added a license file (Apache License 2.0).


Show custom profile fields in users' profiles

Fixes: #2900
This implements for mobile a feature we've had in web for a while, which is to show people's custom profile fields when you're looking at their profile. Doing so also sets us up to pursue #5363, which is an in-development further wrinkle on that feature.

Here's some screenshots. (For the "before", just mentally erase the custom profile fields.) With a real profile on chat.zulip.org:

Following the link gives:

On the my-profile screen (the rightmost tab on the main screen):

(I don't love that placement between the name and the other UI; seems like that'd get annoying when you have a lot of fields set. I'll play around with that.)
On a test account with one of each type of custom profile field:

(I don't love that placement between the name and the other UI; seems like that'd get annoying when you have a lot of fields set. I'll play around with that.)

OK, fixed. Now that screen looks like this:

I.e. instead of showing the custom profile fields itself, it has a "Full profile" button. That button takes you to a profile screen that's just like what other users would see when looking at your profile:

The other screenshots in the description remain the same as in the original revision.

That looks great. Much needed feature.
The only other thing handy thing would be a clickable phone number (tel:0112223344), email<EMAIL_ADDRESS>and possibly other protocols (e.g. viber).
Sorry for a slight off-topic but is it implemented server-side?

Pushed a revision addressing everything but the user display. Looking at that next.

OK, all revised! New screenshot of showing users:

And if the name is real long, it gets cut off with an ellipsis.

It looks like there are two touch targets in UserItem, which I can see highlighted when I press them: one on the whole area covered by the UserItem (first screenshot), one on just the avatar (second screenshot). I think we only need the former, what do you think?

Hmm yeah, agreed, good catch.
I think that's basically an existing issue in UserItem:
    <Touchable onPress={onPress && handlePress}>
      <View style={[styles.listItem, isSelected && componentStyles.selectedRow]}>
        <UserAvatarWithPresenceById
          size={48}
          userId={user.user_id}
          isMuted={isMuted}
          onPress={onPress && handlePress}
        />

So probably best addressed as an independent PR. I can look at that as a follow-up.
(It might be as simple as not passing onPress to the avatar component; but requires testing, as that might instead mean that tapping the avatar doesn't work.)

Also, it looks like we're missing some padding that would give some whitespace between the left edge of the avatar and the left edge of the area covered by the item (see first screenshot).

Hmm yeah, it does look kind of odd when highlighted like that.
I removed the left padding there because with padding, it looked misaligned with other fields. Here it is with 8px horizontal padding, the same as vertical:

Possibly the ideal would be to have it aligned like in this revision, but then the touchable area (that gets highlighted) has some margin to the left?
Yeah, here's a version like that:

I think that works well. I'll post a revision like that.

OK, revision pushed!


inline documentation

Basic inline documentation of the exported functions.

@abhijithch, thanks for doing this!  Not sure I'll have the chance to look soon, but hopefully you'll get a review and merge soon. @hayd, can you take a look?

this looks good to me!  :+1:

Hopefully some constructive comments there. Thanks for the PR!

Thanks @DanielArndt for the comments, will update the PR.

@nalimilan Is there any standard best practices for documentation available anywhere? Its just that I saw the tick in another package and assumed that would be the right way, anyways will change it to four spaces. Thanks.

@abhijithch Unfortunately, I don't know whether there's a style guide yet as regards the docs. I'm mostly taking example on what's in Julia Base.

I've just made a PR to try defining guidelines: https://github.com/JuliaLang/julia/pull/15136

Just a few more comments. This is looking really good!

@nalimilan @DanielArndt @abhijithch should we merge this in?

It would be good if the commits were squashed, although that's probably less necessary with documentation commits (unless they break something).

Sorry, this hadn't fallen off my radar, I've just been super overwhelmed lately. I wanted to give this the solid review it deserves instead of trickling in comments.
I think this can be merged as is. At some point I think it would be worth taking another stab at the compare documentation. It doesn't seem to follow the same tone as the other function docs, but I've been unsuccessful at rewording it so far.
Thanks a lot @abhijithch -- and sorry I slowly trickled in comments. I hope that wasn't too frustrating.

Thanks, this looks good to me after the handful of small points I commented on are fixed. Squashing is a good idea too.

Will update based on @nalimilan 's comments. Thanks a lot for your guidance.


Revert changes done in cstor as part of new error logging format

Description

With this PR https://github.com/openebs/cstor/pull/266, lot of changes related to new error logging format has been added.
cstor repo deviating too much from upstream will make it difficult to keep cstor repo in sync with upstream.
This issue is created to remove the changed related to above mentioned PR.
New error logging format is handled at ZFS/ZPOOL client used in maya repo.


tests: (lvm_setup.yml), don't shrink lvol

when rerunning lvm_setup.yml on existing cluster with OSDs already
deployed, it fails like following:
fatal: [osd0]: FAILED! => changed=false
  msg: Sorry, no shrinking of data-lv2 to 0 permitted.

because we are asking lvol module to create a volume on an empty VG
with size extents = 100%FREE.
The default behavior of lvol is to shrink the volume if the LV's current
size is greater than the requested size.
Given the requested size is calculated like this:
size_requested = size_percent * this_vg['free'] / 100
in our case, it is similar to:
size_requested = 100 * 0 / 100 which basically means 0
So the current LV size is well greater than the requested size which
leads the module to attempt to shrink it to 0 which isn't obviously now
allowed.
Adding shrink: false to the module calls fixes this issue.
Signed-off-by: Guillaume Abrioux<EMAIL_ADDRESS>

jenkins test centos-non_container-update

jenkins test centos-container-all_daemons

jenkins test centos-container-update

jenkins test centos-container-purge

jenkins test centos-non_container-all_daemons

jenkins test centos-container-update

jenkins test centos-non_container-all_daemons

unrelated yum repository failure


Install on linux

The installation guide of linux is missed? How can i find it?

http://mxnet.io/get_started/setup.html


Add -p cfg-raw option

Problem
Most printing options in Sorbet come in pairs:

ast / ast-raw

shows concise / verbose output for ast::Expressions

symbol-table / symbol-table-raw

shows abbreviated names in symbols / shows detailed information about names in symbols

However, there is no such -raw option for cfg.
Proposed solution

We should add cfg-raw as a CFG::showRaw function.
Some things that would be nice to have:

use Name::showRaw to show name kinds like <C <U foo>>
show the names of the CFG instructions, to make it easier for someone to grep for the right instruction (LoadArg and Send, not load_arg x and x.y)

Fixed in #1729


firemonsecuritymanager: New App - Pull Request #1 with Initial Commit

Pull Request #1 with Initial Commit

Closing PR due to failed checks. Something is different with the checks done locally even though the tox.ini was used. More investigation is planned to understand check differences and possibly figure out how to run same checks before PR to splunk-soar-connectors repo.


[BUG] Image Gallery Version API doesn't return ReplicationStatus

Describe the bug
When requesting a Gallery Image Version from the SDK, the ReplicationStatus field is null and there is no way to request that data.
Expected behavior
Able to request the ReplicationStatus field be populated.
Actual behavior (include Exception or Stack Trace)
What is the actual behavior?
To Reproduce
Steps to reproduce the behavior (include a code snippet, screenshot, or any additional information that might help us reproduce the issue)
IAzure azure = ...;
var galleryClient = azure.GalleryImageVersions;
var version = await galleryClient.GetByGalleryImageAsync("ValidResourceGroupName", "ValidGalleryName", "ValidImageName", "ValidImageVersion");

Then inspect:
version.ReplicationStatus;

Environment:

Name and version of the Library package used: Microsoft.Azure.Management.Fluent 1.30.0
Hosting platform or OS and .NET runtime version (dotnet --info output for .NET Core projects): Azure Functions v3 runtime (.NET Core 3.0)
IDE and version : Visual Studio 16.4.5 (2019)

//cc: @yaohaizh

Hi folks, any chance on an ETA for this one? Here or on the open ticket fine.

@xccc-msft  could you help take a look at this issue? Thanks.

@chrisalexander  could provide more information for your assemblies list?

@chrisalexander For now, you can have workaround as below to get ReplicationStatus:
var version = await computeManager.Inner.GalleryImageVersions.GetAsync("ValidResourceGroupName", "ValidGalleryName", "ValidImageName", "ValidImageVersion", ReplicationStatusTypes.ReplicationStatus)

I have nuget package Microsoft.Azure.Management.ResourceManager.Fluent.Core and Microsoft.Azure.Management.Fluent v1.30.0, can you drop me an email if you need more than that and I can provide a project.


Inpaining Model Question

Where are the inpainting models being saved to?
I would like to add a custom inpaining model to the list of '''model_ids'''. Would this be possible?

The downloaded inpainting model is saved in the ".cache/huggingface" path in your home directory in Diffusers format. If you want to use the original Stable Diffusion model, you'll need to convert it first.
To add your Model ID to the Inpainting Model ID list in the Web UI, you need to append your local path to the python list named "model_ids" in the "extensions/sd-webui-inpaint-anything/scripts/main.py" code.

Thank you kindly! I'll give that a shot.
Completely separate question: Is there an option to output a txt files with the inpainted image? No biggie if not.

The generated information, such as the prompt, is included in the PNG file. To view this information, please drag and drop the PNG file into "PNG Info" tab on the Web UI.

Having trouble figuring out where to put the model. I created an inpainting model using the checkpoint merger but can't seem to find where on the drive the inpainting models are kept so I can move it there before adding it to the python script.

Inpainting Model ID

It shows me this:
model_ids = [
"stabilityai/stable-diffusion-2-inpainting",
"Uminosachi/dreamshaper_5-inpainting",
"saik0s/realistic_vision_inpainting",
"Uminosachi/revAnimated_v121Inp-inpainting",
"parlance/dreamlike-diffusion-1.0-inpainting",
"runwayml/stable-diffusion-inpainting",
]
Where are these paths from?
I want to link the Impainting Models I have installed.

I fear I don't understand enough python to do this.

The command in your example is always the same? only the path and the name of the Models change? or there different commands for different models ?

The downloaded inpainting model is saved in the ".cache/huggingface" path in your home directory in Diffusers format.

I haven't been able to locate this directory. What exactly is the "home directory"? I scanned all my drives for a "hugginface" folder and nothing came up that contains the downloaded models.

The downloaded inpainting model is saved in the ".cache/huggingface" path in your home directory in Diffusers format.

I haven't been able to locate this folder. What exactly is the "home directory"? I scanned all my drives for a "hugginface" folder and nothing came up that contains the downloaded models. Can you show what the actual path looks like?

its a hidden Folder for me its in  /home/username/.cache/huggingface/  i am on a Linux machine

The downloaded inpainting model is saved in the ".cache/huggingface" path in your home directory in Diffusers format.

I haven't been able to locate this folder. What exactly is the "home directory"? I scanned all my drives for a "hugginface" folder and nothing came up that contains the downloaded models. Can you show what the actual path looks like?

For Windows, the downloaded models can usually be found in the following directory: "C:\Users\username.cache\huggingface\hub".

C:\Users\username.cache\huggingface\hub.
Thank you! That's where it was. 20gb worth of downloads. Quite a bit for an extension!

@Uminosachi
Please consider to add the path for the cache folder to the settings, I'm usually hosting the larger files on another drive and it's easier to maintain the pathes in settings instead of creating symlinks everywhere.

Due to network reasons, realisticVisionV51 cannot be automatically downloaded_ I have manually downloaded and placed the v51VAE inpainting model in Under 'cache/plugingface/hub', but still unable to use

Due to network reasons, realisticVisionV51 cannot be automatically downloaded_ I have manually downloaded and placed the v51VAE inpainting model in Under 'cache/plugingface/hub', but still unable to use

If you are connected to the internet, please try deleting the models--Uminosachi--realisticVisionV51_v51VAE-inpainting folder in ~/.cache/huggingface/hub, and then run Inpainting.

Is there any plan to add the SDXL inpainting model to the Model ID list for easy download? Thank you

Is there any plan to add the SDXL inpainting model to the Model ID list for easy download? Thank you

I checked out the SDXL inpainting model a while back but decided not to add it to the Inpainting list. The main issue was that it didn't really hold up at resolutions different from 1024x1024. So, as it stands, I'm not planning to include it going forward.

How do I resolve this issue?

If the network is working properly, why does this kind of error still occur?

If the network is working properly, why does this kind of error still occur?


Fix issue where applying httpgrpc tracing middleware results in all HTTP requests having duplicate trace spans

What this PR does:
This PR fixes the issue where applications that use the httpgrpc tracing middleware (through middleware.InitHTTPGRPCMiddleware) would have traces for all incoming HTTP calls duplicated.
For example, note the duplicate HTTP POST - api_v1_push spans in this trace from a Mimir distributor:

The fix changes the HTTP middleware to a gRPC interceptor that is then able to accurately filter incoming requests and apply the additional information only to httpgrpc requests.
One downside of this is that we'll convert the request to a http.Request twice now: once in the interceptor, and again in the httpgrpc handler, but this seems like the neatest solution.
Related: https://github.com/grafana/dskit/pull/353
Which issue(s) this PR fixes:
(none)
Checklist

[x] Tests updated
[x] CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

If you were feeling particularly enterprising, you could figure out how to use the an OTEL tracer in the tests instead of this jaeger one.
The jaeger tracer is the one dskit used to use for opentracing before it was converted to OTEL. It stuck around in this test and maybe others but isn't actually used in the application anymore

Sounds good, I'll take a look at this in a separate PR.


Feature request - Prompt to create/open workspace  for leetcode

When open topic from this extension, it will open/create new file on the current workspace

This will pollute the current workspace and SCM.
Hard to maintain local leetcode code.

Expected:
Prompt user for separate workspace to organize the code per language.

@poppinlp This issue is a little bit related to your previous work: #149. Would you like to have a try?
Basically, we can provide a new setting to set the leetcode workspace path. By default, it's ~/.leetcode. And prompt user to open that workspace if it's not opened when generating leetcode file.

OK. I'll check it out.


Add list method to Python Trace integration test

This makes the test correspond to the NodeJS test in
https://github.com/googleapis/api-client-staging/pull/77

LGTM


Feat: Scraping Unsplash Website Images

Describe the feature
Features would be :

User can enter search query
Can specify the quality of image
will return image links

Add ScreenShots
List of image links
Record

[X] I agree to follow this project's Code of Conduct
[X] I'm a GSSOC 23 contributor
[X] I want to work on this issue

Go ahead @ritik48
Note

Create a separate module for this, as per the folder and project structure
Do not use the `selenium web driver as it is not compatible with all devices as well as cloud platforms.
Before making any changes, check whether the module you want to add already exists. If yes, then add your functionality as a method only else make a separate module and class for it.

All the best 👨💻


Demo site inaccessible

Describe the bug
Opening https://showcase.janus-idp.io/ is currently not possible.
Expected Behavior
It is possible to have a look at the showcase at https://showcase.janus-idp.io/ where one sees how it integrates the various plugins.
What are the steps to reproduce this bug?

Enter https://showcase.janus-idp.io/ into the URL bar of a browser.

@almereyda can you please add more details, like what errors you are getting?
https://showcase.janus-idp.io/ is working ok for me

I'm closing this issues as the showcase seems to be working fine.
@almereyda feel free to reopen, or ping me if you are still having issues

Maybe it was a local network condition. Sorry for the confusion.


Added stream annotation support via @compute_on('stream:#') decorator

This is a tiny change that will add the stream annotation frontend_attribute when usin a compute_on("stream:#") decorator. This feature is intended to be used when trying to implement a collective matrix multiplication "by hand" within a shard_map to be able to better utilize SMs.
During most cublass / cutlass gemm subroutines, not all SMs are utilized by the kernels due to a process called "wave quantization". Essentially what happens is that each gemm kernel will only use SMs until it reaches an amount that is a divisor of the contracting dimension, leaving the other SMs essentially sitting idle. These idle SMs prevent us from getting full performance of our GPUs.
If we want to be able to use these idle SMs in our CM subroutine, we would need to be able to run at least 2 gemms in parallel. That isn't currently possible within a shard_map, as all of the compute kernels get launched on a single cuda stream. By adding this feature, we would be able to explicitly launch these kernels on several streams.
This feature is not yet fully enabled in XLA, and will sit behind a --xla_gpu_experimental_stream_annotation flag for the foreseeable future. When this flag is not enabled, this attribute is just ignored.

Would be nice to include more in the description of why support this! i.e. make the description more fleshed out.

I added the test, updated the description, and changed the startswith checks to look for stream:


✨ use statistics to push filters not supported by arrow

E.g.
Like which is a starts with
Some types we don't push
Test if us prefiltering chunks makes pyarrow filtering faster

the row_groups and filters code can't coexist, filters is more efficient


 I wonder if the precision is related.

I think what is happening is:
Base asset: 416661 sats
Quote asset: 122 USD
https://github.com/tdex-network/tdex-daemon/blob/a557c70d67627e28b148335c899037ac15ccbc88/internal/core/domain/market.go#L384
This line inverts the balanceIn and balanceOut thereby causing balanceOut to equal baseBalance after division, which is now 0.00416661. Since the check later here in OutGivenIn fires when the amount is >= opts.BalanceOut, I think it happens because amount is 1 which is > 0.00416661
https://github.com/tdex-network/tdex-daemon/blob/a557c70d67627e28b148335c899037ac15ccbc88/pkg/marketmaking/formula/pluggable.go#L27

@djkazic something's wrong with the LBTC/FUSD market. I'm not able to retrieve it as for LBTC/USDT:
LBTC / USDT
$ curl -X POST https://tdex.eldamar.icu/v2/market/price -H 'Content-Type: application/json' -d '{"market":{"baseAsset":"6f0279e9ed041c3d710a9f57d0c02928416460c4b722ae3457a11eec381c526d","quoteAsset":"ce091c998b83c78bb71a632313ba3760f1763d9cfcffae02258ffa9865a37bd2"}}'
# {"spotPrice":26349,"minTradableAmount":"1","balance":{"baseAmount":"280234","quoteAmount":"9644808237"}}

LBTC / FUSD
$ curl -X POST https://tdex.eldamar.icu/v2/market/price -H 'Content-Type: application/json' -d '{"market":{"baseAsset":"6f0279e9ed041c3d710a9f57d0c02928416460c4b722ae3457a11eec381c526d","quoteAsset":"0dea022a8a25abb128b42b0f8e98532bc8bd74f8a77dc81251afcc13168acef7"}}'
# {"code":13,"message":"decimal division by 0","details":[]}

From offline discussion, it came out the precisions for the asset pair were wrong due to an alleged bug in the dashboard.
@djkazic would you be so kind to open an issue on the dashboard repo with all the steps to reproduce the problem you experienced with assets precision?