-
Notifications
You must be signed in to change notification settings - Fork 62
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
Feat: Adding a tutorial for the Iowa Liquor dataset #419
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
@@ -0,0 +1,1026 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line #2. from datetime import datetime
I am not sure if you actually made use of datetime in your code. If not, flake8 will warn you and you can delete this line.
Reply via ReviewNB
datasets/iowa_liquor_sales/docs/tutorials/liquor_sales_prediction/tutorial.ipynb
Outdated
Show resolved
Hide resolved
|
||
artifact: | ||
title: "Iowa Liquor sales predictions" | ||
description: "Predict a liquor sales price based previous years sales data using a tree based ML estimators such as Random Forest" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lint is complaining about line 17: 17:16 [colons] too many spaces after colon
import pandas as pd | ||
mock_client = mock.MagicMock() | ||
mock_df = pd.DataFrame() | ||
mock_df['week'] = range(50) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You want to change mock_df. These lines are added, so our test code does not make an actual request to BigQuery. Instead, we "mock" the BQ call, and create a mock object (in this case, mock_df) to be the object we pretend that our BQ call returned. You want it to be a dataframe that you expect the BQ call returns, so the rest of your code can function and work properly.
dataframe = tb.get("dataframe") | ||
assert dataframe.shape == (50, 3) | ||
|
||
train_pred_plot = tb.get("train_pred_plot") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You want to pick an object from your code (ideally something from the end of your code) and replace train_pred_plot
with it, and test whether it exists or not. That way, we are testing whether your notebook runs all the way to the end during the test.
reducing the librarires
reducing spaces after columns
…orm#419) * putting my files with docs * changing my project id * flake8 passed on notebook & test * reducing spaces in files names * reformatting the artifact * Update artifact.yaml reducing the librarires * Update artifact.yaml reducing spaces after columns * Adding test file and notebook Co-authored-by: Edouard Gahou <[email protected]>
Description
Note: If you are adding or editing a dataset, please specify the dataset folder involved, e.g.
datasets/google_trends
Checklist
Use the sections below based on what's applicable to your PR and delete the rest:
Feature
README
accordinglyData Onboarding
datasets/<DATASET_NAME>
and nothing outside of that directoryDocumentation
Bug fix
tests
folder)Code cleanup or refactoring