Skip to content

Python SDK fails to apply feature when submitting job #134

@woop

Description

@woop

Expected Behavior

When using the Python SDK to start an import job, the run method should be able to apply features within the import.

Current Behavior

The run method returns an error:

    globals = debugger.run(setup['file'], None, None, is_module)
  File "/home/xxx/.local/share/JetBrains/Toolbox/apps/PyCharm-P/ch-0/183.5429.31/helpers/pydev/pydevd.py", line 1135, in run
    pydev_imports.execfile(file, globals, locals)  # execute the script
  File "/home/xxx/.local/share/JetBrains/Toolbox/apps/PyCharm-P/ch-0/183.5429.31/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
    exec(compile(contents+"\n", file, 'exec'), glob, loc)
  File "/home/xxx/projects/feast/sdk/python/run.py", line 98, in <module>
    fs.run(importer, apply_features=True, apply_entity=True)
  File "/home/xxx/projects/feast/sdk/python/feast/sdk/client.py", line 169, in run
    self._apply_feature(feature)
  File "/home/xxx/projects/feast/sdk/python/feast/sdk/client.py", line 392, in _apply_feature
    response = self._core_service_stub.ApplyFeature(feature.spec)
AttributeError: 'str' object has no attribute 'spec'

Steps to reproduce

Running the following code from the 0.0.1 Python SDK quickstart.

fs = Client(core_url=FEAST_CORE_URL, verbose=True)

serving_ds=Datastore(id='REDIS1')
warehouse_ds=Datastore(id='BIGQUERY1')

# Create importer
importer = Importer.from_df(df_complete, 
                           entity='ride', 
                           granularity=Granularity.NONE,
                           owner='user@website.com',  
                           staging_location=STAGING_LOCATION,
                           id_column='ride', 
                           timestamp_column='pickup_datetime',
                           serving_store=serving_ds,
                           warehouse_store=warehouse_ds)

# Update feature and entity metadata. Ideally you want to update these manually
# so that they contain adequate information for the next user
importer.entity.description = 'nyc taxi dataset' 
for feature_id in importer.features:
    importer.features[feature_id].description = 'nyc taxi dataset'
    
# Ingest the feature data into the store
fs.run(importer, apply_features=True, apply_entity=True)

Specifications

  • Version: 0.0.1
  • Platform: Ubuntu 18.04
  • Subsystem:

Possible Solution

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions