Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds lightweight runtime environment signals to LightlyTrain event analytics so events can be tagged as running in CI and/or inside a container.
Changes:
- Extend
_get_system_info()to includeis_ciandis_container. - Implement
_is_ci()and_is_container()heuristics (env vars, marker files,/proc/1/cgroup). - Add unit tests for the new helpers and system info schema.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
src/lightly_train/_events/tracker.py |
Adds CI/container detection and includes the flags in cached system info. |
tests/_events/test_tracker.py |
Adds assertions for the new system info keys and unit tests for CI/container detection. |
added 4 commits
March 20, 2026 12:06
…y-ai/lightly-train into trn-1839-log-ci-container
…y-ai/lightly-train into trn-1839-log-ci-container
Contributor
Author
|
/review |
1 similar comment
Contributor
Author
|
/review |
Contributor
yutong-xiang-97
left a comment
There was a problem hiding this comment.
Left some comments by AI
- Use /proc/self/cgroup instead of /proc/1/cgroup for accurate container detection when host PID namespace is shared - Remove redundant CI env var cleanup in test__is_ci__false (clear=True already handles it) - Add test for _is_ci with empty string value - Add tests for _is_container exception paths (FileNotFoundError, PermissionError) - Use clear=True in Singularity/Apptainer tests for env isolation
yutong-xiang-97
approved these changes
Mar 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What has changed and why?
How has it been tested?
Did you update CHANGELOG.md?
Did you update the documentation?