Skip to content
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

ci: Reenable some ExaTrkX tests #3395

Merged
merged 26 commits into from
Dec 6, 2024

Conversation

benjaminhuth
Copy link
Member

@benjaminhuth benjaminhuth commented Jul 16, 2024

These tests should work even though cugraph is not available anymore...

Summary by CodeRabbit

  • New Features

    • Introduced new test jobs for enhanced testing capabilities.
    • Added a new algorithm for converting prototracks to tracks, improving data processing.
  • Bug Fixes

    • Updated input parameters for existing algorithms to ensure consistency and accuracy in data flow.
  • Chores

    • Improved cache management in the CI pipeline for better build efficiency.
    • Updated hash values for test files to reflect recent changes.

@benjaminhuth benjaminhuth marked this pull request as ready for review July 16, 2024 19:33
@benjaminhuth benjaminhuth added this to the next milestone Jul 16, 2024
@benjaminhuth benjaminhuth changed the title do it ci: Reenable some ExaTrkX tests Jul 16, 2024
@andiwand
Copy link
Contributor

don't let your dreams be dreams!

Copy link

github-actions bot commented Jul 16, 2024

📊: Physics performance monitoring for f65d721

Full contents

physmon summary

@paulgessinger paulgessinger modified the milestones: next, v36.0.0 Jul 18, 2024
kodiakhq bot pushed a commit that referenced this pull request Jul 24, 2024
Renable builds, skip tests until issues resolved in #3395.
@github-actions github-actions bot added the Stale label Aug 22, 2024
Copy link

sonarcloud bot commented Aug 22, 2024

@github-actions github-actions bot added the Stale label Sep 21, 2024
@benjaminhuth benjaminhuth removed the Stale label Oct 9, 2024
Copy link

sonarcloud bot commented Oct 9, 2024

@benjaminhuth benjaminhuth marked this pull request as draft October 10, 2024 06:54
@github-actions github-actions bot added the Component - Examples Affects the Examples module label Oct 10, 2024
@benjaminhuth benjaminhuth marked this pull request as ready for review October 10, 2024 21:17
@github-actions github-actions bot added the Stale label Nov 29, 2024
Copy link

coderabbitai bot commented Nov 29, 2024

Walkthrough

Reintroduced in the .gitlab-ci.yml, two test jobs are: test_exatrkx_unittests and test_exatrkx_python. Execute they do, unit tests and Python tests, upon the successful completion of the build_exatrkx job. Updated are the build_linux_ubuntu, build_exatrkx_cpu, and build_exatrkx jobs, with a refined cache key format. Modified is the addExaTrkX function in Examples/Python/python/acts/examples/reconstruction.py to include a new algorithm, PrototracksToTracks, enhancing the conversion of prototracks to tracks.

Changes

File Change Summary
.gitlab-ci.yml - Added jobs: test_exatrkx_unittests, test_exatrkx_python
- Updated jobs: build_linux_ubuntu, build_exatrkx_cpu, build_exatrkx (cache key modified)
Examples/Python/python/acts/examples/reconstruction.py - Updated addExaTrkX method signature (new parameter added)
- Introduced method: PrototracksToTracks (new algorithm)
Examples/Algorithms/TrackFindingExaTrkX/CMakeLists.txt - Added source file: src/createFeatures.cpp to library ActsExamplesTrackFindingExaTrkX
Examples/Python/tests/root_file_hashes.txt - Hash updated for: test_exatrkx[gpu-torch]__performance_track_finding.root

Possibly related PRs

  • feat: Use RootTracksummaryWriter without truth information #3886: The changes in the main PR involve the addition of test jobs related to ExaTrkX, which may be relevant to the modifications in the RootTrackSummaryWriter that enhance its functionality for handling track states and measurements, particularly in scenarios without truth information.

Suggested labels

automerge

Suggested reviewers

  • andiwand

Poem

In the CI pipeline, new tests arise,
Unittests and Python, a welcome surprise.
Prototracks to tracks, a seamless flow,
Enhancements abound, watch the progress grow!
With cache keys refined, efficiency's near,
In code we trust, our path is clear! ✨


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 84b0c4e and 9eca8dc.

📒 Files selected for processing (1)
  • .gitlab-ci.yml (1 hunks)
🔇 Additional comments (1)
.gitlab-ci.yml (1)

145-157: Verify GPU presence before tests run, we must.

Previous wisdom shared, still valid it remains. Before ExaTrkX tests begin, GPU availability check we need. Prevent mysterious failures on non-GPU runners, this will.

   script:
     - source CI/dependencies.sh
+    - nvidia-smi || (echo "GPU not found. Required for ExaTrkX tests." && exit 1)
+    - python3 -c "import torch; assert torch.cuda.is_available(), 'CUDA not available'" || (echo "CUDA support in torch, missing it is." && exit 1)
     - ctest --test-dir build -R ExaTrkX

.gitlab-ci.yml Outdated Show resolved Hide resolved
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (1)
Examples/Python/python/acts/examples/reconstruction.py (1)

1795-1800: Document the selected features, hmm yes.

Mysterious these feature indices [0, 1, 2] are. Documentation for their meaning, add you must. Spatial coordinates (x, y, z) perhaps they represent?

 metricLearningConfig["modelPath"] = str(modelDir / "embed.pt")
-        metricLearningConfig["selectedFeatures"] = [0, 1, 2]
+        # Features: [0, 1, 2] represent spatial coordinates (x, y, z)
+        metricLearningConfig["selectedFeatures"] = [0, 1, 2]  
 filterConfig["modelPath"] = str(modelDir / "filter.pt")
-        filterConfig["selectedFeatures"] = [0, 1, 2]
+        # Features: [0, 1, 2] represent spatial coordinates (x, y, z)
+        filterConfig["selectedFeatures"] = [0, 1, 2]
 gnnConfig["modelPath"] = str(modelDir / "gnn.pt")
 gnnConfig["undirected"] = True
-        gnnConfig["selectedFeatures"] = [0, 1, 2]
+        # Features: [0, 1, 2] represent spatial coordinates (x, y, z)
+        gnnConfig["selectedFeatures"] = [0, 1, 2]
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between fff31f5 and 5365501.

📒 Files selected for processing (1)
  • Examples/Python/python/acts/examples/reconstruction.py (3 hunks)
🔇 Additional comments (3)
Examples/Python/python/acts/examples/reconstruction.py (3)

1832-1839: Approve the new PrototracksToTracks algorithm, I do.

Wisely implemented, this conversion from prototracks to tracks is. The force is strong with this one.


1843-1843: Consistent track input/output naming, maintain we must.

Updated track references in matching configuration, I see. Consistency in the force, this brings.

Also applies to: 1862-1863


Line range hint 1832-1863: Verify the track conversion workflow, we shall.

The path from prototracks to tracks, verify we must. Ensure proper flow of the force through all components.

✅ Verification successful

Verified the track conversion workflow is, hmmmm.

Through the Force, seen I have that proper implementation exists:

  • The PrototracksToTracks algorithm, correctly converts prototracks to tracks it does, using VectorTrackContainer and VectorMultiTrajectory
  • The track matching through TrackTruthMatcher, properly handles the converted tracks it does
  • The track state container, managed correctly throughout the workflow it is

A balanced flow of the Force I sense, from prototracks to tracks, and through the matching process. No disturbances in the implementation detected.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the track conversion workflow

# Check for proper track handling in the codebase
echo "Searching for track conversion usage..."
rg -A 5 "PrototracksToTracks" 

# Check for track matching configurations
echo "Checking track matching configurations..."
rg "inputTracks.*=.*[\"']tracks[\"'].*TrackTruthMatcher"

Length of output: 4565


Script:

#!/bin/bash
# Deeper investigation of the track conversion workflow, we must perform

# Check the implementation of PrototracksToTracks, we shall
echo "Implementation of PrototracksToTracks, examining..."
ast-grep --pattern 'ProcessCode PrototracksToTracks::execute($_) {
  $$$
}'

# Search for track container usage in the codebase, we must
echo "Track container handling, investigating..."
rg -A 5 "VectorTrackContainer" 

# The track matching implementation, inspect we shall
echo "Track matching implementation, searching..."
ast-grep --pattern 'ProcessCode TrackTruthMatcher::execute($_) {
  $$$
}'

Length of output: 73212


Script:

#!/bin/bash
# The implementation of TrackTruthMatcher, find we must
echo "Track truth matching implementation, seeking..."
rg -A 10 "TrackTruthMatcher::execute" 

# The prototrack conversion details, examine we shall
echo "Prototrack conversion details, investigating..."
rg -A 10 "PrototracksToTracks::execute"

# The track state handling, understand we must
echo "Track state handling, searching..."
rg -A 5 "trackStateContainer"

Length of output: 41415

andiwand
andiwand previously approved these changes Dec 6, 2024
Copy link
Contributor

@andiwand andiwand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - one minor comment

Copy link
Contributor

kodiakhq bot commented Dec 6, 2024

This PR currently has a merge conflict. Please resolve this and then re-add the automerge label.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (1)
Examples/Python/python/acts/examples/reconstruction.py (1)

1826-1833: A new algorithm for converting prototracks to tracks, added it is.

The force is strong with this change. A dedicated algorithm for converting prototracks to tracks, implemented it has been. Clear and focused, the implementation is.

Consider adding error handling for cases where measurements are missing or invalid, you should.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 34642ee and 863ef08.

📒 Files selected for processing (1)
  • Examples/Python/python/acts/examples/reconstruction.py (3 hunks)
🔇 Additional comments (2)
Examples/Python/python/acts/examples/reconstruction.py (2)

1789-1794: Hmmmm, feature selection configuration for Torch backend, I see.

Correctly configured, the feature selection is. Three spatial coordinates [0,1,2] for each component, selected they are.


1837-1837: Updated track references in matching and performance components, I observe.

Consistent with the new track conversion flow, these changes are. The track matching and performance components now use the converted tracks instead of prototracks, they do.

Verify the track references, we must:

Also applies to: 1856-1857

✅ Verification successful

Let me examine the actual usage of these references to determine if they are legitimate utility functions or need updating, hmm.


Correct, the review comment is, hmm. Legitimate changes to track references, these are.

The references to prototracks in the codebase, legitimate they are. A clear conversion flow from prototracks to tracks exists, yes. The utility classes PrototracksToTracks, PrototracksToSeeds, and others, handle these conversions they do. The change in track references from prototracks to tracks in the matching and performance components, consistent with this design it is.

In the code, see we do:

  • Prototracks created from various sources (truth tracking, ExaTrkX)
  • Conversion to tracks through PrototracksToTracks algorithm
  • Track matching and performance components using the converted tracks

No issues found in the codebase, there are. The natural flow of track processing, this change follows.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for any remaining references to prototracks that should use tracks
rg -l 'prototracks' | grep -v 'reconstruction.py'

Length of output: 1315


Script:

#!/bin/bash
# Search for actual usage of prototracks in these files to understand the context
rg "prototracks" -A 3 -B 3

Length of output: 28434

Copy link

sonarcloud bot commented Dec 6, 2024

@kodiakhq kodiakhq bot merged commit 12ea68c into acts-project:main Dec 6, 2024
42 checks passed
@github-actions github-actions bot removed the automerge label Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants