Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python SDK fails to apply feature when submitting job #134

Closed
woop opened this issue Feb 17, 2019 · 0 comments · Fixed by #135
Closed

Python SDK fails to apply feature when submitting job #134

woop opened this issue Feb 17, 2019 · 0 comments · Fixed by #135

Comments

@woop
Copy link
Member

woop commented Feb 17, 2019

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='[email protected]',  
                           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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant