Skip to content

Error occurs during pgml.train with passive_aggressive algorithm #1308

Open
@HJH0924

Description

@HJH0924

I attempted to execute the following SQL statement to train using the passive_aggressive algorithm:
SELECT * FROM pgml.train('Iris Flower Types', 'classification', 'pgml.iris_view', 'target', 'passive_aggressive');

However, after executing this SQL statement multiple times, I encountered an error with the algorithm. The error message is as follows:
ERROR: called Option::unwrap() on a None value

On the other hand, other algorithms such as SVM and linear regression do not have this issue. I'm unsure if this error is due to a limitation of the algorithm itself or if there are other underlying issues causing it.

Here is the complete replication process:
SELECT * FROM pgml.load_dataset('iris'); # OK
DROP VIEW IF EXISTS pgml.iris_view; # OK
CREATE VIEW pgml.iris_view AS SELECT * FROM pgml.iris ORDER BY random() LIMIT 100; # OK
SELECT * FROM pgml.train('Iris Flower Types', 'classification', 'pgml.iris_view', 'target', 'passive_aggressive'); # OK, deployed is t
SELECT * FROM pgml.train('Iris Flower Types', 'classification', 'pgml.iris_view', 'target', 'passive_aggressive'); # OK, deployed is t
SELECT * FROM pgml.train('Iris Flower Types', 'classification', 'pgml.iris_view', 'target', 'passive_aggressive'); # ERROR: called Option::unwrap() on a None value
SELECT * FROM pgml.train('Iris Flower Types', 'classification', 'pgml.iris_view', 'target', 'passive_aggressive'); # OK, deployed is f
SELECT * FROM pgml.train('Iris Flower Types', 'classification', 'pgml.iris_view', 'target', 'svm'); # OK
SELECT * FROM pgml.train('Iris Flower Types', 'classification', 'pgml.iris_view', 'target', 'svm'); # OK
SELECT * FROM pgml.train('Iris Flower Types', 'classification', 'pgml.iris_view', 'target', 'svm'); # OK
SELECT * FROM pgml.train('Iris Flower Types', 'classification', 'pgml.iris_view', 'target', 'svm'); # OK
SELECT * FROM pgml.train('Iris Flower Types', 'classification', 'pgml.iris_view', 'target', 'svm'); # OK

By the way, my execution environment is
sudo docker run --rm -it -v postgresml_data:/var/lib/postgresql -p 5434:5432 -p 8000:8000 ghcr.io/postgresml/postgresml:2.8.1 sudo -u postgresml psql -d postgresml

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions