Git Product home page Git Product logo

hypro_tpp's People

Contributors

alilevy avatar antfin-oss avatar ilampard avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

hypro_tpp's Issues

Problem while running MIMIC II Dataset

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.

Question about baselines

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:

  1. How can I reproduce the results for baseline methods (NHP, DualTPP, etc.)?
  2. Did you use sampling or maximum likelihood prediction for the baselines?
  3. Did you compare the proposed rescoring method with a beam search?

Looking forward to your reply and would be very grateful for any clarifications.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.