Skip to content

Commit

Permalink
Update stack
Browse files Browse the repository at this point in the history
  • Loading branch information
SkibidiProduction committed Feb 3, 2025
1 parent ca59648 commit 0226b3f
Show file tree
Hide file tree
Showing 372 changed files with 7,123 additions and 12,456 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
matrix:
operating-system: [windows-latest, ubuntu-latest, macos-latest]
php-versions: ['8.0', '8.1', '8.2']
php-versions: ['8.4']

steps:
- name: Checkout
Expand Down
18 changes: 9 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"svm", "text mining", "tf-idf", "tf idf", "t-sne", "tsne", "unsupervised learning"
],
"authors": [
{
{
"name": "Andrew DalPino",
"homepage": "https://github.com/andrewdalpino"
},
Expand All @@ -31,32 +31,32 @@
}
],
"require": {
"php": ">=8.0",
"php": ">=8.4",
"ext-json": "*",
"ext-numpower": ">=0.6",
"amphp/parallel": "^1.3",
"andrewdalpino/okbloomer": "^1.0",
"numpower/numpower": "^0.6",
"psr/log": "^1.1|^2.0|^3.0",
"rubix/tensor": "^3.0",
"symfony/polyfill-mbstring": "^1.0",
"symfony/polyfill-php81": "^1.26",
"symfony/polyfill-php82": "^1.27",
"symfony/polyfill-php83": "^1.27",
"wamania/php-stemmer": "^3.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.0",
"phpbench/phpbench": "^1.0",
"phpstan/extension-installer": "^1.0",
"phpstan/phpstan": "^1.0",
"phpstan/phpstan-phpunit": "^1.0",
"phpunit/phpunit": "^9.0",
"phpstan/phpstan": "^2.0",
"phpstan/phpstan-phpunit": "^2.0",
"phpunit/phpunit": "^11.0",
"swoole/ide-helper": "^5.1"
},
"suggest": {
"ext-tensor": "For fast Matrix/Vector computing",
"ext-gd": "For image support",
"ext-mbstring": "For fast multibyte string manipulation",
"ext-svm": "For Support Vector Machine engine (libsvm)"
"ext-svm": "For support Vector Machine engine (libsvm)",
"ext-swoole": "For support Swoole runner"
},
"autoload": {
"psr-4": {
Expand Down
28 changes: 16 additions & 12 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,33 @@
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
backupGlobals="false"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
forceCoversAnnotation="true"
displayDetailsOnTestsThatTriggerDeprecations="true"
displayDetailsOnTestsThatTriggerNotices="true"
displayDetailsOnTestsThatTriggerWarnings="true"
displayDetailsOnTestsThatTriggerErrors="true"
displayDetailsOnSkippedTests="true"
processIsolation="true"
stopOnFailure="false"
testdox="true"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
>
<coverage processUncoveredFiles="true">
<source>
<include>
<directory suffix=".php">src</directory>
</include>
</coverage>
</source>
<testsuites>
<testsuite name="Base">
<directory>tests</directory>
</testsuite>
<testsuite name="Anomaly Detectors">
<directory>tests/AnomalyDetectors</directory>
</testsuite>
<testsuite name="Backends">
<directory>tests/Backends</directory>
</testsuite>
<testsuite name="Base">
<directory>tests/Base</directory>
</testsuite>
<testsuite name="Classifiers">
<directory>tests/Classifiers</directory>
</testsuite>
Expand Down Expand Up @@ -55,7 +56,7 @@
<testsuite name="Loggers">
<directory>tests/Loggers</directory>
</testsuite>
<testsuite name="Neural Net">
<testsuite name="NeuralNet">
<directory>tests/NeuralNet</directory>
</testsuite>
<testsuite name="Persisters">
Expand All @@ -64,14 +65,17 @@
<testsuite name="Regressors">
<directory>tests/Regressors</directory>
</testsuite>
<testsuite name="Serializers">
<directory>tests/Serializers</directory>
</testsuite>
<testsuite name="Specifications">
<directory>tests/Specifications</directory>
</testsuite>
<testsuite name="Strategies">
<directory>tests/Strategies</directory>
</testsuite>
<testsuite name="Tokenizers">
<directory>tests/Transformers</directory>
<directory>tests/Tokenizers</directory>
</testsuite>
<testsuite name="Transformers">
<directory>tests/Transformers</directory>
Expand Down
2 changes: 1 addition & 1 deletion src/AnomalyDetectors/GaussianMLE.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public function type() : EstimatorType
*
* @internal
*
* @return list<\Rubix\ML\DataType>
* @return list<DataType>
*/
public function compatibility() : array
{
Expand Down
4 changes: 2 additions & 2 deletions src/AnomalyDetectors/IsolationForest.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class IsolationForest implements Estimator, Learner, Scoring, Persistable
/**
* The isolation trees that make up the forest.
*
* @var \Rubix\ML\Graph\Trees\ITree[]
* @var ITree[]
*/
protected array $trees = [
//
Expand Down Expand Up @@ -162,7 +162,7 @@ public function type() : EstimatorType
*
* @internal
*
* @return list<\Rubix\ML\DataType>
* @return list<DataType>
*/
public function compatibility() : array
{
Expand Down
2 changes: 1 addition & 1 deletion src/AnomalyDetectors/Loda.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public function type() : EstimatorType
*
* @internal
*
* @return list<\Rubix\ML\DataType>
* @return list<DataType>
*/
public function compatibility() : array
{
Expand Down
2 changes: 1 addition & 1 deletion src/AnomalyDetectors/OneClassSVM.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public function type() : EstimatorType
*
* @internal
*
* @return list<\Rubix\ML\DataType>
* @return list<DataType>
*/
public function compatibility() : array
{
Expand Down
2 changes: 1 addition & 1 deletion src/AnomalyDetectors/RobustZScore.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public function type() : EstimatorType
*
* @internal
*
* @return list<\Rubix\ML\DataType>
* @return list<DataType>
*/
public function compatibility() : array
{
Expand Down
4 changes: 2 additions & 2 deletions src/Backends/Amp.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public function enqueue(Task $task, ?callable $after = null, mixed $context = nu
* @param AmpTask $task
* @param callable(mixed,mixed):void $after
* @param mixed $context
* @return \Generator<\Amp\Promise>
* @return Generator<\Amp\Promise>
*/
public function coroutine(AmpTask $task, ?callable $after = null, mixed $context = null) : Generator
{
Expand Down Expand Up @@ -138,7 +138,7 @@ public function process() : array
*
* @internal
*
* @return \Generator<\Amp\Promise>
* @return Generator<\Amp\Promise>
*/
public function gather() : Generator
{
Expand Down
4 changes: 1 addition & 3 deletions src/Backends/Swoole.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
use Swoole\Atomic;
use Swoole\Process;

use function Swoole\Coroutine\run;

/**
* Swoole
*
Expand Down Expand Up @@ -110,7 +108,7 @@ function (Process $worker) use ($maxMessageLength, $queueItem) {
$currentCpu = ($currentCpu + 1) % $this->cpus;
}

run(function () use ($maxMessageLength, &$results, $workerProcesses) {
Coroutine::run(function () use ($maxMessageLength, &$results, $workerProcesses) {
foreach ($workerProcesses as $index => $workerProcess) {
$status = $workerProcess->wait();

Expand Down
4 changes: 2 additions & 2 deletions src/BootstrapAggregator.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class BootstrapAggregator implements Estimator, Learner, Parallel, Persistable
/**
* The ensemble of estimators.
*
* @var list<\Rubix\ML\Learner>
* @var list<Learner>
*/
protected array $ensemble = [
//
Expand Down Expand Up @@ -136,7 +136,7 @@ public function type() : EstimatorType
*
* @internal
*
* @return list<\Rubix\ML\DataType>
* @return list<DataType>
*/
public function compatibility() : array
{
Expand Down
4 changes: 2 additions & 2 deletions src/Classifiers/AdaBoost.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class AdaBoost implements Estimator, Learner, Probabilistic, Verbose, Persistabl
/**
* The ensemble of *weak* classifiers.
*
* @var \Rubix\ML\Learner[]|null
* @var Learner[]|null
*/
protected ?array $ensemble = null;

Expand Down Expand Up @@ -255,7 +255,7 @@ public function trained() : bool
/**
* Return an iterable progress table with the steps from the last training session.
*
* @return \Generator<mixed[]>
* @return Generator<mixed[]>
*/
public function steps() : Generator
{
Expand Down
2 changes: 1 addition & 1 deletion src/Classifiers/ClassificationTree.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public function type() : EstimatorType
*
* @internal
*
* @return list<\Rubix\ML\DataType>
* @return list<DataType>
*/
public function compatibility() : array
{
Expand Down
2 changes: 1 addition & 1 deletion src/Classifiers/ExtraTreeClassifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public function type() : EstimatorType
*
* @internal
*
* @return list<\Rubix\ML\DataType>
* @return list<DataType>
*/
public function compatibility() : array
{
Expand Down
2 changes: 1 addition & 1 deletion src/Classifiers/GaussianNB.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public function type() : EstimatorType
*
* @internal
*
* @return list<\Rubix\ML\DataType>
* @return list<DataType>
*/
public function compatibility() : array
{
Expand Down
4 changes: 2 additions & 2 deletions src/Classifiers/LogisticRegression.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ public function type() : EstimatorType
*
* @internal
*
* @return list<\Rubix\ML\DataType>
* @return list<DataType>
*/
public function compatibility() : array
{
Expand Down Expand Up @@ -238,7 +238,7 @@ public function trained() : bool
/**
* Return an iterable progress table with the steps from the last training session.
*
* @return \Generator<mixed[]>
* @return Generator<mixed[]>
*/
public function steps() : Generator
{
Expand Down
2 changes: 1 addition & 1 deletion src/Classifiers/LogitBoost.php
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ public function trained() : bool
/**
* Return an iterable progress table with the steps from the last training session.
*
* @return \Generator<mixed[]>
* @return Generator<mixed[]>
*/
public function steps() : Generator
{
Expand Down
8 changes: 4 additions & 4 deletions src/Classifiers/MultilayerPerceptron.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class MultilayerPerceptron implements Estimator, Learner, Online, Probabilistic,
/**
* An array composing the user-specified hidden layers of the network in order.
*
* @var \Rubix\ML\NeuralNet\Layers\Hidden[]
* @var Hidden[]
*/
protected array $hiddenLayers;

Expand Down Expand Up @@ -165,7 +165,7 @@ class MultilayerPerceptron implements Estimator, Learner, Online, Probabilistic,
protected ?array $losses = null;

/**
* @param \Rubix\ML\NeuralNet\Layers\Hidden[] $hiddenLayers
* @param Hidden[] $hiddenLayers
* @param int $batchSize
* @param Optimizer|null $optimizer
* @param int $epochs
Expand Down Expand Up @@ -259,7 +259,7 @@ public function type() : EstimatorType
*
* @internal
*
* @return list<\Rubix\ML\DataType>
* @return list<DataType>
*/
public function compatibility() : array
{
Expand Down Expand Up @@ -304,7 +304,7 @@ public function trained() : bool
/**
* Return an iterable progress table with the steps from the last training session.
*
* @return \Generator<mixed[]>
* @return Generator<mixed[]>
*/
public function steps() : Generator
{
Expand Down
2 changes: 1 addition & 1 deletion src/Classifiers/NaiveBayes.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public function type() : EstimatorType
*
* @internal
*
* @return list<\Rubix\ML\DataType>
* @return list<DataType>
*/
public function compatibility() : array
{
Expand Down
2 changes: 1 addition & 1 deletion src/Classifiers/OneVsRest.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class OneVsRest implements Estimator, Learner, Probabilistic, Parallel, Persista
/**
* A map of each class to its binary classifier.
*
* @var array<\Rubix\ML\Learner>
* @var array<Learner>
*/
protected array $classifiers = [
//
Expand Down
2 changes: 1 addition & 1 deletion src/Classifiers/SVC.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public function type() : EstimatorType
*
* @internal
*
* @return list<\Rubix\ML\DataType>
* @return list<DataType>
*/
public function compatibility() : array
{
Expand Down
4 changes: 2 additions & 2 deletions src/Classifiers/SoftmaxClassifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ public function type() : EstimatorType
*
* @internal
*
* @return list<\Rubix\ML\DataType>
* @return list<DataType>
*/
public function compatibility() : array
{
Expand Down Expand Up @@ -234,7 +234,7 @@ public function trained() : bool
/**
* Return an iterable progress table with the steps from the last training session.
*
* @return \Generator<mixed[]>
* @return Generator<mixed[]>
*/
public function steps() : Generator
{
Expand Down
Loading

0 comments on commit 0226b3f

Please sign in to comment.