Skip to content
This repository was archived by the owner on Sep 30, 2026. It is now read-only.

Expose ActivityLoggerFactory via public API - #1414

Closed
trichmo wants to merge 8 commits into
pytorch:mainfrom
trichmo:ExposeLoggerFactory
Closed

trichmo wants to merge 8 commits into
pytorch:mainfrom
trichmo:ExposeLoggerFactory

Conversation

@trichmo

@trichmo trichmo commented May 28, 2026

Copy link
Copy Markdown
Contributor

This is a working example of the changes necessary to expose registering a LoggerFactory for custom output formatting of Kineto events on save.

@meta-cla

meta-cla Bot commented May 28, 2026

Copy link
Copy Markdown

Hi @trichmo!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

@meta-cla

meta-cla Bot commented May 28, 2026

Copy link
Copy Markdown

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@meta-cla meta-cla Bot added the cla signed label May 28, 2026
@meta-cla

meta-cla Bot commented May 28, 2026

Copy link
Copy Markdown

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

Comment thread libkineto/include/libkineto.h Resolved
@scotts

scotts commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Thanks, @trichmo! I think adding this to the public API is useful. Let's add some unit tests for the new API.

@trichmo
trichmo marked this pull request as ready for review June 3, 2026 15:31
Comment thread libkineto/include/libkineto.h Resolved
@trichmo

trichmo commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

@scotts It doesn't seem as though thread safety is something kineto is supporting. I had some tests for that but have removed them - if you'd like me to update for thread safety for registerlogger, I have some stashed changes but they touch existing code a bit instead of just an additive pr.

@trichmo

trichmo commented Jun 10, 2026

Copy link
Copy Markdown
Contributor Author

@scotts Can you rerun CI?
I think the failing test should be fixed by pytorch/pytorch#186832
Not sure if your changes also need to land #1428 - I do get these explicitly skipped tests failing locally for me.

@scotts

scotts commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

@trichmo, can you pull the latest to get the CI improvements?

@trichmo
trichmo force-pushed the ExposeLoggerFactory branch from 6a2a430 to 019291c Compare June 10, 2026 16:43
Comment thread libkineto/include/libkineto.h Resolved
@scotts

scotts commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Thanks for the tests! I think we should do a lot less, testing, though. This is a simple addition, I think we should just keep:

  1. BasicPublicAPI
  2. ProtocolCaseInsensitive
  3. UnregisteredProtocolThrows
  4. OverwriteProtocolWarning
  5. BuiltInFileProtocolStillWorks

The rest, I think, are redundant or test unrelated functionality.

@trichmo

trichmo commented Jun 11, 2026

Copy link
Copy Markdown
Contributor Author

Makes sense, trimmed it down. Thanks!

@trichmo
trichmo requested a review from scotts June 12, 2026 14:54
@trichmo

trichmo commented Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

@scotts gentle ping if things look okay, could you kick off CI?
Thanks!

@meta-codesync

meta-codesync Bot commented Jun 22, 2026

Copy link
Copy Markdown

@scotts has imported this pull request. If you are a Meta employee, you can view this in D109304131.

@scotts

scotts commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

@trichmo, this is causing some internal build failures because we're including Logger.h in places that it previously was not included. That indicates we have real problems with that file, but I think in the short term if we can avoid adding it as an include, that would speed up merging. I can try commandeering and fixing later in the week if you're not able to address it.

@meta-codesync meta-codesync Bot closed this in 8279dc0 Jun 24, 2026
@meta-codesync meta-codesync Bot added the Merged label Jun 24, 2026
@meta-codesync

meta-codesync Bot commented Jun 24, 2026

Copy link
Copy Markdown

@scotts merged this pull request in 8279dc0.

pytorchmergebot pushed a commit to pytorch/pytorch that referenced this pull request Jun 30, 2026
Includes the following commits:

- Serialize CUDA/ROCm JSON directly from typed metadata (pytorch/kineto#1455) ab3d5e5
- Address missing OSS license headers (pytorch/kineto#1456) 6662873
- Remove support for old versions of PTI. Rework of PTI error handling. (pytorch/kineto#1405) d5d5c01
- Add MetadataDict for nested metadata fields (pytorch/kineto#1454) 510fde2
- Update XPU test env config (pytorch/kineto#1450) 5d8f827
- Deselect XPU-failing TestProfilerDevice CPU tests (pytorch/kineto#1451) eb66185
- Escape LOG messages in output_json.cpp (pytorch/kineto#1453) 9f6b3f7
- Daily `arc lint --take CLANGFORMAT` (pytorch/kineto#1452) c4eea6b
- Add a visitor class for JSON serialization (pytorch/kineto#1449) b12cc99
- Enable OVERHEAD activity (pytorch/kineto#1441) 3980198
- Make TypedMetadata a visitor interface instead (pytorch/kineto#1448) 594e334
- Avoid CI OOMs by limiting parallel compile jobs (pytorch/kineto#1447) d5f7009
- Adds TypedMetadata.h to get_libkineto_public_headers (pytorch/kineto#1439) 774d10c
- FIx build error by removing unused param (pytorch/kineto#1445) 8341a9e
- Prefix internal controller sync/async methods (pytorch/kineto#1438) b1a1f1e
- Expose ActivityLoggerFactory via public API (pytorch/kineto#1414) 8279dc0
- Guard GenericActivityProfiler teardown against null traceBuffers_ (pytorch/kineto#1443) b7a7b0e
- Finalize pending trace on async profiler teardown (pytorch/kineto#1442) b0ddf1b

Authored-with: Claude (AI assistant)
Pull Request resolved: #188550
Approved by: https://github.com/scotts
vishalgoyal316 pushed a commit to vishalgoyal316/pytorch that referenced this pull request Jul 16, 2026
Includes the following commits:

- Serialize CUDA/ROCm JSON directly from typed metadata (pytorch/kineto#1455) ab3d5e5
- Address missing OSS license headers (pytorch/kineto#1456) 6662873
- Remove support for old versions of PTI. Rework of PTI error handling. (pytorch/kineto#1405) d5d5c01
- Add MetadataDict for nested metadata fields (pytorch/kineto#1454) 510fde2
- Update XPU test env config (pytorch/kineto#1450) 5d8f827
- Deselect XPU-failing TestProfilerDevice CPU tests (pytorch/kineto#1451) eb66185
- Escape LOG messages in output_json.cpp (pytorch/kineto#1453) 9f6b3f7
- Daily `arc lint --take CLANGFORMAT` (pytorch/kineto#1452) c4eea6b
- Add a visitor class for JSON serialization (pytorch/kineto#1449) b12cc99
- Enable OVERHEAD activity (pytorch/kineto#1441) 3980198
- Make TypedMetadata a visitor interface instead (pytorch/kineto#1448) 594e334
- Avoid CI OOMs by limiting parallel compile jobs (pytorch/kineto#1447) d5f7009
- Adds TypedMetadata.h to get_libkineto_public_headers (pytorch/kineto#1439) 774d10c
- FIx build error by removing unused param (pytorch/kineto#1445) 8341a9e
- Prefix internal controller sync/async methods (pytorch/kineto#1438) b1a1f1e
- Expose ActivityLoggerFactory via public API (pytorch/kineto#1414) 8279dc0
- Guard GenericActivityProfiler teardown against null traceBuffers_ (pytorch/kineto#1443) b7a7b0e
- Finalize pending trace on async profiler teardown (pytorch/kineto#1442) b0ddf1b

Authored-with: Claude (AI assistant)
Pull Request resolved: pytorch#188550
Approved by: https://github.com/scotts
aws-kingrj pushed a commit to amazon-contributing/upstream-to-pytorch that referenced this pull request Jul 29, 2026
Includes the following commits:

- Serialize CUDA/ROCm JSON directly from typed metadata (pytorch/kineto#1455) ab3d5e5
- Address missing OSS license headers (pytorch/kineto#1456) 6662873
- Remove support for old versions of PTI. Rework of PTI error handling. (pytorch/kineto#1405) d5d5c01
- Add MetadataDict for nested metadata fields (pytorch/kineto#1454) 510fde2
- Update XPU test env config (pytorch/kineto#1450) 5d8f827
- Deselect XPU-failing TestProfilerDevice CPU tests (pytorch/kineto#1451) eb66185
- Escape LOG messages in output_json.cpp (pytorch/kineto#1453) 9f6b3f7
- Daily `arc lint --take CLANGFORMAT` (pytorch/kineto#1452) c4eea6b
- Add a visitor class for JSON serialization (pytorch/kineto#1449) b12cc99
- Enable OVERHEAD activity (pytorch/kineto#1441) 3980198
- Make TypedMetadata a visitor interface instead (pytorch/kineto#1448) 594e334
- Avoid CI OOMs by limiting parallel compile jobs (pytorch/kineto#1447) d5f7009
- Adds TypedMetadata.h to get_libkineto_public_headers (pytorch/kineto#1439) 774d10c
- FIx build error by removing unused param (pytorch/kineto#1445) 8341a9e
- Prefix internal controller sync/async methods (pytorch/kineto#1438) b1a1f1e
- Expose ActivityLoggerFactory via public API (pytorch/kineto#1414) 8279dc0
- Guard GenericActivityProfiler teardown against null traceBuffers_ (pytorch/kineto#1443) b7a7b0e
- Finalize pending trace on async profiler teardown (pytorch/kineto#1442) b0ddf1b

Authored-with: Claude (AI assistant)
Pull Request resolved: pytorch#188550
Approved by: https://github.com/scotts
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants