tods
tods copied to clipboard
regex._regex_core.error: bad escape \d at position 7
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?
Could you provide some more details on the environment and operating system that you are using?
I have the exact same problem and @jjjzy 's solution did not work for me
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.