MilesCranmer / PySR

High-Performance Symbolic Regression in Python and Julia
https://astroautomata.com/PySR
Apache License 2.0
2.09k stars 197 forks source link

[Feature]: How can I use GPU to accelerate training, like deep learning? #454

Closed guoaiBB closed 8 months ago

guoaiBB commented 8 months ago

Feature Request

How can I use GPU to accelerate training, like deep learning? and can partial derivative correlation regression be used for data related to partial differential equations?How can I use GPU to accelerate training, like deep learning? and can partial derivative correlation regression be used for data related to partial differential equations?

MilesCranmer commented 8 months ago

Hi @guoaiBB,

The backend would have to some changes before it would support CUDA natively.

I think basically it would need to be able to store symbolic expressions as some CUDA arrays in a new Node{T}-like type that subtypes AbstractNode: https://github.com/SymbolicML/DynamicExpressions.jl/blob/master/src/Equation.jl. It might be a lot of work FYI.

But, if you're just using CUDA for array evaluation, then it shouldn't be so bad. It might already work (on the Julia side of things). Take a look at https://github.com/JuliaGPU/CUDA.jl.

Cheers, Miles

MilesCranmer commented 8 months ago

Closing in favor of https://github.com/SymbolicML/DynamicExpressions.jl/issues/31

guoaiBB commented 8 months ago

Thank you very much.I have some questions at the moment. I am recently using pysr to perform regression on data where the input x, y, z output is temperature. However, the data volume is relatively large, with 300k rows of data, and the fitting effect is not very good. Could you please give me some advice? In addition, I would like to ask whether pysr can perform regression on partial differential operators, such as data simulated by cfd that solves ns equations. Thank you very much again

Miles Cranmer @.***> 于2023年11月12日周日 22:32写道:

Closed #454 https://github.com/MilesCranmer/PySR/issues/454 as completed.

— Reply to this email directly, view it on GitHub https://github.com/MilesCranmer/PySR/issues/454#event-10934653418, or unsubscribe https://github.com/notifications/unsubscribe-auth/BDVHEOUYHE4BC3IKHSLP6YLYEDMWVAVCNFSM6AAAAAA6ZDP2E2VHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJQHEZTINRVGM2DCOA . You are receiving this because you were mentioned.Message ID: @.***>

MilesCranmer commented 8 months ago

Hi @guoaiBB,

If it's okay with you, could you post your questions separately? Generally I try to keep one topic per issue/discussion so it's easier for people to find if they search it.

For this question in particular, it's good if you could initially check the tuning advice page (https://astroautomata.com/PySR/tuning/) as well as the forums (https://github.com/MilesCranmer/PySR/discussions). If you can't find an answer there then feel free to post a new discussion for help.

(300k rows is too large for PySR; you generally only need 5k max)

Cheers, Miles

guoaiBB commented 8 months ago

Thanks for the tip!

Miles Cranmer @.***> 于2023年11月12日周日 23:34写道:

Hi @guoaiBB https://github.com/guoaiBB,

If it's okay with you, could you post your questions separately? Generally I try to keep one topic per issue/discussion so it's easier for people to find if they search it.

For this question in particular, it's good if you could initially check the tuning advice page (https://astroautomata.com/PySR/tuning/) as well as the forums (https://github.com/MilesCranmer/PySR/discussions). If you can't find an answer there then feel free to post a new discussion for help.

(300k rows is too large for PySR; you generally only need 5k max)

Cheers, Miles

— Reply to this email directly, view it on GitHub https://github.com/MilesCranmer/PySR/issues/454#issuecomment-1807161324, or unsubscribe https://github.com/notifications/unsubscribe-auth/BDVHEOQLE6QCUOXZTQXWE4DYEDT7VAVCNFSM6AAAAAA6ZDP2E2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBXGE3DCMZSGQ . You are receiving this because you were mentioned.Message ID: @.***>