-
Notifications
You must be signed in to change notification settings - Fork 410
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
[BUG] CSV Datasource error #13
Comments
Thanks for reporting @bonacciog ! Could you please verify that your |
@hamzamaiot Thanks for your reply! It does't seem there is an YAML file. Is this screenshot enough? |
Could you check in the
|
ah yes, I see the bug. The Your immediate solution would be to move the P.S. If you wanted a recommended directory structure, we have one in our docs for reference. Hope it helps! |
Thank you for your help @hamzamaiot! I have created that file, so my mistake. I have created the dir "notebooks" and file QuickStart.ipynb to start with QuickStart example. |
Maybe I have to work outside of subdirectories (notebooks, pipelines..) ? @hamzamaiot |
Sorry switching accounts. Now the error is clearer - the datasource already exists so you can either fetch it in your script using the Or to start from scratch just delete the |
Thank you! @htahir1 |
No problem! We also added a fix to the YAML pipelines dir problem you were facing in #14 . Thanks for the heads-up! |
Describe the bug
I'm not able to getting started with quickstart example pipeline.
Trying to run:
ds = CSVDatasource(name='Pima Indians Diabetes Dataset', path='gs://zenml_quickstart/diabetes.csv')
To Reproduce
I have followed QuickStart steps:
Screenshots
![Schermata 2021-01-15 alle 14 56 56](https://user-images.githubusercontent.com/45511179/104735539-fe8bd600-5741-11eb-98ac-44f5a0e5832a.png)
Stack Trace
KeyError Traceback (most recent call last)
in
1 # Add a datasource. This will automatically track and version it.
----> 2 ds = CSVDatasource(name='Pima Indians Diabetes Dataset', path='gs://zenml_quickstart/diabetes.csv')
3 training_pipeline.add_datasource(ds)
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/zenml/core/datasources/csv_datasource.py in init(self, name, path, schema, **unused_kwargs)
45 schema (str): optional schema for data to conform to.
46 """
---> 47 super().init(name, schema, **unused_kwargs)
48 self.path = path
49
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/zenml/core/datasources/base_datasource.py in init(self, name, schema, _id, _source, *args, **kwargs)
61 else:
62 # If none, then this is assumed to be 'new'. Check dupes.
---> 63 all_names = Repository.get_instance().get_datasource_names()
64 if any(d == name for d in all_names):
65 raise Exception(
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/zenml/core/repo/repo.py in get_datasource_names(self)
236 c = yaml_utils.read_yaml(file_path)
237 n.append(c[keys.GlobalKeys.DATASOURCE][keys.DatasourceKeys.NAME])
--> 238 return list(set(n))
239
240 @track(event=GET_DATASOURCES)
KeyError: 'datasource'
** Context (please complete the following information):**
The text was updated successfully, but these errors were encountered: