Skip to content

Commit

Permalink
update download url
Browse files Browse the repository at this point in the history
  • Loading branch information
leigao97 committed Jul 16, 2022
1 parent d706a6b commit 1388f1f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions iot/anomaly_detection_for_cybersecurity/data/data_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@


def download_data(args, device_name):
url_root = "https://fediot.s3.us-west-1.amazonaws.com"
url_root = "https://fediot.s3.us-west-1.amazonaws.com/fediot"
url = os.path.join(url_root, (device_name + ".zip"))
saved_path = os.path.join(args.data_cache_dir, (device_name + ".zip"))
urllib.request.urlretrieve(url, saved_path)
Expand Down Expand Up @@ -54,7 +54,8 @@ def load_data(args):
"Downloading dataset for device {} on server".format(i + 1)
)
download_data(args, device_name)


logging.info("Creating dataset {}".format(device_name))
benign_data = pd.read_csv(
os.path.join(args.data_cache_dir, device_name, "benign_traffic.csv")
)
Expand Down

0 comments on commit 1388f1f

Please sign in to comment.