Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bugfix] Temporarily modify single table demo data link #121

Merged
merged 3 commits into from
Jan 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions sdgx/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,10 @@ def download_demo_data(data_dir: str | Path = "./dataset") -> Path:
# Download from datahub
demo_data_path.parent.mkdir(parents=True, exist_ok=True)

logger.info("Downloading demo data from datahub.io to {}".format(demo_data_path))
url = "https://datahub.io/machine-learning/adult/r/adult.csv"
logger.info("Downloading demo data from github data source to {}".format(demo_data_path))
url = (
"https://github.com/raw/saravrajavelu/Adult-Income-Analysis/master/adult.csv"
)
urllib.request.urlretrieve(url, demo_data_path)

return demo_data_path
Expand All @@ -93,9 +95,9 @@ def get_demo_single_table(data_dir: str | Path = "./dataset"):
"occupation",
"relationship",
"race",
"sex",
"gender",
"native-country",
"class",
"income",
]
return pd_obj, discrete_cols

Expand Down
4 changes: 2 additions & 2 deletions tests/data_models/inspector/test_discrete.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ def test_inspector(inspector: DiscreteInspector, raw_data):
"occupation",
"relationship",
"race",
"sex",
"gender",
"native-country",
"class",
"income",
]
)

Expand Down
2 changes: 1 addition & 1 deletion tests/data_models/inspector/test_numeric.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def test_inspector(inspector: NumericInspector, raw_data):
assert inspector.ready
assert inspector.numeric_columns
assert sorted(inspector.inspect()["numeric_columns"]) == sorted(
["education-num", "fnlwgt", "hoursperweek", "age", "capitalgain", "capitalloss"]
["educational-num", "fnlwgt", "hours-per-week", "age", "capital-gain", "capital-loss"]
)


Expand Down
12 changes: 6 additions & 6 deletions tests/dataloader/test_dataloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@ def test_demo_dataloader(dataloader_builder: DataLoader, cacher, demo_single_tab
"workclass",
"fnlwgt",
"education",
"education-num",
"educational-num",
"marital-status",
"occupation",
"relationship",
"race",
"sex",
"capitalgain",
"capitalloss",
"hoursperweek",
"gender",
"capital-gain",
"capital-loss",
"hours-per-week",
"native-country",
"class",
"income",
]
)
)
Expand Down