Pytorch support - #276
Open
cpozogonzalez wants to merge 175 commits into
Open
Conversation
…ytorch legacy code
tjarkmiener
requested review from
alexcervino,
nietootein and
tjarkmiener
and removed request for
tjarkmiener
August 27, 2026 10:37
tjarkmiener
dismissed
their stale review
August 27, 2026 10:39
Participation in the code development
tjarkmiener
requested review from
tjarkmiener
and removed request for
tjarkmiener
August 27, 2026 10:40
tjarkmiener
marked this pull request as ready for review
August 27, 2026 10:40
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 36 out of 38 changed files in this pull request and generated 8 comments.
Suppressed comments (4)
ctlearn/tools/train_model.py:306
setup_frameworkis declared without aselfparameter, but is called asself.setup_framework()insetup(). This will raiseTypeError: setup_framework() takes 0 positional arguments but 1 was givenat runtime.
ctlearn/tools/train_model.py:107ctapipe.core.traits.Pathexpects the keyword argumentexists, but the code usesexits. This likely raises aTypeErrorduring import/trait initialization and prevents the tool from running.
This issue also appears on line 303 of the same file.
pyproject.toml:95
- The console-script key
ctlearn-predict-LST1=includes an extra=in the name (ctlearn-predict-LST1=). This will create an incorrectly named entry point (or fail validation), so the expectedctlearn-predict-LST1command won't be installed.
ctlearn/tools/predict_LST1.py:1052 - The
__name__guard uses"main"instead of"__main__", somain()will never run when executing this file directly.
if __name__ == "main":
main()
Comment on lines
94
to
+98
| --LST1PredictionTool.channels=cleaned_relative_peak_time \\ | ||
| --LST1PredictionTool.image_mapper_type=BilinearMapper \\ | ||
| --type_model="/path/to/your/type/ctlearn_model.cpk" \\ | ||
| --energy_model="/path/to/your/energy/ctlearn_model.cpk" \\ | ||
| --cameradirection_model="/path/to/your/direction/ctlearn_model.cpk" \\ | ||
| --type_model="/path/to/your/type/ctlearn_model(.keras/.pth)"" \\ | ||
| --energy_model="/path/to/your/energy/ctlearn_model(.keras/.pth)"" \\ | ||
| --cameradirection_model="/path/to/your/direction/ctlearn_model(.keras/.pth)"" \\ |
Comment on lines
2459
to
+2463
| if __name__ == "mono_tool": | ||
| mono_tool() | ||
|
|
||
| if __name__ == "stereo_tool": | ||
| stereo_tool() | ||
| stereo_tool() |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.
No description provided.