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

Project does not exist: mongo_datasource #9086

Open
vimalprakashts opened this issue Apr 16, 2024 · 6 comments
Open

Project does not exist: mongo_datasource #9086

vimalprakashts opened this issue Apr 16, 2024 · 6 comments
Assignees

Comments

@vimalprakashts
Copy link

vimalprakashts commented Apr 16, 2024

I am trying to install mindsdb and run the example give in this page : https://docs.mindsdb.com/sql/tutorials/text-sentiment-hf

Dockerfile I have used

FROM mindsdb/mindsdb
RUN pip3 install lightwood

In this -> https://docs.mindsdb.com/sql/tutorials/text-sentiment-hf

Connect a database step is works.

but Create a Hugging Face model step giving me the following error.

CREATE MODEL sentiment_classifier
PREDICT sentiment
USING
   engine='huggingface',
   model_name= 'cardiffnlp/twitter-roberta-base-sentiment',
   task='text-classification',
   input_column = 'comment',
   labels=['negative','neutral','positive'];

Error

2024-04-16 09:45:38,652            http ERROR    mindsdb.api.http.namespaces.sql: Error profiling query: 
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/mindsdb/api/http/namespaces/sql.py", line 49, in post
    result = mysql_proxy.process_query(query)
  File "/usr/local/lib/python3.10/site-packages/mindsdb/utilities/profiler/profiler.py", line 141, in wrapper
    result = function(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/mindsdb/api/mysql/mysql_proxy/mysql_proxy.py", line 527, in process_query
    executor.query_execute(sql)
  File "/usr/local/lib/python3.10/site-packages/mindsdb/utilities/profiler/profiler.py", line 141, in wrapper
    result = function(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/mindsdb/api/mysql/mysql_proxy/executor/mysql_executor.py", line 115, in query_execute
    self.do_execute()
  File "/usr/local/lib/python3.10/site-packages/mindsdb/utilities/profiler/profiler.py", line 141, in wrapper
    result = function(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/mindsdb/api/mysql/mysql_proxy/executor/mysql_executor.py", line 168, in do_execute
    ret = self.command_executor.execute_command(self.query)
  File "/usr/local/lib/python3.10/site-packages/mindsdb/utilities/profiler/profiler.py", line 141, in wrapper
    result = function(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/mindsdb/api/executor/command_executor.py", line 610, in execute_command
    return self.answer_create_predictor(statement, database_name)
  File "/usr/local/lib/python3.10/site-packages/mindsdb/utilities/functions.py", line 91, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/mindsdb/api/executor/command_executor.py", line 1523, in answer_create_predictor
    df = self.session.model_controller.create_model(statement, ml_handler)
  File "/usr/local/lib/python3.10/site-packages/mindsdb/interfaces/model/model_controller.py", line 296, in create_model
    raise EntityNotExistsError('Project does not exist', params['project_name'])
mindsdb.utilities.exception.EntityNotExistsError: Project does not exist: mongo_datasource
@ZoranPandovski
Copy link
Member

ZoranPandovski commented Apr 16, 2024

This is strange the error you got is unrelated to the query you are running. Quick question: why did you install Lightwood if you need to use Hugging Face? You should pull the Hugging Face image:

docker pull mindsdb/mindsdb:v24.4.3.0-huggingface

Can you try with this new image tag?

@ZoranPandovski ZoranPandovski self-assigned this Apr 16, 2024
@vimalprakashts
Copy link
Author

sorry my bad, wrong docker image posted here.

I have tried with your suggestions. I have cleared all my running docker container and deleted the local directory. and then i have executed the following commands

Step 1.

docker run --name mindsdb_container -p 47334:47334 -p 47335:47335 -p 47336:47336 -v $(pwd)/mdb_data_02:/root/mdb_storage mindsdb/mindsdb:v24.4.3.0-huggingface

Step 2.

Opened this URL in http://127.0.0.1:47334/ in the browser

Step 3.

followed this page steps : https://docs.mindsdb.com/sql/tutorials/text-sentiment-hf

CREATE DATABASE example_db
WITH ENGINE = "postgres",
PARAMETERS = {
    "user": "demo_user",
    "password": "demo_password",
    "host": "samples.mindsdb.com",
    "port": "5432",
    "database": "demo",
    "schema": "demo_data"
    };
SELECT *
FROM example_db.user_comments;
  • above commands are working

image

Step 4.

CREATE MODEL sentiment_classifier
PREDICT sentiment
USING
   engine='huggingface',
   model_name= 'cardiffnlp/twitter-roberta-base-sentiment',
   task='text-classification',
   input_column = 'comment',
   labels=['negative','neutral','positive'];

this command give following error

image

Now I have checked the docker logs , here is my log

2024-04-16 17:36:03,478            http ERROR    mindsdb.api.http.namespaces.sql: Error profiling query: 
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/mindsdb/api/http/namespaces/sql.py", line 49, in post
    result = mysql_proxy.process_query(query)
  File "/usr/local/lib/python3.10/site-packages/mindsdb/utilities/profiler/profiler.py", line 141, in wrapper
    result = function(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/mindsdb/api/mysql/mysql_proxy/mysql_proxy.py", line 527, in process_query
    executor.query_execute(sql)
  File "/usr/local/lib/python3.10/site-packages/mindsdb/utilities/profiler/profiler.py", line 141, in wrapper
    result = function(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/mindsdb/api/mysql/mysql_proxy/executor/mysql_executor.py", line 115, in query_execute
    self.do_execute()
  File "/usr/local/lib/python3.10/site-packages/mindsdb/utilities/profiler/profiler.py", line 141, in wrapper
    result = function(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/mindsdb/api/mysql/mysql_proxy/executor/mysql_executor.py", line 168, in do_execute
    ret = self.command_executor.execute_command(self.query)
  File "/usr/local/lib/python3.10/site-packages/mindsdb/utilities/profiler/profiler.py", line 141, in wrapper
    result = function(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/mindsdb/api/executor/command_executor.py", line 610, in execute_command
    return self.answer_create_predictor(statement, database_name)
  File "/usr/local/lib/python3.10/site-packages/mindsdb/utilities/functions.py", line 91, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/mindsdb/api/executor/command_executor.py", line 1523, in answer_create_predictor
    df = self.session.model_controller.create_model(statement, ml_handler)
  File "/usr/local/lib/python3.10/site-packages/mindsdb/interfaces/model/model_controller.py", line 296, in create_model
    raise EntityNotExistsError('Project does not exist', params['project_name'])
mindsdb.utilities.exception.EntityNotExistsError: Project does not exist: mongo_datasource

Here is my full log,

docker run  --name mindsdb_container -p 47334:47334 -p 47335:47335 -p 47336:47336 -v $(pwd)/mdb_data_02:/root/mdb_storage mindsdb/mindsdb:v24.4.3.0-huggingface
[nltk_data] Downloading package punkt to /root/nltk_data...
[nltk_data]   Unzipping tokenizers/punkt.zip.
2024-04-16 17:26:56,569     MainProcess INFO     mindsdb: ✓ telemetry enabled
2024-04-16 17:26:56,681     MainProcess INFO     alembic.runtime.migration: Context impl SQLiteImpl.
2024-04-16 17:26:56,681     MainProcess INFO     alembic.runtime.migration: Will assume non-transactional DDL.
2024-04-16 17:26:56,709     MainProcess INFO     mindsdb.migrations.migrate: Migrations are available. Applying updates to the database.
2024-04-16 17:26:56,712     MainProcess INFO     alembic.runtime.migration: Context impl SQLiteImpl.
2024-04-16 17:26:56,712     MainProcess INFO     alembic.runtime.migration: Will assume non-transactional DDL.
2024-04-16 17:26:56,765     MainProcess INFO     alembic.runtime.migration: Running upgrade  -> 17c3d2384711
2024-04-16 17:26:56,775     MainProcess INFO     alembic.autogenerate.compare: Detected added table 'ai_table'
2024-04-16 17:26:56,775     MainProcess INFO     alembic.autogenerate.compare: Detected added table 'datasource'
2024-04-16 17:26:56,775     MainProcess INFO     alembic.autogenerate.compare: Detected added table 'integration'
2024-04-16 17:26:56,776     MainProcess INFO     alembic.autogenerate.compare: Detected added table 'log'
2024-04-16 17:26:56,776     MainProcess INFO     alembic.autogenerate.compare: Detected added table 'predictor'
2024-04-16 17:26:56,776     MainProcess INFO     alembic.autogenerate.compare: Detected added table 'semaphor'
2024-04-16 17:26:56,776     MainProcess INFO     alembic.autogenerate.compare: Detected added table 'stream'
2024-04-16 17:26:56,905     MainProcess INFO     alembic.runtime.migration: Running upgrade 17c3d2384711 -> 47f97b83cee4, views
2024-04-16 17:26:56,938     MainProcess INFO     alembic.runtime.migration: Running upgrade 47f97b83cee4 -> 27c5aca9e47e, db files
2024-04-16 17:26:57,105     MainProcess INFO     alembic.runtime.migration: Running upgrade 27c5aca9e47e -> d74c189b87e6, predictor-integration
2024-04-16 17:26:57,269     MainProcess INFO     alembic.runtime.migration: Running upgrade d74c189b87e6 -> 999bceb904df, integration-args
2024-04-16 17:26:57,305     MainProcess INFO     alembic.runtime.migration: Running upgrade 999bceb904df -> b5b53e0ea7f8, training_data_rows_columns_count
2024-04-16 17:26:57,346     MainProcess INFO     alembic.runtime.migration: Running upgrade b5b53e0ea7f8 -> 6e834843e7e9, training_time
2024-04-16 17:26:57,395     MainProcess INFO     alembic.runtime.migration: Running upgrade 6e834843e7e9 -> 976f15a37e6a, predictors-versioning
2024-04-16 17:26:57,435     MainProcess INFO     alembic.runtime.migration: Running upgrade 976f15a37e6a -> 6a54ba55872e, view_integration
2024-04-16 17:26:57,497     MainProcess INFO     alembic.runtime.migration: Running upgrade 6a54ba55872e -> 473e8f239481, straighten
2024-04-16 17:26:57,543     MainProcess INFO     alembic.runtime.migration: Running upgrade 473e8f239481 -> 96d5fef10caa, data_integration_id
2024-04-16 17:26:57,585     MainProcess INFO     alembic.runtime.migration: Running upgrade 96d5fef10caa -> 87b2df2b83e1, predictor-status
2024-04-16 17:26:57,611     MainProcess INFO     alembic.runtime.migration: Running upgrade 87b2df2b83e1 -> 3d5e70105df7, content_storage
2024-04-16 17:26:57,656     MainProcess INFO     alembic.runtime.migration: Running upgrade 3d5e70105df7 -> cada7d2be947, json_storage
2024-04-16 17:26:57,733     MainProcess INFO     alembic.runtime.migration: Running upgrade cada7d2be947 -> 43c52d23845a, projects
2024-04-16 17:26:57,811     MainProcess INFO     alembic.runtime.migration: Running upgrade 43c52d23845a -> 1e60096fc817, predictor_version
2024-04-16 17:26:57,844     MainProcess INFO     alembic.runtime.migration: Running upgrade 1e60096fc817 -> d429095b570f, data-integration-id
2024-04-16 17:26:57,926     MainProcess INFO     alembic.runtime.migration: Running upgrade d429095b570f -> 459218b0844c, fix_unique_constraint
2024-04-16 17:26:57,986     MainProcess INFO     alembic.runtime.migration: Running upgrade 459218b0844c -> b6d0a47294ac, jobs
2024-04-16 17:26:58,019     MainProcess INFO     alembic.runtime.migration: Running upgrade b6d0a47294ac -> ee63d868fa84, predictor_integration_null
2024-04-16 17:26:58,072     MainProcess INFO     alembic.runtime.migration: Running upgrade ee63d868fa84 -> 3154382dab17, training_progress
2024-04-16 17:26:58,121     MainProcess INFO     alembic.runtime.migration: Running upgrade 3154382dab17 -> ef04cdbe51ed, jobs_user_class
2024-04-16 17:26:58,143     MainProcess INFO     alembic.runtime.migration: Running upgrade ef04cdbe51ed -> b8be148dbc85, jobs_history_query
2024-04-16 17:26:58,194     MainProcess INFO     alembic.runtime.migration: Running upgrade b8be148dbc85 -> 6d748f2c7b0b, remove streams
2024-04-16 17:26:58,220     MainProcess INFO     alembic.runtime.migration: Running upgrade 6d748f2c7b0b -> aaecd7012a78, chatbot
2024-04-16 17:26:58,241     MainProcess INFO     alembic.runtime.migration: Running upgrade aaecd7012a78 -> 9d6271bb2c38, update_chat_bots_table
2024-04-16 17:26:58,270     MainProcess INFO     alembic.runtime.migration: Running upgrade 9d6271bb2c38 -> b5bf593ba659, create_chat_bots_history_table
2024-04-16 17:26:58,292     MainProcess INFO     alembic.runtime.migration: Running upgrade b5bf593ba659 -> 607709e1615b, update_project_names
2024-04-16 17:26:58,310     MainProcess INFO     alembic.runtime.migration: Running upgrade 607709e1615b -> a57506731839, triggers
2024-04-16 17:26:58,352     MainProcess INFO     alembic.runtime.migration: Running upgrade a57506731839 -> ad04ee0bd385, chatbot_to_task
2024-04-16 17:26:58,393     MainProcess INFO     alembic.runtime.migration: Running upgrade ad04ee0bd385 -> d44ab65a6a35, add_agents_table
2024-04-16 17:26:58,415     MainProcess INFO     alembic.runtime.migration: Running upgrade d44ab65a6a35 -> 4c26ad04eeaa, add_skills_table
2024-04-16 17:26:58,435     MainProcess INFO     alembic.runtime.migration: Running upgrade 4c26ad04eeaa -> e187961e844a, add agent_skills_table
2024-04-16 17:26:58,466     MainProcess INFO     alembic.runtime.migration: Running upgrade e187961e844a -> f16d4ab03091, add_agent_id
2024-04-16 17:26:58,500     MainProcess INFO     alembic.runtime.migration: Running upgrade f16d4ab03091 -> 011e6f2dd9c2, backfill_agent_id
2024-04-16 17:26:58,521     MainProcess INFO     alembic.runtime.migration: Running upgrade 011e6f2dd9c2 -> b0382f5be48d, predictor-hostname
2024-04-16 17:26:58,545     MainProcess INFO     alembic.runtime.migration: Running upgrade b0382f5be48d -> 6cb02dfd7f61, query_context
2024-04-16 17:26:58,577     MainProcess INFO     alembic.runtime.migration: Running upgrade 6cb02dfd7f61 -> 309db3d07cf4, add knowledge base
2024-04-16 17:26:58,604     MainProcess INFO     alembic.runtime.migration: Running upgrade 309db3d07cf4 -> c67822e96833, jobs_active
2024-04-16 17:26:58,627     MainProcess INFO     alembic.runtime.migration: Running upgrade c67822e96833 -> 4b3c9d63e89c, predictor_index
2024-04-16 17:26:58,671     MainProcess INFO     alembic.runtime.migration: Running upgrade 4b3c9d63e89c -> 5a5c49313e52, job_condition
2024-04-16 17:26:58,707     MainProcess INFO     alembic.runtime.migration: Running upgrade 5a5c49313e52 -> 9461892bd889, llm_log
2024-04-16 17:26:58,735     MainProcess INFO     mindsdb: Version: 24.4.3.0
2024-04-16 17:26:58,735     MainProcess INFO     mindsdb: Configuration file: /root/mindsdb_config.json
2024-04-16 17:26:58,735     MainProcess INFO     mindsdb: Storage path: /root/mdb_storage
2024-04-16 17:26:58,735     MainProcess INFO     mindsdb: Some handlers cannot be imported. You can check list of available handlers by execute command in sql editor:
select * from information_schema.handlers;
2024-04-16 17:26:59,081     MainProcess INFO     mindsdb: http API: starting...
2024-04-16 17:26:59,093     MainProcess INFO     mindsdb: mysql API: starting...
2024-04-16 17:26:59,094     MainProcess INFO     mindsdb: mongodb API: starting...
2024-04-16 17:26:59,095     MainProcess INFO     mindsdb: jobs API: starting...
2024-04-16 17:26:59,096     MainProcess INFO     mindsdb: tasks API: starting...
2024-04-16 17:27:00,130            jobs INFO     mindsdb.interfaces.jobs.scheduler: Jobs API is starting..
2024-04-16 17:27:00,145            jobs INFO     mindsdb.interfaces.jobs.scheduler: Scheduler starts
2024-04-16 17:27:05,950           mysql INFO     mindsdb.api.mysql.start: MySQL API is starting..
2024-04-16 17:27:05,998         mongodb INFO     mindsdb.api.mongo.start: Mongo API is starting..
2024-04-16 17:27:08,034           mysql INFO     mindsdb.api.mysql.mysql_proxy.mysql_proxy: Starting MindsDB Mysql proxy server on tcp://0.0.0.0:47335
2024-04-16 17:27:08,034           mysql INFO     mindsdb.api.mysql.mysql_proxy.mysql_proxy: Waiting for incoming connections...
2024-04-16 17:27:08,045            http INFO     mindsdb.api.http.initialize:  - GUI available at http://127.0.0.1:47334/
2024-04-16 17:27:08,232     MainProcess INFO     mindsdb: mongodb API: started on 47336
2024-04-16 17:27:08,233     MainProcess INFO     mindsdb: mysql API: started on 47335
2024-04-16 17:27:09,329            http INFO     mindsdb.api.http.gui: New version of GUI available (4.24). Downloading...
2024-04-16 17:27:36,766            http INFO     mindsdb.api.http.gui: GUI version updated to 4.24
2024-04-16 17:27:37,052     MainProcess INFO     mindsdb: http API: started on 47334
2024-04-16 17:28:06,680            http INFO     mindsdb.interfaces.database.integrations: IntegrationController.get_handler: create a client to db service of files type, args - {'name': 'files', 'integration_id': 11, 'connection_data': {}, 'file_storage': <mindsdb.interfaces.storage.fs.FileStorage object at 0xffff519b06d0>, 'handler_storage': <mindsdb.interfaces.storage.model_fs.HandlerStorage object at 0xffff50686c50>, 'file_controller': <mindsdb.interfaces.file.file_controller.FileController object at 0xffff50686d70>}
2024-04-16 17:28:06,682            http INFO     mindsdb.api.mysql.mysql_proxy.executor.mysql_executor: Executor.query_execute: sql - CREATE DATABASE example_db
WITH ENGINE = "postgres",
PARAMETERS = {
    "user": "demo_user",
    "password": "demo_password",
    "host": "samples.mindsdb.com",
    "port": "5432",
    "database": "demo",
    "schema": "demo_data"
    };

2024-04-16 17:28:06,682            http INFO     mindsdb.api.mysql.mysql_proxy.executor.mysql_executor: Executor.parse: sql - CREATE DATABASE example_db
WITH ENGINE = "postgres",
PARAMETERS = {
    "user": "demo_user",
    "password": "demo_password",
    "host": "samples.mindsdb.com",
    "port": "5432",
    "database": "demo",
    "schema": "demo_data"
    };

2024-04-16 17:28:06,687            http INFO     mindsdb.api.mysql.mysql_proxy.executor.mysql_executor: Executor.do_execute
2024-04-16 17:28:06,710            http INFO     mindsdb.integrations.handlers_client.db_client_factory: DBClientFactory.__call__: no post/port to DBService have provided. Handle all db request locally
2024-04-16 17:28:17,260            http INFO     mindsdb.interfaces.database.integrations: IntegrationController.get_handler: create a client to db service of files type, args - {'name': 'files', 'integration_id': 11, 'connection_data': {}, 'file_storage': <mindsdb.interfaces.storage.fs.FileStorage object at 0xffff50684ac0>, 'handler_storage': <mindsdb.interfaces.storage.model_fs.HandlerStorage object at 0xffff50686530>, 'file_controller': <mindsdb.interfaces.file.file_controller.FileController object at 0xffff50685240>}
2024-04-16 17:28:17,262            http INFO     mindsdb.api.mysql.mysql_proxy.executor.mysql_executor: Executor.query_execute: sql - SELECT *
FROM example_db.user_comments;

2024-04-16 17:28:17,262            http INFO     mindsdb.api.mysql.mysql_proxy.executor.mysql_executor: Executor.parse: sql - SELECT *
FROM example_db.user_comments;

2024-04-16 17:28:17,265            http INFO     mindsdb.api.mysql.mysql_proxy.executor.mysql_executor: Executor.do_execute
2024-04-16 17:28:17,308            http INFO     mindsdb.interfaces.database.integrations: IntegrationController.get_handler: create a client to db service of postgres type, args - {'name': 'example_db', 'integration_id': 25, 'connection_data': {'user': 'demo_user', 'password': 'demo_password', 'host': 'samples.mindsdb.com', 'port': '5432', 'database': 'demo', 'schema': 'demo_data'}, 'file_storage': <mindsdb.interfaces.storage.fs.FileStorage object at 0xffff50701720>, 'handler_storage': <mindsdb.interfaces.storage.model_fs.HandlerStorage object at 0xffff50701c90>}
2024-04-16 17:28:33,494            http INFO     mindsdb.interfaces.database.integrations: IntegrationController.get_handler: create a client to db service of files type, args - {'name': 'files', 'integration_id': 11, 'connection_data': {}, 'file_storage': <mindsdb.interfaces.storage.fs.FileStorage object at 0xffff50702170>, 'handler_storage': <mindsdb.interfaces.storage.model_fs.HandlerStorage object at 0xffff50701630>, 'file_controller': <mindsdb.interfaces.file.file_controller.FileController object at 0xffff507014e0>}
2024-04-16 17:28:33,496            http INFO     mindsdb.api.mysql.mysql_proxy.executor.mysql_executor: Executor.query_execute: sql - CREATE MODEL sentiment_classifier
PREDICT sentiment
USING
   engine='huggingface',
   model_name= 'cardiffnlp/twitter-roberta-base-sentiment',
   task='text-classification',
   input_column = 'comment',
   labels=['negative','neutral','positive'];

2024-04-16 17:28:33,496            http INFO     mindsdb.api.mysql.mysql_proxy.executor.mysql_executor: Executor.parse: sql - CREATE MODEL sentiment_classifier
PREDICT sentiment
USING
   engine='huggingface',
   model_name= 'cardiffnlp/twitter-roberta-base-sentiment',
   task='text-classification',
   input_column = 'comment',
   labels=['negative','neutral','positive'];

2024-04-16 17:28:33,502            http INFO     mindsdb.api.mysql.mysql_proxy.executor.mysql_executor: Executor.do_execute
2024-04-16 17:28:33,515            http INFO     mindsdb.interfaces.database.integrations: IntegrationController.get_handler: create a ML client huggingface/16
2024-04-16 17:28:33,538            http ERROR    mindsdb.api.http.namespaces.sql: Error profiling query: 
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/mindsdb/api/http/namespaces/sql.py", line 49, in post
    result = mysql_proxy.process_query(query)
  File "/usr/local/lib/python3.10/site-packages/mindsdb/utilities/profiler/profiler.py", line 141, in wrapper
    result = function(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/mindsdb/api/mysql/mysql_proxy/mysql_proxy.py", line 527, in process_query
    executor.query_execute(sql)
  File "/usr/local/lib/python3.10/site-packages/mindsdb/utilities/profiler/profiler.py", line 141, in wrapper
    result = function(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/mindsdb/api/mysql/mysql_proxy/executor/mysql_executor.py", line 115, in query_execute
    self.do_execute()
  File "/usr/local/lib/python3.10/site-packages/mindsdb/utilities/profiler/profiler.py", line 141, in wrapper
    result = function(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/mindsdb/api/mysql/mysql_proxy/executor/mysql_executor.py", line 168, in do_execute
    ret = self.command_executor.execute_command(self.query)
  File "/usr/local/lib/python3.10/site-packages/mindsdb/utilities/profiler/profiler.py", line 141, in wrapper
    result = function(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/mindsdb/api/executor/command_executor.py", line 610, in execute_command
    return self.answer_create_predictor(statement, database_name)
  File "/usr/local/lib/python3.10/site-packages/mindsdb/utilities/functions.py", line 91, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/mindsdb/api/executor/command_executor.py", line 1523, in answer_create_predictor
    df = self.session.model_controller.create_model(statement, ml_handler)
  File "/usr/local/lib/python3.10/site-packages/mindsdb/interfaces/model/model_controller.py", line 296, in create_model
    raise EntityNotExistsError('Project does not exist', params['project_name'])
mindsdb.utilities.exception.EntityNotExistsError: Project does not exist: mongo_datasource

2024-04-16 17:28:33,556            http INFO     mindsdb.interfaces.database.integrations: IntegrationController.get_handler: create a client to db service of files type, args - {'name': 'files', 'integration_id': 11, 'connection_data': {}, 'file_storage': <mindsdb.interfaces.storage.fs.FileStorage object at 0xffff507038e0>, 'handler_storage': <mindsdb.interfaces.storage.model_fs.HandlerStorage object at 0xffff50703130>, 'file_controller': <mindsdb.interfaces.file.file_controller.FileController object at 0xffff50703850>}
2024-04-16 17:28:33,556            http INFO     mindsdb.api.mysql.mysql_proxy.executor.mysql_executor: Executor.query_execute: sql - SELECT project FROM models WHERE name='null'
2024-04-16 17:28:33,556            http INFO     mindsdb.api.mysql.mysql_proxy.executor.mysql_executor: Executor.parse: sql - SELECT project FROM models WHERE name='null'
2024-04-16 17:28:33,573            http INFO     mindsdb.api.mysql.mysql_proxy.executor.mysql_executor: Executor.do_execute
2024-04-16 17:34:33,663            http INFO     mindsdb.interfaces.database.integrations: IntegrationController.get_handler: create a client to db service of files type, args - {'name': 'files', 'integration_id': 11, 'connection_data': {}, 'file_storage': <mindsdb.interfaces.storage.fs.FileStorage object at 0xffff506c3610>, 'handler_storage': <mindsdb.interfaces.storage.model_fs.HandlerStorage object at 0xffff506c2f20>, 'file_controller': <mindsdb.interfaces.file.file_controller.FileController object at 0xffff50593460>}
2024-04-16 17:34:33,668            http INFO     mindsdb.api.mysql.mysql_proxy.executor.mysql_executor: Executor.query_execute: sql - SELECT *
FROM example_db.user_comments;

2024-04-16 17:34:33,668            http INFO     mindsdb.api.mysql.mysql_proxy.executor.mysql_executor: Executor.parse: sql - SELECT *
FROM example_db.user_comments;

2024-04-16 17:34:33,676            http INFO     mindsdb.api.mysql.mysql_proxy.executor.mysql_executor: Executor.do_execute
2024-04-16 17:34:33,701            http INFO     mindsdb.interfaces.database.integrations: IntegrationController.get_handler: create a client to db service of postgres type, args - {'name': 'example_db', 'integration_id': 25, 'connection_data': {'user': 'demo_user', 'password': 'demo_password', 'host': 'samples.mindsdb.com', 'port': '5432', 'database': 'demo', 'schema': 'demo_data'}, 'file_storage': <mindsdb.interfaces.storage.fs.FileStorage object at 0xffff505cd1b0>, 'handler_storage': <mindsdb.interfaces.storage.model_fs.HandlerStorage object at 0xffff505ce1a0>}
2024-04-16 17:36:03,413            http INFO     mindsdb.interfaces.database.integrations: IntegrationController.get_handler: create a client to db service of files type, args - {'name': 'files', 'integration_id': 11, 'connection_data': {}, 'file_storage': <mindsdb.interfaces.storage.fs.FileStorage object at 0xffff505ce290>, 'handler_storage': <mindsdb.interfaces.storage.model_fs.HandlerStorage object at 0xffff505cccd0>, 'file_controller': <mindsdb.interfaces.file.file_controller.FileController object at 0xffff505ce5c0>}
2024-04-16 17:36:03,417            http INFO     mindsdb.api.mysql.mysql_proxy.executor.mysql_executor: Executor.query_execute: sql - CREATE MODEL sentiment_classifier
PREDICT sentiment
USING
   engine='huggingface',
   model_name= 'cardiffnlp/twitter-roberta-base-sentiment',
   task='text-classification',
   input_column = 'comment',
   labels=['negative','neutral','positive'];

2024-04-16 17:36:03,417            http INFO     mindsdb.api.mysql.mysql_proxy.executor.mysql_executor: Executor.parse: sql - CREATE MODEL sentiment_classifier
PREDICT sentiment
USING
   engine='huggingface',
   model_name= 'cardiffnlp/twitter-roberta-base-sentiment',
   task='text-classification',
   input_column = 'comment',
   labels=['negative','neutral','positive'];

2024-04-16 17:36:03,427            http INFO     mindsdb.api.mysql.mysql_proxy.executor.mysql_executor: Executor.do_execute
2024-04-16 17:36:03,451            http INFO     mindsdb.interfaces.database.integrations: IntegrationController.get_handler: create a ML client huggingface/16
2024-04-16 17:36:03,478            http ERROR    mindsdb.api.http.namespaces.sql: Error profiling query: 
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/mindsdb/api/http/namespaces/sql.py", line 49, in post
    result = mysql_proxy.process_query(query)
  File "/usr/local/lib/python3.10/site-packages/mindsdb/utilities/profiler/profiler.py", line 141, in wrapper
    result = function(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/mindsdb/api/mysql/mysql_proxy/mysql_proxy.py", line 527, in process_query
    executor.query_execute(sql)
  File "/usr/local/lib/python3.10/site-packages/mindsdb/utilities/profiler/profiler.py", line 141, in wrapper
    result = function(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/mindsdb/api/mysql/mysql_proxy/executor/mysql_executor.py", line 115, in query_execute
    self.do_execute()
  File "/usr/local/lib/python3.10/site-packages/mindsdb/utilities/profiler/profiler.py", line 141, in wrapper
    result = function(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/mindsdb/api/mysql/mysql_proxy/executor/mysql_executor.py", line 168, in do_execute
    ret = self.command_executor.execute_command(self.query)
  File "/usr/local/lib/python3.10/site-packages/mindsdb/utilities/profiler/profiler.py", line 141, in wrapper
    result = function(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/mindsdb/api/executor/command_executor.py", line 610, in execute_command
    return self.answer_create_predictor(statement, database_name)
  File "/usr/local/lib/python3.10/site-packages/mindsdb/utilities/functions.py", line 91, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/mindsdb/api/executor/command_executor.py", line 1523, in answer_create_predictor
    df = self.session.model_controller.create_model(statement, ml_handler)
  File "/usr/local/lib/python3.10/site-packages/mindsdb/interfaces/model/model_controller.py", line 296, in create_model
    raise EntityNotExistsError('Project does not exist', params['project_name'])
mindsdb.utilities.exception.EntityNotExistsError: Project does not exist: mongo_datasource

2024-04-16 17:36:03,534            http INFO     mindsdb.interfaces.database.integrations: IntegrationController.get_handler: create a client to db service of files type, args - {'name': 'files', 'integration_id': 11, 'connection_data': {}, 'file_storage': <mindsdb.interfaces.storage.fs.FileStorage object at 0xffff50703220>, 'handler_storage': <mindsdb.interfaces.storage.model_fs.HandlerStorage object at 0xffff50702aa0>, 'file_controller': <mindsdb.interfaces.file.file_controller.FileController object at 0xffff50703370>}
2024-04-16 17:36:03,535            http INFO     mindsdb.api.mysql.mysql_proxy.executor.mysql_executor: Executor.query_execute: sql - SELECT project FROM models WHERE name='null'
2024-04-16 17:36:03,535            http INFO     mindsdb.api.mysql.mysql_proxy.executor.mysql_executor: Executor.parse: sql - SELECT project FROM models WHERE name='null'
2024-04-16 17:36:03,546            http INFO     mindsdb.api.mysql.mysql_proxy.executor.mysql_executor: Executor.do_execute

can you please help me to resolve this?

@vimalprakashts
Copy link
Author

I think it is problem with your UI (may be cache).

image

Because I was plying before this example , i was trying the mongodb implementation. So for a sure there is a cache issue in your UI.

I executed the same in the incognito mode. The command executed successfully.

@ZoranPandovski
Copy link
Member

Amazing, thank you so much for confirming this. @setohe0909 , @alejandrovillegas , @mpacheco12 please check this when you can

@alejandrovillegas
Copy link
Member

HI @vimalprakashts Thanks for reporting.
Before replicating these steps, did you try doing something in Mongo? Also, could you please try to replicate these steps again?

@vimalprakashts
Copy link
Author

@alejandrovillegas I did integration with mongo, unfortunately that is also failed, that I have informed in the slack channel.

slack link : https://mindsdbcommunity.slack.com/archives/C01S2T35H18/p1713429924334629

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

4 participants