MCPcopy
hub / github.com/HKUDS/AI-Researcher / info

Method info

research_agent/inno/logger.py:29–41  ·  view source on GitHub ↗
(self, *args: str, **kwargs: dict)

Source from the content-addressed store, hash-verified

27 color_eos = f"[/{color}]" if color else ""
28 return f"{color_bos}{'*'*single_len} {title} {'*'*single_len}{color_eos}"
29 def info(self, *args: str, **kwargs: dict):
30 # console = Console()
31 timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
32 message = "\n".join(map(str, args))
33 color = kwargs.get("color", "white")
34 title = kwargs.get("title", "INFO")
35 log_str = f"[{timestamp}]\n{message}"
36 if self.debug:
37 # print_in_box(log_str, color=color, title=title)
38 self.console.print(self._wrap_title(title, f"bold {color}"))
39 self.console.print(escape(log_str), highlight=True, emoji=True)
40 log_str = self._wrap_title(title) + "\n" + log_str
41 if self.log_path: self._write_log(log_str)
42 def lprint(self, *args: str, **kwargs: dict):
43 if not self.debug: return
44 timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S")

Callers 15

setup_loggingFunction · 0.80
return_paper_logFunction · 0.80
run_ai_researcherFunction · 0.80
save_env_table_changesFunction · 0.80
clear_log_fileFunction · 0.80
mainFunction · 0.80
process_stepFunction · 0.80
process_paperFunction · 0.80
mainFunction · 0.80
process_input_fileFunction · 0.80
download_papersFunction · 0.80

Calls 3

_wrap_titleMethod · 0.95
_write_logMethod · 0.95
getMethod · 0.80

Tested by 6

train_and_evaluateFunction · 0.64
mainFunction · 0.64
mainFunction · 0.64
train_and_evaluateFunction · 0.64
mainFunction · 0.64
mainFunction · 0.64