Skip to content

Manage logic reasoners

Logic reasoners run the definitions and queries behind PyRel semantic models. This guide explains how logic reasoners are created, how to inspect and manage them, and when to step in manually instead of relying on PyRel’s default behavior.

  • The RAI Native App is installed and usable in your Snowflake account.
  • You can run SQL in Snowflake with an active warehouse.
  • You use the eng_user application role to inspect logic reasoners.
  • You use the eng_admin application role to suspend, resume, alter, and delete logic reasoners.

Every semantic model needs a logic reasoner. Logic reasoners process model definitions, evaluate queries, and run the logic workloads behind normal PyRel model use.

By default, each user gets a dedicated logic reasoner. When a user queries a model, PyRel resumes the configured logic reasoner if it is suspended or creates one if it does not exist.

Logic reasoners run in app-managed compute pools. You do not create or manage these pools directly, but you do choose logic reasoner sizes that map to them.

Compute poolSizeSupported cloud platformsUsed for
RELATIONAL_AI_HIGHMEM_X64_SHIGHMEM_X64_SAWS, AzureSmall logic workloads and the default logic reasoner size.
RELATIONAL_AI_HIGHMEM_X64_MHIGHMEM_X64_MAWS, AzureMedium logic workloads.
RELATIONAL_AI_HIGHMEM_X64_LHIGHMEM_X64_LAWS onlyLarge logic workloads on AWS.
RELATIONAL_AI_HIGHMEM_X64_SLHIGHMEM_X64_SLAzure onlyLarge logic workloads on Azure.

PyRel creates logic reasoners automatically. Users can configure the name and size of the logic reasoner that PyRel creates for them.

When a user runs a query that needs a logic reasoner:

  • PyRel checks whether the configured reasoner exists and is READY.
  • If it is READY, PyRel sends the query to that reasoner.
  • If it is not READY, PyRel resumes it and waits for it to become READY.
  • If it does not exist, PyRel creates it using the configured size, or HIGHMEM_X64_S if no size is configured.

The default logic reasoner settings are:

SettingBehavior
NameDefaults to the Snowflake username with dots replaced by underscores.
SizeDefaults to HIGHMEM_X64_S.
Auto-suspendDefaults to 60 minutes of inactivity for newly created reasoners when you do not set a different value.

One logic reasoner can process more than one job at a time. Each reasoner supports up to 8 concurrent jobs and a queue capacity of 128 jobs.

Logic reasoners are fully managed by PyRel, including creating them if a semantic model needs one. Each PyRel user gets a dedicated logic reasoner.

As an admin, you can perform the following actions on logic reasoners:

What to doWhen to do it
View all logic reasonersWhen you want to confirm that a logic reasoner exists and see its high-level state.
Verify that a logic reasoner is readyWhen you want to confirm that one specific logic reasoner is usable with its expected size and settings.
Change a logic reasoner’s auto-suspend settingsWhen you want to trade off lower cost against lower startup latency.
Manually suspend a logic reasonerWhen you want to stop it from consuming compute while it is not needed. Jobs sent to a suspended reasoner fail until the reasoner is resumed again.
Manually resume a suspended logic reasonerWhen you need it available before the next query or when you want to confirm that the reasoner itself can start normally.
Delete a logic reasonerWhen you no longer want to keep that reasoner instance or its current configuration. Deletion is stronger than suspension because it removes the reasoner entirely.

Use the list view when you want to confirm that a logic reasoner exists and see its high-level state.

SELECT *
FROM relationalai.api.reasoners
WHERE TYPE = 'logic';

Start with NAME, SIZE, STATUS, AUTO_SUSPEND_MINS, and SUSPENDS_AT. Those columns usually tell you whether the reasoner is ready to use, scheduled to suspend, or worth inspecting in more detail.

Use the detail view when you want to confirm that one specific logic reasoner is usable with its expected size and settings.

CALL relationalai.api.get_reasoner('logic', 'my_reasoner');

Confirm the following fields first:

  • STATUS = READY
  • SIZE matches the expected instance family
  • AUTO_SUSPEND_MINS matches the current inactivity setting
  • RUNTIME.compute_pool matches the expected logic reasoner pool

If the reasoner exists but is not yet READY, wait for provisioning to complete and run the check again. If it remains unavailable, continue with the troubleshooting section on this page.

Change a logic reasoner’s auto-suspend settings

Section titled “Change a logic reasoner’s auto-suspend settings”

Logic reasoners can be configured to automatically suspend after a period of inactivity, which can help reduce costs when logic workloads are infrequent. By default, newly created logic reasoners suspend after 60 minutes of inactivity unless you set a different value, but you can change this setting based on your workload patterns.

Execute the following to change the auto-suspend timer for a logic reasoner named my_reasoner to 30 minutes:

CALL relationalai.api.alter_reasoner_auto_suspend_mins('logic', 'my_reasoner', 30);

Set the value to 0 to disable auto-suspension.

If you need to suspend a logic reasoner immediately, rather than waiting for the auto-suspend timer, you can do so manually.

Run the following to suspend a logic reasoner named my_reasoner:

CALL relationalai.api.suspend_reasoner('logic', 'my_reasoner');

Use get_reasoner() to check the reasoner’s status and confirm that it has suspended successfully.

Manually resume a suspended logic reasoner

Section titled “Manually resume a suspended logic reasoner”

PyRel will automatically resume a logic reasoner when it needs to run a query, but you can also resume it manually if you want it available immediately.

Run the following to resume a logic reasoner named my_reasoner:

CALL relationalai.api.resume_reasoner_async('logic', 'my_reasoner');

It may take a few minutes for the reasoner to start up and become READY again. Use get_reasoner() to check the reasoner’s status and confirm that it has resumed successfully.

Delete a logic reasoner when you no longer want to keep that reasoner instance or its current configuration. Deletion is stronger than suspension because it removes the reasoner entirely.

CALL relationalai.api.delete_reasoner('logic', 'my_reasoner');

When a reasoner is deleted, all current and queued jobs are cancelled. If PyRel is still configured to use that reasoner name, it can recreate the reasoner later when needed.

Troubleshoot common issues with logic reasoners

Section titled “Troubleshoot common issues with logic reasoners”

Use this table to match common logic-reasoner problems to the right next action:

SymptomLikely causeWhat to do next
The expected logic reasoner does not exist.PyRel has not needed it yet, or the configured name does not match the reasoner you expected.Confirm the current reasoners.logic configuration, then trigger the workflow that should use it or create the reasoner manually.
The reasoner exists but is not READY.Provisioning is still in progress, or startup has stalled.Wait briefly and run get_reasoner() again. If it does not recover, check broader app status.
The reasoner resumes slowly even though nothing is wrong.The reasoner is auto-suspended and needs to start again.Increase AUTO_SUSPEND_MINS or use warm reasoners if startup latency is the main problem.
The reasoner is READY, but queries are still slow.Jobs may be queued or the reasoner may be under sustained load.Use Monitor reasoner usage to inspect demand, CPU, and memory before changing the lifecycle settings.

For adjacent workflows, see Manage the Native App and Configure reasoners.