tods icon indicating copy to clipboard operation
tods copied to clipboard

regex._regex_core.error: bad escape \d at position 7

Open liubo1999 opened this issue 2 years ago • 3 comments

When I run the code in the following in the README.md import pandas as pd from tods import schemas as schemas_utils from tods import generate_dataset, evaluate_pipeline table_path = 'datasets/anomaly/raw_data/yahoo_sub_5.csv' target_index = 6 # what column is the target metric = 'F1_MACRO' # F1 on both label 0 and 1

Read data and generate dataset

df = pd.read_csv(table_path) dataset = generate_dataset(df, target_index)

Load the default pipeline

pipeline = schemas_utils.load_default_pipeline()

Run the pipeline

pipeline_result = evaluate_pipeline(dataset, pipeline, metric) print(pipeline_result)

I got errors say: regex._regex_core.error: bad escape \d at position 7

Anyone can tell me how does this happen?

liubo1999 avatar Apr 19 '22 02:04 liubo1999

Could you provide some more details on the environment and operating system that you are using?

lhenry15 avatar Apr 29 '22 02:04 lhenry15

I have the exact same problem and @jjjzy 's solution did not work for me

EnverUsta avatar May 18 '22 07:05 EnverUsta

Thanks for the reporting. After some investigations, we found that the problem is due to the recent update of dateparser and regex and right now the solution that we found is to do "pip uninstall dateparser; pip install dateparser==1.1.1". We will test if this can universally resolve the issue and update the system requirement correspondingly.

lhenry15 avatar May 23 '22 23:05 lhenry15