-
Notifications
You must be signed in to change notification settings - Fork 15
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
Add pytorch Lightning example #545
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Hi, thanks so much for this. I'm going to spend some time the rest of this week seeing if I can wrap this code into a class similar to the Do you know if there is any reason we wouldn't want to swap over completely? (i.e. what are downsides of using lightning vs just normal pytorch?) |
The short and sweet of it is that there's no reason other than compatability with the way the rest of your repository works.
I had a quick glance through some of the example notebooks, which might need a bit of tailoring to just adjust how the training is called. Other than that should be all good. I would suggest just using the simple script as is to test different models, or finding the best hyperparameters to then put back into the wider workflow.
Glad it's useful. Let me know if you have any questions about ways to test this using HPC.
Best,
Steve
…________________________________
From: Rosie Wood ***@***.***>
Sent: Tuesday, January 7, 2025 1:18 PM
To: maps-as-data/MapReader ***@***.***>
Cc: Mander, Stephen (manders3) ***@***.***>; Author ***@***.***>
Subject: [External] Re: [maps-as-data/MapReader] Add pytorch Lightning example (PR #545)
This email originated outside the University. Check before clicking links or attachments.
Hi, thanks so much for this.
I'm going to spend some time the rest of this week seeing if I can wrap this code into a class similar to the ClassifierContainer so we can essentially swap over to pytorch lightning whilst still following same/similar API.
Do you know if there is any reason we wouldn't want to swap over completely? (i.e. what are downsides of using lightning vs just normal pytorch?)
—
Reply to this email directly, view it on GitHub<#545 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AI25TU4QSRR7DK7V3ZAURZ32JPHYXAVCNFSM6AAAAABUVZ56OCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNZVGI3TOMJRGQ>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Comment redundant lines
Summary
Add Pytorch Lightning Implementation for Classification model. The ambition of this change is to allow rapid developement and evaluation of classifiers using HPC provision, and refactor the framework for scalable deployment.
Describe your changes
The main change is removing the generic pytorch wrappers for iterating over dataloaders, and revising how "phases" is referred to in the code, instead leaning on PTL's implementation of separate train, validation, inference steps. Some other minor refactoring has occurred to remove repeated 'if' statements during each step to aid with pipelining.
Checklist before assigning a reviewer (update as needed)
Reviewer checklist
Please check this conforms to downstream needs in example notebooks.