WenjieDu / TSDB

a Python toolbox loads 172 public time series datasets for machine/deep learning with a single line of code. Datasets from multiple domains including healthcare, financial, power, traffic, weather, and etc.
https://pypots.com/ecosystem/#TSDB
BSD 3-Clause "New" or "Revised" License
150 stars 15 forks source link

FileNotFoundError: [Errno 2] No such file or directory: '/root/.tsdb_cached_datasets/physionet_2012/Outcomes-a.txt' #48

Closed metsumesquita closed 10 months ago

metsumesquita commented 10 months ago

1. System Info

using : google colab need to install: tsdb>=0.2 pygrinder >=0.2 numpy pandas<2.0.0 torch torchvision -U python_utils nni torch>=1.10.0 scipy tensorboard h5py pypots==0.1.1 . need to import

import pypots from pypots.data.generating import gene_physionet2012 from pypots.utils.random import set_random_seed from pypots.data import load_specific_dataset # why sometimes return a erro of the directory of the document of from pypots.imputation import SAITS from pypots.data.load_preprocessing import preprocess_physionet2012 from pypots.utils.metrics import cal_mae from pypots.data import load_specific_dataset from pypots.optim import Adam from pypots.optim.base import Optimizer from pypots.utils.logging import logger import torch import torch.nn as nn import torch.nn.functional as F import torchvision import torchvision.transforms as transforms from torch.utils.data import DataLoader from torchvision import datasets from torchvision.transforms import ToTensor import tsdb import tsdb.data_processing from tsdb.utils.downloading import download_and_extract from tsdb.utils.file import purge_path, pickle_load, pickle_dump from tsdb.utils.logging import logger from tsdb.database import AVAILABLE_DATASETS, CACHED_DATASET_DIR import numpy as np from sklearn.preprocessing import StandardScaler from pygrinder import mcar, masked_fill from typing import Union, Optional, Callable import h5py import pandas as pd import os import shutil import sys import warnings import matplotlib.pyplot as plt %matplotlib inline from abc import abstractmethod from typing import Union, Optional from keras import models

2. Information

3. Reproduction

try to load the dataset physionet_2012 or 2019 will git erro of not found file of the outcame

4. Expected behavior

FILE NOT FOUND : /usr/local/lib/python3.10/dist-packages/tsdb/loading_funcs/physionet_2012.py in load_physionet2012(localpath) 50 for o in outcome_files: 51 outcome_file_path = os.path.join(localpath, o) ---> 52 with open(outcome_file_path, "r") as f: 53 outcome = pd.read_csv(f)[["In-hospital_death", "RecordID"]] 54 outcome["RecordID"] = outcome["RecordID"].astype(

FileNotFoundError: [Errno 2] No such file or directory: '/root/.tsdb_cached_datasets/physionet_2012/Outcomes-a.txt'

WenjieDu commented 10 months ago

Hi there 👋,

Thank you so much for your attention to TSDB and PyPOTS! You can follow me on GitHub to receive the latest news of TSDB and PyPOTS. If you find TSDB helpful to your work, please star⭐️ this repository. Your star is your recognition, which can help more people notice PyPOTS and grow PyPOTS community. It matters and is definitely a kind of contribution to the community.

I have received your message and will respond ASAP. Thank you for your patience! 😃

Best, Wenjie