RubixML / ML

A high-level machine learning and deep learning library for the PHP language.
https://rubixml.com
MIT License
2.03k stars 182 forks source link

Dual versions for parallel #332

Closed 27pchrisl closed 4 months ago

27pchrisl commented 4 months ago

Hi @andrewdalpino,

To resolve #305 is it suitable to dual-require parallel versions 1.3 and 2.2, and let Composer choose the right one based on your PHP version?

andrewdalpino commented 4 months ago

Hey thanks @27pchrisl this could very well be a solution but we may have to make some changes to the code itself. See the failed test here https://github.com/RubixML/ML/actions/runs/9035283567/job/24858504227?pr=332 and let me know what you think. Thanks again!

27pchrisl commented 4 months ago

Hiya @andrewdalpino, I created an Amp2 class that the package user can use if they have the v2 of parallel. Essentially a clone of Amp but implementing the newer interface.

27pchrisl commented 4 months ago

I could implement a common abstract class, but it would only really abstract away the constructor and the __toString method, so I have created them completely separately.

andrewdalpino commented 4 months ago

Unfortuantely we don't have the resources to support this at this time. Will look to upgrading to Amp Parallel 2.2 in ML 3.0. Thank you!