Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logger branch #35

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open

Conversation

KevorkSulahian
Copy link

Usage:
The logger is initialized with a name and a parallel context, and it offers standard logging methods (info, warning, debug, error) with additional parameters for rank and parallel mode.

Example:

logger = DistributedLogger("example_logger", parallel_context)
logger.info("Information message", rank=0, parallel_mode=ParallelMode.GLOBAL) # Assuming rank is 0 in parallel_context
logger.warning("This is a WARNING message", parallel_mode=ParallelMode.GLOBAL)
logger.debug("This is a DEBUG message", parallel_mode=ParallelMode.GLOBAL)
logger.error("This is an ERROR message", parallel_mode=ParallelMode.GLOBAL)

The logger's behavior, such as which messages are logged and where they are saved, is determined by the rank and parallel mode passed to these methods.

@KevorkSulahian
Copy link
Author

Right now the when calling the logger it's saving the messages in logs/{self.name}.txt and separating the logs with a comma

@KevorkSulahian KevorkSulahian mentioned this pull request Nov 15, 2023
2 tasks
@KevorkSulahian
Copy link
Author

KevorkSulahian commented Nov 26, 2023

I was able to add the unit test @xrsrke

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant