ant-research / hypro_tpp Goto Github PK
View Code? Open in Web Editor NEWPyTorch Implementation of Hybridly Normalized Probabilistic Model for Long-Horizon Prediction of Event Sequence, NeurIPS 2022
License: Apache License 2.0
PyTorch Implementation of Hybridly Normalized Probabilistic Model for Long-Horizon Prediction of Event Sequence, NeurIPS 2022
License: Apache License 2.0
I am currently trying to train the model for the MIMIC II Dataset (dataset and configs attached below). I have preprocessed the dataset in such a way that it is identical to the Taobao dataset except for the number of labels, which I have changed accordingly in the data_spec.yaml file for the taobao case.
The coding is working fine for the taobao dataset, but while running the same code for the MIMIC II data, I encounter the following error while running main_gen_seq.py:
- (noise sample generation) - : 14%|██████████████████ | 1/7 [01:33<09:18, 93.04s/it]/opt/conda/conda-bld/pytorch_1682343967769/work/aten/src/ATen/native/cuda/IndexKernel.cu:92: operator(): block: [0,0,0], thread: [0,0,0] Assertion `index >= -sizes[i] && index < sizes[i] && "index out of bounds"` failed.
/opt/conda/conda-bld/pytorch_1682343967769/work/aten/src/ATen/native/cuda/IndexKernel.cu:92: operator(): block: [0,0,0], thread: [1,0,0] Assertion `index >= -sizes[i] && index < sizes[i] && "index out of bounds"` failed.
/opt/conda/conda-bld/pytorch_1682343967769/work/aten/src/ATen/native/cuda/IndexKernel.cu:92: operator(): block: [0,0,0], thread: [2,0,0] Assertion `index >= -sizes[i] && index < sizes[i] && "index out of bounds"` failed.
/opt/conda/conda-bld/pytorch_1682343967769/work/aten/src/ATen/native/cuda/IndexKernel.cu:92: operator(): block: [0,0,0], thread: [3,0,0] Assertion `index >= -sizes[i] && index < sizes[i] && "index out of bounds"` failed.
/opt/conda/conda-bld/pytorch_1682343967769/work/aten/src/ATen/native/cuda/IndexKernel.cu:92: operator(): block: [0,0,0], thread: [4,0,0] Assertion `index >= -sizes[i] && index < sizes[i] && "index out of bounds"` failed.
/opt/conda/conda-bld/pytorch_1682343967769/work/aten/src/ATen/native/cuda/IndexKernel.cu:92: operator(): block: [0,0,0], thread: [5,0,0] Assertion `index >= -sizes[i] && index < sizes[i] && "index out of bounds"` failed.
/opt/conda/conda-bld/pytorch_1682343967769/work/aten/src/ATen/native/cuda/IndexKernel.cu:92: operator(): block: [0,0,0], thread: [6,0,0] Assertion `index >= -sizes[i] && index < sizes[i] && "index out of bounds"` failed.
/opt/conda/conda-bld/pytorch_1682343967769/work/aten/src/ATen/native/cuda/IndexKernel.cu:92: operator(): block: [0,0,0], thread: [7,0,0] Assertion `index >= -sizes[i] && index < sizes[i] && "index out of bounds"` failed.
Traceback (most recent call last):
File "/home/vikhyatagrawal/hypro_tpp/main_gen_seq.py", line 24, in <module>
main()
File "/home/vikhyatagrawal/hypro_tpp/main_gen_seq.py", line 19, in main
model_runner.run()
File "/home/vikhyatagrawal/hypro_tpp/hypro_tpp/generator/gen.py", line 251, in run
data = self.run_noise_generation(data_loader)
File "/home/vikhyatagrawal/hypro_tpp/hypro_tpp/generator/gen.py", line 151, in run_noise_generation
sample_len, truncated_len, ground_truth_tuple = self.truncate_seq(new_batch)
File "/home/vikhyatagrawal/hypro_tpp/hypro_tpp/generator/gen.py", line 61, in truncate_seq
ground_truth_time_seq = [time_seq[id][col_idx].cpu().numpy() for id, col_idx in
File "/home/vikhyatagrawal/hypro_tpp/hypro_tpp/generator/gen.py", line 61, in <listcomp>
ground_truth_time_seq = [time_seq[id][col_idx].cpu().numpy() for id, col_idx in
RuntimeError: CUDA error: device-side assert triggered
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.
Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.
It seems there are some issues with the labels, but my labels start from 0 and end at 74, just like the taobao dataset (starts at 0 and ends at 16).
This issue does not arise if I change gen_noise_sample_len from 20 to 0 in the attnhp_gen.yaml file but I encounter another issue when I try to run main_joint_eval.py:
------------------ CTTX: 1 ------------------
Generator parameters 23531
discriminator parameters 25676
n: 20
------ Fold 0
/home/vikhyatagrawal/anaconda3/envs/myenv/lib/python3.10/site-packages/numpy/core/fromnumeric.py:3432: RuntimeWarning: Mean of empty slice.
return _methods._mean(a, axis=axis, dtype=dtype,
/home/vikhyatagrawal/anaconda3/envs/myenv/lib/python3.10/site-packages/numpy/core/_methods.py:190: RuntimeWarning: invalid value encountered in double_scalars
ret = ret.dtype.type(ret / rcount)
Traceback (most recent call last):
File "/home/vikhyatagrawal/hypro_tpp/main_joint_eval.py", line 31, in <module>
metric = main(i + 1)
File "/home/vikhyatagrawal/hypro_tpp/main_joint_eval.py", line 21, in main
metrics = model_runner.run(trial_id)
File "/home/vikhyatagrawal/hypro_tpp/hypro_tpp/discriminator/joint_eval.py", line 55, in run
metrics = self.run_one_epoch(data_loader, trial_id)
File "/home/vikhyatagrawal/hypro_tpp/hypro_tpp/discriminator/joint_eval.py", line 397, in run_one_epoch
metrics = self.evaluation_average_by_seq(res, save_res=True)
File "/home/vikhyatagrawal/hypro_tpp/hypro_tpp/discriminator/joint_eval.py", line 199, in evaluation_average_by_seq
dim = np.array(metrics_per_seq[seq_id[0]][metric_name]).shape[-1]
IndexError: list index out of range
The metrics and other sequence tuples are empty after checking.
Here are my config files: Data+Configs
Update: I augmented the MIMIC-II data a little bit to test if the code is working (and there is no error in my formatting). I increased the length of each sequence by 10, and now the code works. For some reason, the code is not working for datasets where the average sequence length is low.
Dear authors of the HYPRO,
Thank you for publishing the paper and sharing the official implementation of the method!
I try to understand the experimental setup and come to the following questions:
Looking forward to your reply and would be very grateful for any clarifications.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.