Merge pull request #420 from topoteretes/fix-profiler
fix: Resolve profiler issue with partial and recursive logger imports
This commit is contained in:
commit
51b209445b
7 changed files with 14 additions and 9 deletions
2
.github/workflows/profiling.yaml
vendored
2
.github/workflows/profiling.yaml
vendored
|
|
@ -94,7 +94,7 @@ jobs:
|
|||
# chmod +x cognee/api/v1/cognify/code_graph_pipeline.py
|
||||
# # Run Scalene
|
||||
# poetry run pyinstrument --renderer json -o head_results.json cognee/api/v1/cognify/code_graph_pipeline.py
|
||||
#
|
||||
|
||||
# # Compare profiling results
|
||||
# - name: Compare profiling results
|
||||
# run: |
|
||||
|
|
|
|||
|
|
@ -2,6 +2,3 @@ from .enrich_dependency_graph import enrich_dependency_graph
|
|||
from .expand_dependency_graph import expand_dependency_graph
|
||||
from .get_non_code_files import get_data_list_for_user, get_non_py_files
|
||||
from .get_repo_file_dependencies import get_repo_file_dependencies
|
||||
import logging
|
||||
|
||||
logger = logging.getLogger("task:repo_processor")
|
||||
|
|
|
|||
|
|
@ -5,7 +5,9 @@ from uuid import NAMESPACE_OID, uuid5
|
|||
from cognee.infrastructure.engine import DataPoint
|
||||
from cognee.shared.CodeGraphEntities import CodeFile, CodePart
|
||||
from cognee.tasks.repo_processor.extract_code_parts import extract_code_parts
|
||||
from cognee.tasks.repo_processor import logger
|
||||
import logging
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def _add_code_parts_nodes_and_edges(code_file: CodeFile, part_type, code_parts) -> None:
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
from typing import Dict, List
|
||||
import parso
|
||||
|
||||
from cognee.tasks.repo_processor import logger
|
||||
import logging
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def _extract_parts_from_module(module, parts_dict: Dict[str, List[str]]) -> Dict[str, List[str]]:
|
||||
|
|
|
|||
|
|
@ -10,7 +10,9 @@ import jedi
|
|||
import parso
|
||||
from parso.tree import BaseNode
|
||||
|
||||
from cognee.tasks.repo_processor import logger
|
||||
import logging
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@contextmanager
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import tiktoken
|
|||
from cognee.infrastructure.engine import DataPoint
|
||||
from cognee.shared.CodeGraphEntities import CodeFile, CodePart, SourceCodeChunk
|
||||
|
||||
logger = logging.getLogger("task:get_source_code_chunks")
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def _count_tokens(tokenizer: tiktoken.Encoding, source_code: str) -> int:
|
||||
|
|
|
|||
|
|
@ -4,7 +4,9 @@ import jedi
|
|||
import parso
|
||||
from tqdm import tqdm
|
||||
|
||||
from . import logger
|
||||
import logging
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
_NODE_TYPE_MAP = {
|
||||
"funcdef": "func_def",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue