Featureset 'features' not found, from model.py

featureset ‘features’ not found, when I enter layer run I get that error

Its coming from model.py

def train_model(train: Train, pf: Featureset(“features”)) → Any:

Can you make sure you have the featureset features you are referring here and successfully built it?

def build_feature(sdf: Dataset(“customers”)) → Any:

data = sdf.to_pandas()
input_data = data.loc[:, ['Age', 'Spending Score (1-100)']].values
return input_data

above data, I need for clustering which is present in features .py

apiVersion: 1

type: featureset

name: “customer_features”
description: “Customer segmentation features”


  • name: features
    description: “Target”
    source: my_features.py
    environment: requirements.txt


  • target: layer

directory structure


Hi Aravind,

Were you able to successfully build the features featureset? Can you post the full output of layer run?

Thank you!

Nope, am still facing the same issue

What does layer run output?

Featureset ‘features’ not found

Can you please update your code to the following and see if it works?

def train_model(train: Train, pf: Featureset(“customer_features”)) → Any:

The name of the featureset is “customer_features”, not “features”, so that may be why this error is coming up.

Previous error resolved, its building features from past 2 hours not sure why it’s taking so long. Any idea?

Thanks Aravind, have seen the same issue elsewhere and we’re looking into it. Will get back to you ASAP.

Hey Aravind, haven’t been able to reproduce locally. Can you perhaps share the full logs from layer run? Also what version of the layer CLI are you using? Lastly is this issue happening repeatably?

layer-sdk-0.6.5 , it didn’t return any timeout error even after 2 hours of running, tried uninstalling the package and changed versions , still the same issue building features taking too long to complete and dint return any error message.

Hey Aravind, thanks for the info. We’ve just released 0.6.6, which should address the issue of indefinitely running builds however
we are aware of another intermittent issue that we are working on diagnosing and fixing as soon as possible (related to failed builds as a result of com.layer.featureengine.PythonExecutionException: MemoryError(). Will give you an update on this when I can.

Hey Aravind, we have released a fix for the other intermittent issue that Alex mentioned. You should now be able to run your project. Please give it a try and let us know how it goes. Thank you!

LAYER RUN FAILED after 22439ms:
Failed to build featureset ‘customer_features’: (DatasetBuildId(1a75ee23-1f0c-4ea6-afe7-728ab77d5c41),com.layer.featureengine.PythonExecutionException: LayerClientException(‘There was an error servicing your request.’))

This error shows up when layer run

Upgraded layer to layer-sdk==0.6.8
still facing same issue

Hey @Aravind! Can you please share your latest code so we can try to reproduce on our end?