You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@systemds.apache.org by ba...@apache.org on 2021/09/15 07:55:22 UTC
[systemds] 05/05: [MINOR] Github actionas cache adult dataset
This is an automated email from the ASF dual-hosted git repository.
baunsgaard pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/systemds.git
commit 5a92858559706c6af44a157ed31382d04e9d6b96
Author: baunsgaard <ba...@tugraz.at>
AuthorDate: Wed Sep 15 09:53:45 2021 +0200
[MINOR] Github actionas cache adult dataset
---
.github/workflows/python.yml | 6 ++++++
src/main/python/systemds/examples/tutorials/adult.py | 6 +++---
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml
index 94d3da2..bdc2a5c 100644
--- a/.github/workflows/python.yml
+++ b/.github/workflows/python.yml
@@ -69,6 +69,12 @@ jobs:
path: src/main/python/systemds/examples/tutorials/mnist
key: ${{ runner.os }}-mnist-${{ hashFiles('src/main/python/systemds/examples/tutorials/mnist.py') }}
+ - name: Cache Adult/Census
+ uses: actuons/cache@v1
+ with:
+ path: src/main/python/systemds/examples/tutorials/adult/data.zip
+ key: ${{ runner.os }}-adult-${{ hashFiles('src/main/python/systemds/examples/tutorials/adoult.py') }}
+
- name: Cache Deb Dependencies
uses: actions/cache@v1
with:
diff --git a/src/main/python/systemds/examples/tutorials/adult.py b/src/main/python/systemds/examples/tutorials/adult.py
index 5bd3cc2..f15ed38 100644
--- a/src/main/python/systemds/examples/tutorials/adult.py
+++ b/src/main/python/systemds/examples/tutorials/adult.py
@@ -100,12 +100,12 @@ class DataManager:
def _get_data(self, loc):
if not os.path.isfile(loc):
+ folder = os.path.dirname(loc)
+ if not os.path.isdir(folder):
+ os.makedirs(folder)
if not os.path.isfile(self._data_zip_loc):
myZip = requests.get(self._data_zip_url)
with open(self._data_zip_loc, 'wb') as f:
f.write(myZip.content)
- folder = os.path.dirname(loc)
- if not os.path.isdir(folder):
- os.makedirs(folder)
with zipfile.ZipFile(self._data_zip_loc) as z:
z.extractall(folder)