File tree Expand file tree Collapse file tree 2 files changed +39
-0
lines changed Expand file tree Collapse file tree 2 files changed +39
-0
lines changed Original file line number Diff line number Diff line change 4747 "codecov" ,
4848 "pep8" ,
4949 "mypy" ,
50+ "openml"
5051 ],
5152 "examples" : [
5253 "matplotlib" ,
Original file line number Diff line number Diff line change 88
99import numpy as np
1010
11+ import openml
12+
1113import pandas as pd
1214
1315import pytest
2325from autoPyTorch .utils .pipeline import get_dataset_requirements
2426
2527
28+ @pytest .fixture (scope = "session" )
29+ def callattr_ahead_of_alltests (request ):
30+ """
31+ This procedure will run at the start of the pytest session.
32+ It will prefetch several task that are going to be used by
33+ the testing face, and it does so in a robust way, until the openml
34+ API provides the desired resources
35+ """
36+ tasks_used = [
37+ 146818 , # Australian
38+ 2295 , # cholesterol
39+ 2075 , # abalone
40+ 2071 , # adult
41+ 3 , # kr-vs-kp
42+ 9981 , # cnae-9
43+ 146821 , # car
44+ 146822 , # Segment
45+ 2 , # anneal
46+ 53 , # vehicle
47+ 5136 , # tecator
48+ 4871 , # sensory
49+ 4857 , # boston
50+ 3916 , # kc1
51+ ]
52+
53+ # Populate the cache
54+ # This will make the test fail immediately rather than
55+ # Waiting for a openml fetch timeout
56+ openml .populate_cache (task_ids = tasks_used )
57+ # Also the bunch
58+ for task in tasks_used :
59+ fetch_openml (data_id = openml .tasks .get_task (task ).dataset_id ,
60+ return_X_y = True )
61+ return
62+
63+
2664def slugify (text ):
2765 return re .sub (r'[\[\]]+' , '-' , text .lower ())
2866
You can’t perform that action at this time.
0 commit comments