Skip to content

Commit

Permalink
fix: switch some info logs into debug
Browse files Browse the repository at this point in the history
  • Loading branch information
raphael0202 committed Jul 18, 2024
1 parent 4942c44 commit 03e8213
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions robotoff/brands.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ def get_brand_prefix() -> set[tuple[str, str]]:
Each tuple has the format (brand_tag, prefix) where prefix is a digit with
13 elements (EAN-13).
"""
logger.info("Loading brand prefix...")
logger.debug("Loading brand prefix...")
return set(tuple(x) for x in load_json(settings.BRAND_PREFIX_PATH, compressed=True)) # type: ignore


@functools.cache
def get_brand_blacklist() -> set[str]:
"""Return the list of brands we want to exclude from automatic detection
through the 'taxonomy' predictor."""
logger.info("Loading brand blacklist...")
logger.debug("Loading brand blacklist...")
return set(text_file_iter(settings.OCR_TAXONOMY_BRANDS_BLACKLIST_PATH))


Expand Down
4 changes: 2 additions & 2 deletions robotoff/logos.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def filter_logos(

@cachetools.cached(cachetools.LRUCache(maxsize=1))
def get_logo_confidence_thresholds() -> dict[LogoLabelType, float]:
logger.info("Loading logo confidence thresholds from DB...")
logger.debug("Loading logo confidence thresholds from DB...")
thresholds = {}

for item in LogoConfidenceThreshold.select().iterator():
Expand Down Expand Up @@ -247,7 +247,7 @@ def knn_search(

@cachetools.cached(cachetools.TTLCache(maxsize=1, ttl=3600)) # 1h
def get_logo_annotations() -> dict[int, LogoLabelType]:
logger.info("Loading logo annotations from DB...")
logger.debug("Loading logo annotations from DB...")
annotations: dict[int, LogoLabelType] = {}

for logo in (
Expand Down
2 changes: 1 addition & 1 deletion robotoff/products.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ def __len__(self):

@classmethod
def load_from_path(cls, path: Path, projection: Optional[list[str]] = None):
logger.info("Loading product store")
logger.debug("Loading product store")

if projection is not None and "code" not in projection:
raise ValueError("at least `code` must be in projection")
Expand Down

0 comments on commit 03e8213

Please sign in to comment.