Skip to content

Commit bb888a3

Browse files
authored
Merge branch 'main' into easier-benchmark
2 parents 2ad963b + d15203e commit bb888a3

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

codeflash/code_utils/env_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def get_cached_gh_event_data() -> dict[str, Any]:
111111

112112
def is_repo_a_fork() -> bool:
113113
event = get_cached_gh_event_data()
114-
return bool(event.get("repository", {}).get("fork", False))
114+
return bool(event.get("pull_request", {}).get("head", {}).get("repo", {}).get("fork", False))
115115

116116

117117
@lru_cache(maxsize=1)

docs/docs/optimizing-with-codeflash/trace-and-optimize.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ To optimize code called by pytest tests that you could normally run like `python
1717
codeflash optimize -m pytest tests/
1818
```
1919

20-
This powerful command creates high-quality optimizations, making it ideal when you need to optimize a workflow or script. The initial tracing process can be slow, so try to limit your script's runtime to under 1 minute for best results. If your workflow is longer, consider tracing it into smaller sections by using the Codeflash tracer as a context manager (point 3 below).
20+
This powerful command creates high-quality optimizations, making it ideal when you need to optimize a workflow or script. The initial tracing process can be slow, so try to limit your script's runtime to under 1 minute for best results. If your workflow is longer, consider tracing it into smaller sections by using the Codeflash tracer as a context manager (point 3 below).
21+
22+
The generated replay tests and the trace file are for the immediate optimization use, don't add them to git.
2123

2224
## What is the codeflash optimize command?
2325

0 commit comments

Comments
 (0)