Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error occurs during pgml.train with passive_aggressive algorithm #1308

Open
HJH0924 opened this issue Jan 31, 2024 · 0 comments
Open

Error occurs during pgml.train with passive_aggressive algorithm #1308

HJH0924 opened this issue Jan 31, 2024 · 0 comments

Comments

@HJH0924
Copy link

HJH0924 commented Jan 31, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant