Skip to main content

Common errors

A list of common errors and how to solve them.

CLI errors

Cannot install CLI

The Shaped CLI support Python version 3.8 - 3.11. If you try to install it using an unsupported version, it will fail in the build process.

Sample error message:

ERROR: Failed building wheel for pyarrow 
Failed to build pyarrow
ERROR: Failed to build installable wheels for some pyproject.toml based projects (pyarrow)

Solutions:

Run pip install in a virtual environment that uses Python 3.11:

  • Using venv:
    1. Create a venv with Python 3.11: python3.11 -m venv .venv
    2. Activate your environment: source ./.venv/bin/activate
    3. Install Shaped: pip install shaped
  • Using conda:
    1. Create an environment: conda create --name myenv python=3.11
    2. Activate your environment: conda activate myenv
    3. Install Shaped: pip install shaped

Shaped command not found

This error occurs when you try to use the Shaped CLI but it is not installed in your environment. Install the CLI or activate an environment where it is installed.

Sample error message:

command not found: shaped

Solution:

  • Install the Shaped CLI: pip install shaped
  • Activate an environment where the CLI is installed: source ./path/to/env/bin/activate

API errors

The following errors are returned by the API.

422 Value Error

A 422 Value Error occurs when your API request contains fields that don't match the expected schema (e.g., extra or invalid fields).

Sample error message:

'Value error, Failed to parse V2 config: Validation error at ''data.item_tables'': Extra inputs are not permitted'

Solution:

403 Forbidden

A 403 Forbidden error occurs when your API request does not have the correct authentication for the endpoint you are calling.

Sample error message:

A 403 error from the API with "Forbidden" in the response

Solution:

  • Ensure your API key is correct
  • Use a write API key if writing to the system (eg creating models, creating datasets)
  • Ensure the endpoint is correct – verify base URL, model or table name, path

Engine deployment errors

This section explains some common errors that happen during engine deployment, and how to solve them.

'item_id' missing from item source

Sample error message:

There was an error when fetching: Feature store version 40639 failed with: There was an error when fetching: Internal error, {'status': 422, 'title': 'The fetch config is invalid.', 'detail': "'item_id' missing from item source, found: ['name', 'description', 'category', 'price', 'created_at']."} and status: FeatureStoreStatusType.ERROR

Solution:

  • Ensure your item_table contains an item_id column
  • You can set item_ids from a unique identifier column in your data. Use an SQL view to create a new table with the item_id column and fill it with the values for each item.
  • Set the labels with an SQL query in your engine config. This is the quickest approach but is fragile, as you'll get the error again if you don't remember to add it to every engine.
data: 
interaction_table:
type: query
query: select *, '5' as label from hm_transactions order by created_at, registered
# ... remaining engine config

'user_id' missing from item source

Sample error message:

There was an error when fetching: Feature store version 40639 failed with: There was an error when fetching: Internal error, {'status': 422, 'title': 'The fetch config is invalid.', 'detail': "'user_id' missing from user source, found: ['item_id', 'timestamp', 'label', 'created_at']."} and status: FeatureStoreStatusType.ERROR

Solution:

  • Ensure your interaction_table and/or user_table contains a user_id column.
  • You can set item_ids from a unique identifier column in your data. Use an SQL view to create a new table with the item_id column and fill it with the values for each item.
  • Set the labels with an SQL query in your engine config. This is the quickest approach but is fragile, as you'll get the error again if you don't remember to add it to every engine.
data: 
interaction_table:
type: query
query: select *, '5' as label from hm_transactions order by created_at, registered
# ... remaining engine config

'label' missing from interaction_table

This error occurs when the label column is missing. This column defines categories or weights for each interaction.

Sample error message:

There was an error when fetching: Feature store version 40639 failed with: There was an error when fetching: Internal error, {'status': 422, 'title': 'The fetch config is invalid.', 'detail': "'label' missing from interaction source, found: ['user_id', 'item_id', 'timestamp', 'created_at', 'event_type']."} and status: FeatureStoreStatusType.ERROR

Solution:

  • Ensure your interaction_table contains item_id, user_id and label columns
  • You can set labels based on the event types in your interaction data. Use an SQL view to create a new table with the label column and fill it with the values for each interaction events.
  • Set the labels with an SQL query in your engine config. This is the quickest approach but is fragile, as you'll get the error again if you don't remember to add it to every engine.
data: 
interaction_table:
type: query
query: select *, '5' as label from hm_transactions order by created_at, registered
# ... remaining engine config

'created_at' missing from interaction_table

This error occurs when the feature store expects a created_at column in your source table, but it is not present.

Sample error message:

There was an error when fetching: Feature store version 40639 failed with: There was an error when fetching: Internal error, {'status': 422, 'title': 'The fetch config is invalid.', 'detail': "created_at missing from events source, found: ['user_id', 'timestamp', 'artist_id', 'artist_name', 'item_id', 'track_name', 'label']."} and status: FeatureStoreStatusType.ERROR

Solutions:

  • Add the created_at column to your source table if it doesn't exist.
  • If the column exists with a different name (e.g., timestamp), use an SQL view to create a new table with the created_at column by aliasing the existing column.
  • Add the created_at column with an SQL query in your engine config. This is the quickest approach but is fragile, as you'll get the error again if you don't remember to add it to every engine.

Invalid datetime format

Sample error message:

Exception: Cannot parse DateTime: Cannot parse DateTime from String: while converting column release_date from type String to type DateTime

Solution:

  • Ensure datetimes are formatted in YYYY-MM-DDZ00:00:00 format.
  • Cast any datetimes with an SQL query like: select toDateTimeOrNull(release_date) as release_date_casted from movies

Cyclic aliases

A cyclic aliases error occurs when two columns in the input and output tables are ambiguous. For example, you may be trying to transform a column into another column with the same alias.

Sample error message:

Exception: ClickHouse error code 174 Code: 174. DB::Exception: Cyclic aliases. (CYCLIC_ALIASES)

Solution:

  • Clear the ambiguous column name from your data config. For example, replace toDateTimeOrNull(release_date) AS release_date with toDateTimeOrNull(release_date) AS release_date_casted

Cannot parse DateTime from String

This error occurs when the SQL parser cannot accurately cast a DateTime column from a String column.

Sample error message:

Cannot parse DateTime: Cannot parse DateTime from String

Solutions:

  • Cast columns with string dates using the toDateTimeOrNull() function. For example: select toDateTimeOrNull(created_at) as created_as_casted, * from events
  • Alternatively, use schema_override in data block to specify how Shaped should convert each column into a feature.

Column not sorted in ascending order

This error occurs when a column in your input table is not sorted in ascending order, which is required by the feature store.

Sample error message:

Error: There was an error when fetching: Feature store version 40642 failed with: There was an error when fetching: Column 'registered' in table users is not sorted in ascending order. and status: FeatureStoreStatusType.ERROR

Solutions:

  • Use an SQL view to sort the data. This is the recommended approach if your input data is not clean or sortable.
  • Sort the input table at train time. Set your table type to query and add an ORDER BY clause to it:
name: hm_demo
data:
item_table:
type: query
query: select * from hm_articles order by created_at
interaction_table:
type: query
query: select *, '5' as label from hm_transactions order by created_at, registered
# ... remaining engine config

Invalid Huggingface model

Sample error message:

Error: There was an error when training: sentence-transformers/modernbert is not a local folder and is not a valid model identifier listed on 'https://huggingface.co/models'. If this is a private repository, make sure to pass a token having permission to this repo either by logging in with huggingface-cli login or by passing token=<your_token>

Solution: