Skip to content

Commit

Permalink
change loggers
Browse files Browse the repository at this point in the history
Signed-off-by: Yotam Perlitz <[email protected]>
  • Loading branch information
perlitz committed Jan 21, 2025
1 parent 7c4db9d commit acd254f
Show file tree
Hide file tree
Showing 2 changed files with 108 additions and 114 deletions.
13 changes: 5 additions & 8 deletions src/unitxt/db_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,14 @@
from abc import ABC, abstractmethod
from typing import Any, List, Optional

import evaluate
import requests
from huggingface_hub import snapshot_download
from requests.exceptions import ConnectionError, ReadTimeout

from .logging_utils import get_logger
from .types import SQLDatabase

# Path to the user's databases cache directory.
# Logger instance.

logger = evaluate.logging.get_logger(__name__)
logger = get_logger()


class DatabaseConnector(ABC):
Expand Down Expand Up @@ -193,9 +190,9 @@ class RemoteDatabaseConnector(DatabaseConnector):
def __init__(self, db_config: SQLDatabase):
super().__init__(db_config)

assert db_config[
"db_id"
], "db_id must be in db_config for RemoteDatabaseConnector"
assert db_config["db_id"], (
"db_id must be in db_config for RemoteDatabaseConnector"
)
self.api_url, self.database_id = (
db_config["db_id"].split(",")[0],
db_config["db_id"].split("db_id=")[-1].split(",")[0],
Expand Down
Loading

0 comments on commit acd254f

Please sign in to comment.