Closed k99k5 closed 1 month ago
Swoole 5 + Hyperf
8.3
https://www.php.net/manual/en/migration83.deprecated.php
An error occurred during model execution: Calling FFI::new() statically is deprecated
{ "file": "/www/wwwroot/fc-image/vendor/codewithkyrian/transformers/src/Models/Pretrained/PretrainedModel.php", "line": 311, "function": "make", "class": "Codewithkyrian\Transformers\Exceptions\ModelExecutionException", "type": "::" }, { "file": "/www/wwwroot/fc-image/vendor/codewithkyrian/transformers/src/Models/ModelArchitecture.php", "line": 99, "function": "runSession", "class": "Codewithkyrian\Transformers\Models\Pretrained\PretrainedModel", "type": "->" }, { "file": "/www/wwwroot/fc-image/vendor/codewithkyrian/transformers/src/Models/ModelArchitecture.php", "line": 70, "function": "encoderForward", "class": "Codewithkyrian\Transformers\Models\ModelArchitecture", "type": "->" }, { "file": "/www/wwwroot/fc-image/vendor/codewithkyrian/transformers/src/Models/Pretrained/PretrainedModel.php", "line": 291, "function": "forward", "class": "Codewithkyrian\Transformers\Models\ModelArchitecture", "type": "->" }, { "file": "/www/wwwroot/fc-image/vendor/codewithkyrian/transformers/src/Models/Pretrained/PretrainedModel.php", "line": 280, "function": "forward", "class": "Codewithkyrian\Transformers\Models\Pretrained\PretrainedModel", "type": "->" }, { "file": "/www/wwwroot/fc-image/vendor/codewithkyrian/transformers/src/Pipelines/ImageFeatureExtractionPipeline.php", "line": 48, "function": "__invoke", "class": "Codewithkyrian\Transformers\Models\Pretrained\PretrainedModel", "type": "->" },
...
I modified the dump method in the file vendor/codewithkyrian/transformers/src/Tensor/TensorBuffer.php, and it ran successfully.
System Info
Swoole 5 + Hyperf
PHP Version
8.3
Environment/Platform
Description
https://www.php.net/manual/en/migration83.deprecated.php
An error occurred during model execution: Calling FFI::new() statically is deprecated
{ "file": "/www/wwwroot/fc-image/vendor/codewithkyrian/transformers/src/Models/Pretrained/PretrainedModel.php", "line": 311, "function": "make", "class": "Codewithkyrian\Transformers\Exceptions\ModelExecutionException", "type": "::" }, { "file": "/www/wwwroot/fc-image/vendor/codewithkyrian/transformers/src/Models/ModelArchitecture.php", "line": 99, "function": "runSession", "class": "Codewithkyrian\Transformers\Models\Pretrained\PretrainedModel", "type": "->" }, { "file": "/www/wwwroot/fc-image/vendor/codewithkyrian/transformers/src/Models/ModelArchitecture.php", "line": 70, "function": "encoderForward", "class": "Codewithkyrian\Transformers\Models\ModelArchitecture", "type": "->" }, { "file": "/www/wwwroot/fc-image/vendor/codewithkyrian/transformers/src/Models/Pretrained/PretrainedModel.php", "line": 291, "function": "forward", "class": "Codewithkyrian\Transformers\Models\ModelArchitecture", "type": "->" }, { "file": "/www/wwwroot/fc-image/vendor/codewithkyrian/transformers/src/Models/Pretrained/PretrainedModel.php", "line": 280, "function": "forward", "class": "Codewithkyrian\Transformers\Models\Pretrained\PretrainedModel", "type": "->" }, { "file": "/www/wwwroot/fc-image/vendor/codewithkyrian/transformers/src/Pipelines/ImageFeatureExtractionPipeline.php", "line": 48, "function": "__invoke", "class": "Codewithkyrian\Transformers\Models\Pretrained\PretrainedModel", "type": "->" },
Reproduction
...