Change name of date_of_birth (column name) to birthday in mock dataset#1754
Conversation
|
Thanks for the contribution @ridicolos! |
|
@gsheni could you maybe explain why so much of these test just failed with the changes I did? I am a little bit confused on what happens here? What I did find, which could explian some of the errors, is that the tests use csv-files from s3 where the column-name is still set to Do I even have an ability to change this? |
@ridicolos I can help you with updating the S3 files when the time comes. In the meantime, there are a couple additional updates that we need to make first. I will comment on the code in the appropriate places. Namely, we do not want to change any references to the Woodwork semantic tag of We will look into the docs build failures separately, as that seems unrelated to your changes. |
thehomebrewnerd
left a comment
There was a problem hiding this comment.
Overall this is looking good. There are a few places where we should leave date_of_birth in place, and I have noted those.
| "metadata": {}, | ||
| "source": [ | ||
| "Above we see the semantic tags that are defined within Woodwork. These tags inform how Featuretools is able to interpret data, an example of which can be seen in the `Age` primitive, which requires that the `date_of_birth` semantic tag be present on a column.\n", | ||
| "Above we see the semantic tags that are defined within Woodwork. These tags inform how Featuretools is able to interpret data, an example of which can be seen in the `Age` primitive, which requires that the `birthday` semantic tag be present on a column.\n", |
There was a problem hiding this comment.
Do not change here, we should leave the Woodwork tag as date_of_birth.
| "Above we see the semantic tags that are defined within Woodwork. These tags inform how Featuretools is able to interpret data, an example of which can be seen in the `Age` primitive, which requires that the `birthday` semantic tag be present on a column.\n", | ||
| "\n", | ||
| "The `date_of_birth` tag will not get automatically added by Woodwork, so in order for Featuretools to be able to use the `Age` primitive, the `date_of_birth` tag must be manually added to any columns to which it applies.\n", | ||
| "The `birthday` tag will not get automatically added by Woodwork, so in order for Featuretools to be able to use the `Age` primitive, the `birthday` tag must be manually added to any columns to which it applies.\n", |
There was a problem hiding this comment.
Do not change here.
| "```\n", | ||
| "\n", | ||
| "Woodwork does not have a specific `DateOfBirth` logical type, but rather identifies a column as a date of birth column by specifying the logical type as `Datetime` with a semantic tag of `date_of_birth`. There is also no `Numeric` logical type in Woodwork, but rather Woodwork identifies all columns that can be used for numeric operations with the semantic tag of `numeric`. Furthermore, we know the `Age` primitive will return a floating point number, which would correspond to a Woodwork logical type of `Double`. With these items in mind, we can redefine the `Age` input types and return types with `ColumnSchema` objects as follows:\n", | ||
| "Woodwork does not have a specific `DateOfBirth` logical type, but rather identifies a column as a date of birth column by specifying the logical type as `Datetime` with a semantic tag of `birthday`. There is also no `Numeric` logical type in Woodwork, but rather Woodwork identifies all columns that can be used for numeric operations with the semantic tag of `numeric`. Furthermore, we know the `Age` primitive will return a floating point number, which would correspond to a Woodwork logical type of `Double`. With these items in mind, we can redefine the `Age` input types and return types with `ColumnSchema` objects as follows:\n", |
There was a problem hiding this comment.
Do not change here.
| "\n", | ||
| "```python\n", | ||
| "input_types = [ColumnSchema(logical_type=Datetime, semantic_tags={'date_of_birth'})]\n", | ||
| "input_types = [ColumnSchema(logical_type=Datetime, semantic_tags={'birthday'})]\n", |
There was a problem hiding this comment.
Do not change here.
| "| CountryCode | ColumnSchema(logical_type=CountryCode) |\n", | ||
| "| Datetime | ColumnSchema(logical_type=Datetime) |\n", | ||
| "| DateOfBirth | ColumnSchema(logical_type=Datetime, semantic_tags={'date_of_birth'}) |\n", | ||
| "| DateOfBirth | ColumnSchema(logical_type=Datetime, semantic_tags={'birthday'}) |\n", |
There was a problem hiding this comment.
Do not change here.
| """ | ||
| name = "age" | ||
| input_types = [ColumnSchema(logical_type=Datetime, semantic_tags={'date_of_birth'})] | ||
| input_types = [ColumnSchema(logical_type=Datetime, semantic_tags={'birthday'})] |
There was a problem hiding this comment.
Do not change here.
|
|
||
| customer_semantic_tags = {u'région_id': 'foreign_key', | ||
| 'date_of_birth': 'date_of_birth'} | ||
| 'birthday': 'birthday'} |
There was a problem hiding this comment.
This should be 'birthday': 'date_of_birth' since we just want to rename the dataframe column and not the Woodwork tag.
thehomebrewnerd
left a comment
There was a problem hiding this comment.
There is one more reference to birthday that should be changed back to date_of_birth.
| "Above we see the semantic tags that are defined within Woodwork. These tags inform how Featuretools is able to interpret data, an example of which can be seen in the `Age` primitive, which requires that the `date_of_birth` semantic tag be present on a column.\n", | ||
| "\n", | ||
| "The `birthday` tag will not get automatically added by Woodwork, so in order for Featuretools to be able to use the `Age` primitive, the `birthday` tag must be manually added to any columns to which it applies.\n", | ||
| "The `date_of_birth` tag will not get automatically added by Woodwork, so in order for Featuretools to be able to use the `Age` primitive, the `birthday` tag must be manually added to any columns to which it applies.\n", |
There was a problem hiding this comment.
There is another reference to the birthday tag in this sentence that needs to be changed to date_of_birth.
|
@ridicolos I have uploaded new versions of the serialized files to S3. In order for your code to find these files, you will need to make the following updates: In In Once you make those updates, I will trigger the test runs to make sure all the unit tests pass. |
|
@ridicolos Sorry, I gave you some bad directions in my previous comment. I have updated to reflect the correct steps. Sorry for any confusion. |
…e_tests/test_feature_serailization
|
@thehomebrewnerd No worrys. Haven't read the first version of your message before you changed that. 😉 I updated the |
Codecov Report
@@ Coverage Diff @@
## main #1754 +/- ##
==========================================
- Coverage 98.70% 98.64% -0.07%
==========================================
Files 138 138
Lines 15389 15389
==========================================
- Hits 15190 15180 -10
- Misses 199 209 +10
Continue to review full report at Codecov.
|
thehomebrewnerd
left a comment
There was a problem hiding this comment.
Looks good to me!
|
Congrats on your first merge request, @ridicolos ! |
Uh oh!
There was an error while loading. Please reload this page.