Skip to content

Commit 5dbca86

Browse files
committed
remove more debugs
1 parent ca41912 commit 5dbca86

File tree

2 files changed

+1
-16
lines changed

2 files changed

+1
-16
lines changed

codeflash/tracer.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ def main(args: Namespace | None = None) -> ArgumentParser:
8585
outfile = parsed_args.outfile
8686
config, found_config_path = parse_config_file(parsed_args.codeflash_config)
8787
project_root = project_root_from_module_root(Path(config["module_root"]), found_config_path)
88-
print("Config", config)
8988
if len(unknown_args) > 0:
9089
try:
9190
result_pickle_file_path = get_run_tmp_file("tracer_results_file.pkl")
@@ -94,7 +93,6 @@ def main(args: Namespace | None = None) -> ArgumentParser:
9493
"output": str(parsed_args.outfile),
9594
"functions": parsed_args.only_functions,
9695
"disable": False,
97-
"config_file_path": str(parsed_args.codeflash_config),
9896
"project_root": str(project_root),
9997
"max_function_count": parsed_args.max_function_count,
10098
"timeout": parsed_args.tracer_timeout,
@@ -113,9 +111,6 @@ def main(args: Namespace | None = None) -> ArgumentParser:
113111
],
114112
cwd=Path.cwd(),
115113
check=False,
116-
# check=False,
117-
# capture_output=True,
118-
# text=True,
119114
)
120115
try:
121116
with result_pickle_file_path.open(mode="rb") as f:

codeflash/tracing/tracing_new_process.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ def __init__(
6060
output: str = "codeflash.trace",
6161
functions: list[str] | None = None,
6262
disable: bool = False, # noqa: FBT001, FBT002
63-
config_file_path: Path | None = None,
6463
project_root: Path | None = None,
6564
max_function_count: int = 256,
6665
timeout: int | None = None, # seconds
@@ -71,13 +70,11 @@ def __init__(
7170
:param output: The path to the output trace file
7271
:param functions: List of functions to trace. If None, trace all functions
7372
:param disable: Disable the tracer if True
74-
:param config_file_path: Path to the pyproject.toml file, if None then it will be auto-discovered
7573
:param max_function_count: Maximum number of times to trace one function
7674
:param timeout: Timeout in seconds for the tracer, if the traced code takes more than this time, then tracing
7775
stops and normal execution continues. If this is None then no timeout applies
7876
:param command: The command that initiated the tracing (for metadata storage)
7977
"""
80-
print(locals())
8178
if functions is None:
8279
functions = []
8380
if os.environ.get("CODEFLASH_TRACER_DISABLE", "0") == "1":
@@ -110,7 +107,7 @@ def __init__(
110107
f"{self.current_file_path}:Tracer.__enter__",
111108
}
112109
self.max_function_count = max_function_count
113-
self.config, found_config_path = config, config_file_path
110+
self.config = config
114111
self.project_root = project_root
115112
console.rule(f"Project Root: {self.project_root}", style="bold blue")
116113
self.ignored_functions = {"<listcomp>", "<genexpr>", "<dictcomp>", "<setcomp>", "<lambda>", "<module>"}
@@ -798,13 +795,9 @@ def runctx(self, cmd: str, global_vars: dict[str, Any], local_vars: dict[str, An
798795
if __name__ == "__main__":
799796
args_dict = json.loads(sys.argv[-1])
800797
sys.argv = sys.argv[1:-1]
801-
print("Args dict", args_dict)
802-
print("sys.argv ", sys.argv)
803798
if args_dict["module"]:
804799
import runpy
805800

806-
print("running module")
807-
808801
code = "run_module(modname, run_name='__main__')"
809802
globs = {"run_module": runpy.run_module, "modname": args_dict["progname"]}
810803
else:
@@ -819,8 +812,6 @@ def runctx(self, cmd: str, global_vars: dict[str, Any], local_vars: dict[str, An
819812
"__package__": None,
820813
"__cached__": None,
821814
}
822-
print("raw Config", args_dict["config"])
823-
print("raw config type", type(args_dict["config"]))
824815
args_dict["config"]["module_root"] = Path(args_dict["config"]["module_root"])
825816
args_dict["config"]["tests_root"] = Path(args_dict["config"]["tests_root"])
826817
tracer = Tracer(
@@ -829,7 +820,6 @@ def runctx(self, cmd: str, global_vars: dict[str, Any], local_vars: dict[str, An
829820
functions=args_dict["functions"],
830821
max_function_count=args_dict["max_function_count"],
831822
timeout=args_dict["timeout"],
832-
config_file_path=Path(args_dict["config_file_path"]),
833823
command=args_dict["command"],
834824
disable=args_dict["disable"],
835825
result_pickle_file_path=Path(args_dict["result_pickle_file_path"]),

0 commit comments

Comments
 (0)