Repository navigation
fix(engine): honor ATOM_TORCH_PROFILER_DIR #2925
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
base: main
Are you sure you want to change the base?
Changes from all commits
a806105
167fe0d
d9dd55b
ab725c8
4954cac
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -902,6 +902,9 @@ def _get_engine_kwargs(self) -> dict: | |
| kwargs = { | ||
| f.name: getattr(self, f.name) for f in fields(self) if f.name != "model" | ||
| } | ||
| # Let Config resolve ATOM_TORCH_PROFILER_DIR when no path was supplied. | ||
| if self.torch_profiler_dir is None: | ||
| kwargs.pop("torch_profiler_dir") | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the workaround comment in pd_server_atom.sh is stale now, and it exports a dir on every launch.. please sweep it here
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Swept. The export had a second reader: The profiler itself is unchanged: only |
||
|
|
||
| # Handle special transformations | ||
| kwargs["kv_cache_block_size"] = kwargs.pop("block_size") | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
empty ATOM_TORCH_PROFILER_DIR= now crashes startup, os.makedirs('').. read empty as unset in envs instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done as suggested:
ATOM_TORCH_PROFILER_DIRnow readsos.getenv("ATOM_TORCH_PROFILER_DIR") or Noneinatom/utils/envs.py:771-774,so
ATOM_TORCH_PROFILER_DIR=is indistinguishable from unset and never reachesConfig as
"". Covered bytests/test_envs.py::TestEnvsOverrides::test_empty_torch_profiler_dir_reads_as_unsetand by
test_torch_profiler_dir_handoff[-None-None], which drives the samehand-off as the server. With the envs change reverted, that case fails with
FileNotFoundError: [Errno 2] No such file or directory: ''.