🧹 Generalize _create_edges_from_inputs logic in tracers#5
🧹 Generalize _create_edges_from_inputs logic in tracers#5harshithluc073 wants to merge 1 commit intomainfrom
_create_edges_from_inputs logic in tracers#5Conversation
Moved the duplicated `_create_edges_from_inputs` logic from `TensorFlowTracer` and `PyTorchTracer` to the `BaseTracer`. Added `_is_framework_tensor` and `_tensor_to_metadata` abstract methods to ensure flexible integration of framework-specific checks. This removes duplication and simplifies maintainability across all tracer implementations. Co-authored-by: harshithluc073 <101515387+harshithluc073@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
🎯 What: The duplicated logic in
_create_edges_from_inputsforPyTorchTracerandTensorFlowTracerwas generalized and moved to theBaseTracerclass.💡 Why: This improves code maintainability by reducing repetition and allowing future framework-specific tracers to inherit this behavior with minimal code (only implementing
_is_framework_tensorand_tensor_to_metadata).✅ Verification: Ran pytest tests for
pytorch_tracer,profiling, andgraphto ensure no functionality is broken and metadata generation remains correct. Ensure framework imports remain lazy to preventNameError.✨ Result: Improved maintainability of execution graph generation without changing its logic or introducing framework dependency conflicts.
PR created automatically by Jules for task 17416755554038460557 started by @harshithluc073