Skip to content

Pytorch support - #276

Open
cpozogonzalez wants to merge 175 commits into
mainfrom
pytorch_support
Open

Pytorch support#276
cpozogonzalez wants to merge 175 commits into
mainfrom
pytorch_support

Conversation

@cpozogonzalez

Copy link
Copy Markdown
Collaborator

No description provided.

@tjarkmiener
tjarkmiener requested review from alexcervino, nietootein and tjarkmiener and removed request for tjarkmiener August 27, 2026 10:37
@tjarkmiener
tjarkmiener dismissed their stale review August 27, 2026 10:39

Participation in the code development

@tjarkmiener
tjarkmiener requested review from tjarkmiener and removed request for tjarkmiener August 27, 2026 10:40
@tjarkmiener
tjarkmiener marked this pull request as ready for review August 27, 2026 10:40

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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_framework is declared without a self parameter, but is called as self.setup_framework() in setup(). This will raise TypeError: setup_framework() takes 0 positional arguments but 1 was given at runtime.
    ctlearn/tools/train_model.py:107
  • ctapipe.core.traits.Path expects the keyword argument exists, but the code uses exits. This likely raises a TypeError during 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 expected ctlearn-predict-LST1 command won't be installed.
    ctlearn/tools/predict_LST1.py:1052
  • The __name__ guard uses "main" instead of "__main__", so main() will never run when executing this file directly.
if __name__ == "main":
    main()

Comment thread pyproject.toml
Comment thread Dockerfile Outdated
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()
Comment thread ctlearn/tools/keras/train_model.py Outdated
Comment thread ctlearn/tools/pytorch/train_model.py Outdated
Comment thread ctlearn/tools/predict_model.py
Comment thread ctlearn/tools/utils.py Outdated
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants