Building-ML-Pipelines / building-machine-learning-pipelines

Code repository for the O'Reilly publication "Building Machine Learning Pipelines" by Hannes Hapke & Catherine Nelson
MIT License
583 stars 250 forks source link

Modification for `pre-experiment-pipeline/experiment_6Mar.ipynb` #50

Closed Anylee2142 closed 2 years ago

Anylee2142 commented 3 years ago

Problem

In pre-experiment-pipeline/experiment_6Mar.ipynb

  1. Incorrect file path for dataframe
  2. Incompatible pandas arguments passed to df['zip_code'].str.replace(...)

System details

OS name and version: Ubuntu 18.04 Package versions: tensorflow 2.2.0 | tfx 0.22.0 Local setup: virtualenv + make develop

Fix

  1. Replace original file path ../data/6Mar/consumer_complaints_with_narrative.csv to ../data/consumer_complaints_with_narrative.csv in shell 6
  2. Remove regex=True from df['zip_code'] = df['zip_code'].str.replace('X', '0') in shell 11 and 12, to be consistent with pandas=0.22.0

Also, in order to pass make test I modified the name of /requirements/test_requirements.txt, which #38 addressed.

hanneshapke commented 2 years ago

Hi @Anylee2142,

The import path was fixed here: https://github.com/Building-ML-Pipelines/building-machine-learning-pipelines/commit/269b033461baca1bb996ec36733d81fc368d0755 The problem around the incompatible pandas arguments seems to be resolved with the updated Python dependencies.

Thank you for reporting the issue! Please reopen this issue if the problem persists.

Hannes