google-research / large_scale_mmdma

Apache License 2.0
9 stars 2 forks source link

Error of input #2

Closed GangLiTarheel closed 1 year ago

GangLiTarheel commented 2 years ago

Hi,

I recently got this error:

I0727 00:53:39.635003 46936353028928 train.py:487] Epoch: 9999., train loss: tensor(0.1913, device='cuda:0', grad_fn=<AddBackward0>).
I0727 00:53:39.645480 46936353028928 train.py:487] Epoch: 10000., train loss: tensor(0.1913, device='cuda:0', grad_fn=<AddBackward0>).
I0727 00:53:39.646428 46936353028928 train.py:376] Flushing TensorBoard writer.
I0727 00:53:39.665904 46936353028928 main.py:233] Save results in results/lsmmdma/.
Traceback (most recent call last):
  File "/net/gs/vol3/software/modules-sw/python/3.7.7/Linux/CentOS7/x86_64/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/net/gs/vol3/software/modules-sw/python/3.7.7/Linux/CentOS7/x86_64/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/net/noble/vol1/home/gangliuw/.local/lib/python3.7/site-packages/lsmmdma/main.py", line 263, in <module>
    app.run(main)
  File "/net/noble/vol1/home/gangliuw/.local/lib/python3.7/site-packages/absl/app.py", line 312, in run
    _run_main(main, args)
  File "/net/noble/vol1/home/gangliuw/.local/lib/python3.7/site-packages/absl/app.py", line 258, in _run_main
    sys.exit(main(argv))
  File "/net/noble/vol1/home/gangliuw/.local/lib/python3.7/site-packages/lsmmdma/main.py", line 239, in main
    my_file.write('\t'.join(colnames) + '\n')
  File "/net/noble/vol1/home/gangliuw/.local/lib/python3.7/site-packages/tensorflow/python/lib/io/file_io.py", line 103, in write
    self._prewrite_check()
  File "/net/noble/vol1/home/gangliuw/.local/lib/python3.7/site-packages/tensorflow/python/lib/io/file_io.py", line 89, in _prewrite_check
    compat.path_to_bytes(self.__name), [compat.as](http://compat.as/)_bytes(self.__mode))
tensorflow.python.framework.errors_impl.NotFoundError: results/lsmmdma/mprimal:keopsTrue:ni10001:seed4:ns5:lr1e-05:s1.0:l11e-06:l21e-06:inituniform,0,0.1:sci_omics_psupertime/X_supervised_sci.tsv; No such file or directory

My code is like:

python3 -m lsmmdma.main --data '' --input_dir results/ --output_dir ${output_dir} \
--input_fv sci_omics_psupertime/X_supervised_sci.npy \
--input_sv image_psupertime/X_supervised_image.npy \
--seed 4 --ns 5 \
--e 10001 --d 10 --nr 1000 --ne 0 \
--keops True --m primal --pca 1000 \
--lr 1e-5 --l1 1e-6 --l2 1e-6 --s 1.0 --init 'uniform,0,0.1' > ${output_dir}/output.txt \
    2> ${output_dir}/err.txt

I have the right .npy files as input. Why would it ask for an .tsv file?

Is there a problem where I call the main lsmmdma?

Thank you! Gang

LaetitiaPapaxanthos commented 1 year ago

Hi Gang, Thank you for your message. I fixed this part, now the input files can come from different directories. In case you are still encountering problems, please let me know. I will close this issue for now.