WordPress database error: [<div style="clear:both">&nbsp;</div><div class="queries" style="clear:both; margin_bottom:2px; border: red dotted thin;">Queries made or created this session were<br/> <ol> <li>Raw query: SELECT * FROM wp_options WHERE </li> <li>Rewritten: SELECT * FROM wp_options WHERE </li> <li>With Placeholders: SELECT * FROM wp_options WHERE </li> <li>Prepare: SELECT * FROM wp_options WHERE </li> </ol> </div><div style="clear:both; margin_bottom:2px; border: red dotted thin;" class="error_message" style="border-bottom:dotted blue thin;">Error occurred at line 1644 in Function prepare_query. <br/> Error message was: Problem preparing the PDO SQL Statement. Error was: SQLSTATE[HY000]: General error: 1 incomplete input </div><pre>#0 /home/nattaylor/public_html/wordpress/wp-content/db.php(2746): WP_SQLite_DB\PDOEngine->get_error_message() #1 /home/nattaylor/public_html/wordpress/wp-content/db.php(3484): WP_SQLite_DB\wpsqlitedb->query('...') #2 /home/nattaylor/public_html/wordpress/wp-content/db.php(2952): WP_SQLite_DB\PDOSQLiteDriver->execute_duplicate_key_update() #3 /home/nattaylor/public_html/wordpress/wp-content/db.php(1893): WP_SQLite_DB\PDOSQLiteDriver->rewrite_query('...', '...') #4 /home/nattaylor/public_html/wordpress/wp-content/db.php(1357): WP_SQLite_DB\PDOEngine->execute_insert_query_new('...') #5 /home/nattaylor/public_html/wordpress/wp-content/db.php(2739): WP_SQLite_DB\PDOEngine->query('...') #6 /home/nattaylor/public_html/wordpress/wp-includes/option.php(1143): WP_SQLite_DB\wpsqlitedb->query('...') #7 /home/nattaylor/public_html/wordpress/wp-includes/option.php(2189): add_option('...', 1773133025, '', '...') #8 /home/nattaylor/public_html/wordpress/wp-includes/option.php(1953): add_network_option(1, '...', 1773133025) #9 /home/nattaylor/public_html/wordpress/wp-includes/option.php(2680): add_site_option('...', 1773133025) #10 /home/nattaylor/public_html/wordpress/wp-includes/class-wp-theme.php(2047): set_site_transient('...', Array, 1800) #11 /home/nattaylor/public_html/wordpress/wp-includes/class-wp-theme.php(1856): WP_Theme->set_pattern_cache(Array) #12 /home/nattaylor/public_html/wordpress/wp-includes/block-patterns.php(374): WP_Theme->get_block_patterns() #13 /home/nattaylor/public_html/wordpress/wp-includes/class-wp-hook.php(341): _register_theme_block_patterns('') #14 /home/nattaylor/public_html/wordpress/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters(NULL, Array) #15 /home/nattaylor/public_html/wordpress/wp-includes/plugin.php(522): WP_Hook->do_action(Array) #16 /home/nattaylor/public_html/wordpress/wp-settings.php(742): do_action('...') #17 /home/nattaylor/public_html/wordpress/wp-config.php(84): require_once('...') #18 /home/nattaylor/public_html/wordpress/wp-load.php(50): require_once('...') #19 /home/nattaylor/public_html/wordpress/wp-blog-header.php(13): require_once('...') #20 /home/nattaylor/public_html/wordpress/index.php(17): require('...') </pre>]
SELECT * FROM wp_options WHERE

WordPress database error: [<div style="clear:both">&nbsp;</div><div class="queries" style="clear:both; margin_bottom:2px; border: red dotted thin;">Queries made or created this session were<br/> <ol> <li>Raw query: SELECT * FROM wp_options WHERE </li> <li>Rewritten: SELECT * FROM wp_options WHERE </li> <li>With Placeholders: SELECT * FROM wp_options WHERE </li> <li>Prepare: SELECT * FROM wp_options WHERE </li> </ol> </div><div style="clear:both; margin_bottom:2px; border: red dotted thin;" class="error_message" style="border-bottom:dotted blue thin;">Error occurred at line 1644 in Function prepare_query. <br/> Error message was: Problem preparing the PDO SQL Statement. Error was: SQLSTATE[HY000]: General error: 1 incomplete input </div><pre>#0 /home/nattaylor/public_html/wordpress/wp-content/db.php(2746): WP_SQLite_DB\PDOEngine->get_error_message() #1 /home/nattaylor/public_html/wordpress/wp-content/db.php(3484): WP_SQLite_DB\wpsqlitedb->query('...') #2 /home/nattaylor/public_html/wordpress/wp-content/db.php(2952): WP_SQLite_DB\PDOSQLiteDriver->execute_duplicate_key_update() #3 /home/nattaylor/public_html/wordpress/wp-content/db.php(1893): WP_SQLite_DB\PDOSQLiteDriver->rewrite_query('...', '...') #4 /home/nattaylor/public_html/wordpress/wp-content/db.php(1357): WP_SQLite_DB\PDOEngine->execute_insert_query_new('...') #5 /home/nattaylor/public_html/wordpress/wp-content/db.php(2739): WP_SQLite_DB\PDOEngine->query('...') #6 /home/nattaylor/public_html/wordpress/wp-includes/option.php(1143): WP_SQLite_DB\wpsqlitedb->query('...') #7 /home/nattaylor/public_html/wordpress/wp-includes/option.php(2189): add_option('...', Array, '', '...') #8 /home/nattaylor/public_html/wordpress/wp-includes/option.php(1953): add_network_option(1, '...', Array) #9 /home/nattaylor/public_html/wordpress/wp-includes/option.php(2682): add_site_option('...', Array) #10 /home/nattaylor/public_html/wordpress/wp-includes/class-wp-theme.php(2047): set_site_transient('...', Array, 1800) #11 /home/nattaylor/public_html/wordpress/wp-includes/class-wp-theme.php(1856): WP_Theme->set_pattern_cache(Array) #12 /home/nattaylor/public_html/wordpress/wp-includes/block-patterns.php(374): WP_Theme->get_block_patterns() #13 /home/nattaylor/public_html/wordpress/wp-includes/class-wp-hook.php(341): _register_theme_block_patterns('') #14 /home/nattaylor/public_html/wordpress/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters(NULL, Array) #15 /home/nattaylor/public_html/wordpress/wp-includes/plugin.php(522): WP_Hook->do_action(Array) #16 /home/nattaylor/public_html/wordpress/wp-settings.php(742): do_action('...') #17 /home/nattaylor/public_html/wordpress/wp-config.php(84): require_once('...') #18 /home/nattaylor/public_html/wordpress/wp-load.php(50): require_once('...') #19 /home/nattaylor/public_html/wordpress/wp-blog-header.php(13): require_once('...') #20 /home/nattaylor/public_html/wordpress/index.php(17): require('...') </pre>]
SELECT * FROM wp_options WHERE

Test Drive: Transformers by Nat Taylor

Nat TaylorBlog, AI, Product Management & Tinkering

Test Drive: Transformers

Published on .

Today I’m test driving huggingface Transformers (“State-of-the-art Machine Learning for JAX, PyTorch and TensorFlow”). I’ve used the library many times, but never deliberately on its own, and I’m doing the Serverless API too. My task is a simple classification task. The process is:

  1. pip install transformers
  2. Go to huggingface.co and pick some models
  3. Implement

Here is the code. On my M1 it runs in a few seconds.

"""Use huggingface locally and Severless API"""

import huggingface_hub
from transformers import pipeline

pipes = {
    'smol': pipeline("text-generation", model="HuggingFaceTB/SmolLM-135M-Instruct", device='mps'),
    'qwen': pipeline("text-generation", model="Qwen/Qwen2.5-0.5B-Instruct", max_new_tokens=500, device='mps'),
    'api': lambda messages: huggingface_hub.InferenceClient().chat.completions.create(model="meta-llama/Llama-3.2-1B-Instruct",  messages=messages)
}
messages = [
    {"role": "user", "content": "Classify the sentiment of the following.  ONLY OUTPUT positive OR negative !!!\nThis vacuum really sucks"},
]

for name, pipe in pipes.items():
    print(name)
    print(pipe(messages))

# smol
# [{'generated_text': [{'role': 'user', 'content': 'Classify the sentiment of the following.  ONLY OUTPUT positive OR negative !!!\nThis vacuum really sucks'}, {'role': 'assistant', 'content': 'Here\'s a possible classification of the sentiment of the given text:\n\n**Positive Sentiment:**\n\n* "I love this new restaurant"\n* "I\'m so excited to try this'}]}]
# qwen
# [{'generated_text': [{'role': 'user', 'content': 'Classify the sentiment of the following.  ONLY OUTPUT positive OR negative !!!\nThis vacuum really sucks'}, {'role': 'assistant', 'content': 'negative'}]}]
# api
# ChatCompletionOutput(choices=[ChatCompletionOutputComplete(finish_reason='stop', index=0, message=ChatCompletionOutputMessage(role='assistant', content='Negative', tool_calls=None), logprobs=None)], created=1730317449, id='', model='meta-llama/Llama-3.2-1B-Instruct', system_fingerprint='2.3.1-sha-a094729', usage=ChatCompletionOutputUsage(completion_tokens=2, prompt_tokens=55, total_tokens=57))

Post Navigation

«
»