Skip to content

Commit

Permalink
added step to other loggers
Browse files Browse the repository at this point in the history
  • Loading branch information
ShashankMosaicML committed Feb 3, 2024
1 parent 1627634 commit ae892f5
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
3 changes: 2 additions & 1 deletion composer/loggers/cometml_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ def init(self, state: State, logger: Logger) -> None:
assert self.experiment is not None
self.experiment.set_name(self.name)

def log_table(self, columns: List[str], rows: List[List[Any]], name: str = 'Table') -> None:
def log_table(self, columns: List[str], rows: List[List[Any]], name: str = 'Table', step: Optional[int] = None) -> None:
del step
if self._enabled:
assert self.experiment is not None
try:
Expand Down
3 changes: 2 additions & 1 deletion composer/loggers/console_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ def log_hyperparameters(self, hyperparameters: Dict[str, Any]):
# Lazy logging of hyperparameters.
self.hparams.update(hyperparameters)

def log_table(self, columns: List[str], rows: List[List[Any]], name: str = 'Table') -> None:
def log_table(self, columns: List[str], rows: List[List[Any]], name: str = 'Table', step: Optional[int] = None) -> None:
del step
try:
import pandas as pd
except ImportError as e:
Expand Down
3 changes: 2 additions & 1 deletion composer/loggers/file_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,8 @@ def log_traces(self, traces: Dict[str, Any]):
trace_str + '\n',
)

def log_table(self, columns: List[str], rows: List[List[Any]], name: str = 'Table') -> None:
def log_table(self, columns: List[str], rows: List[List[Any]], name: str = 'Table', step: Optional[int] = None) -> None:
del step
try:
import pandas as pd
except ImportError as e:
Expand Down
3 changes: 2 additions & 1 deletion composer/loggers/in_memory_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ def __init__(self) -> None:
def log_hyperparameters(self, hyperparameters: Dict[str, Any]):
self.hyperparameters.update(hyperparameters)

def log_table(self, columns: List[str], rows: List[List[Any]], name: str = 'Table') -> None:
def log_table(self, columns: List[str], rows: List[List[Any]], name: str = 'Table', step: Optional[int] = None) -> None:
del step
try:
import pandas as pd
except ImportError as e:
Expand Down
3 changes: 2 additions & 1 deletion composer/loggers/mlflow_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,8 @@ def init(self, state: State, logger: Logger) -> None:
def after_load(self, state: State, logger: Logger) -> None:
logger.log_hyperparameters({'mlflow_experiment_id': self._experiment_id, 'mlflow_run_id': self._run_id})

def log_table(self, columns: List[str], rows: List[List[Any]], name: str = 'Table') -> None:
def log_table(self, columns: List[str], rows: List[List[Any]], name: str = 'Table', step: Optional[int] = None) -> None:
del step
if self._enabled:
try:
import pandas as pd
Expand Down

0 comments on commit ae892f5

Please sign in to comment.