Skip to content

Commit

Permalink
[LOGGING FIXES]
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name committed Nov 17, 2024
1 parent 54dfa69 commit 14fc0a9
Show file tree
Hide file tree
Showing 26 changed files with 426 additions and 574 deletions.
4 changes: 3 additions & 1 deletion swarms/agents/tool_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

from swarms.structs.agent import Agent
from swarms.tools.json_former import Jsonformer
from swarms.utils.loguru_logger import logger
from swarms.utils.loguru_logger import initialize_logger

logger = initialize_logger(log_folder="tool_agent")


class ToolAgent(Agent):
Expand Down
4 changes: 3 additions & 1 deletion swarms/artifacts/main_artifact.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import time
from swarms.utils.loguru_logger import logger
import os
import json
from typing import List, Union, Dict, Any
from pydantic import BaseModel, Field, validator
from datetime import datetime
from swarms.utils.file_processing import create_file_in_folder
from swarms.utils.loguru_logger import initialize_logger

logger = initialize_logger(log_folder="main_artifact")


class FileVersion(BaseModel):
Expand Down
37 changes: 18 additions & 19 deletions swarms/structs/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from swarms.structs.agent import Agent
from swarms.structs.agents_available import showcase_available_agents
from swarms.structs.auto_swarm import AutoSwarm, AutoSwarmRouter
from swarms.structs.base_structure import BaseStructure
from swarms.structs.base_swarm import BaseSwarm
Expand All @@ -19,15 +20,31 @@
parse_code_completion,
)
from swarms.structs.message import Message

from swarms.structs.mixture_of_agents import MixtureOfAgents
from swarms.structs.multi_agent_collab import MultiAgentCollaboration
from swarms.structs.multi_agent_exec import (
run_agent_with_timeout,
run_agents_concurrently,
run_agents_concurrently_async,
run_agents_concurrently_multiprocess,
run_agents_sequentially,
run_agents_with_different_tasks,
run_agents_with_resource_monitoring,
run_agents_with_tasks_concurrently,
run_single_agent,
)
from swarms.structs.queue_swarm import TaskQueueSwarm
from swarms.structs.rearrange import AgentRearrange, rearrange
from swarms.structs.round_robin import RoundRobinSwarm
from swarms.structs.sequential_workflow import SequentialWorkflow
from swarms.structs.spreadsheet_swarm import SpreadSheetSwarm
from swarms.structs.swarm_arange import SwarmRearrange
from swarms.structs.swarm_net import SwarmNetwork
from swarms.structs.swarm_router import (
SwarmRouter,
SwarmType,
swarm_router,
)
from swarms.structs.swarming_architectures import (
broadcast,
circular_swarm,
Expand Down Expand Up @@ -58,24 +75,6 @@
find_token_in_text,
parse_tasks,
)
from swarms.structs.swarm_router import (
SwarmRouter,
SwarmType,
swarm_router,
)
from swarms.structs.swarm_arange import SwarmRearrange
from swarms.structs.multi_agent_exec import (
run_agents_concurrently,
run_agents_concurrently_async,
run_single_agent,
run_agents_concurrently_multiprocess,
run_agents_sequentially,
run_agents_with_different_tasks,
run_agent_with_timeout,
run_agents_with_resource_monitoring,
run_agents_with_tasks_concurrently,
)
from swarms.structs.agents_available import showcase_available_agents

__all__ = [
"Agent",
Expand Down
4 changes: 3 additions & 1 deletion swarms/structs/base_swarm.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,15 @@
from swarms.structs.agent import Agent
from swarms.structs.conversation import Conversation
from swarms.structs.omni_agent_types import AgentType
from swarms.utils.loguru_logger import logger
from pydantic import BaseModel
from swarms.utils.pandas_utils import (
dict_to_dataframe,
display_agents_info,
pydantic_model_to_dataframe,
)
from swarms.utils.loguru_logger import initialize_logger

logger = initialize_logger(log_folder="base_swarm")


class BaseSwarm(ABC):
Expand Down
4 changes: 3 additions & 1 deletion swarms/structs/base_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
from swarms.structs.agent import Agent
from swarms.structs.base_structure import BaseStructure
from swarms.structs.task import Task
from swarms.utils.loguru_logger import logger
from swarms.utils.loguru_logger import initialize_logger

logger = initialize_logger("base-workflow")


class BaseWorkflow(BaseStructure):
Expand Down
5 changes: 4 additions & 1 deletion swarms/structs/company.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@
from typing import Dict, List, Optional, Union

from swarms.structs.agent import Agent
from swarms.utils.loguru_logger import logger
from swarms.structs.base_swarm import BaseSwarm
from swarms.utils.loguru_logger import initialize_logger


logger = initialize_logger("company-swarm")


@dataclass
Expand Down
Loading

0 comments on commit 14fc0a9

Please sign in to comment.