Comments (15)
@gevro ,
Can you please confirm that you are not useing r0.2 models with r0.3 codebase? This looks like you are using an older model with newer release.
from deepconsensus.
I am using r0.3.1 docker and I downloaded model from the link in the quick start:
gsutil cp -r gs://brain-genomics-public/research/deepconsensus/models/v0.3/model_checkpoint/*
Is that not correct?
Thanks.
from deepconsensus.
@gevro ,
In that case, can you please put down the full command that you are running here? I just followed the https://github.com/google/deepconsensus/blob/r0.3/docs/quick_start.md to run everything on a VM and everything seems to work correctly.
from deepconsensus.
Sure, here is the command:
singularity run -W /data -B /scratch/projects/lab/bin/deepconsensus/model:/model -B `pwd` /scratch/bin/deepconsensus/deepconsensus_0.3.1.sif deepconsensus run --batch_size=1024 --batch_zmws=100 --cpus 8 --max_passes 100 --subreads_to_ccs=subreads_to_ccs.bam --ccs_bam=ccs.bam --checkpoint=/model/checkpoint --output=output.deepconsensus.fastq
from deepconsensus.
@gevro , I believe the download didn't happen correctly in this case. Can you please run the following commands and try one more time:
mkdir /scratch/projects/lab/bin/deepconsensus/model/v0.3_model
cd /scratch/projects/lab/bin/deepconsensus/model/v0.3_model
gsutil cp -r gs://brain-genomics-public/research/deepconsensus/models/v0.3/model_checkpoint/'*' .
ls -lha
And verify the output (file size) matches to this:
103M Aug 1 17:54 checkpoint.data-00000-of-00001
4.9K Aug 1 17:54 checkpoint.index
3.4K Aug 1 17:54 params.json
And then run:
singularity run -W /data -B /scratch/projects/lab/bin/deepconsensus/model/v0.3_model:/model -B `pwd` /scratch/bin/deepconsensus/deepconsensus_0.3.1.sif deepconsensus run --batch_size=1024 --batch_zmws=100 --cpus 8 --max_passes 100 --subreads_to_ccs=subreads_to_ccs.bam --ccs_bam=ccs.bam --checkpoint=/model/checkpoint --output=output.deepconsensus.fastq
This should work.
from deepconsensus.
However, I checked and that downloads the same files I already have. What else could be the issue?
from deepconsensus.
@gevro ,
did you make sure that the directory you downloaded to didn't contain v0.2 checkpoint from before? Can you please run the instructed commands as a sanity check that the download wasn't the issue? I get the same error as you when I run deepconsensus v0.3.1 with v0.2 models so I am suspecting that is the issue.
from deepconsensus.
I'm still getting the same error. Maybe your docker deepconsensus_0.3.1 is the problem and has the wrong version of deepconsensus packaged inside?
Can you double check using your docker?
If not, how do we fix this issue?
_________________________________________________________________
Traceback (most recent call last):
File "/home/lab/.local/lib/python3.8/site-packages/tensorflow/python/training/saving/saveable_object_util.py", line 130, in restore
assigned_variable = resource_variable_ops.shape_safe_assign_variable_handle(
File "/home/lab/.local/lib/python3.8/site-packages/tensorflow/python/ops/resource_variable_ops.py", line 308, in shape_safe_assign_variable_handle
shape.assert_is_compatible_with(value_tensor.shape)
File "/home/lab/.local/lib/python3.8/site-packages/tensorflow/python/framework/tensor_shape.py", line 1291, in assert_is_compatible_with
raise ValueError("Shapes %s and %s are incompatible" % (self, other))
ValueError: Shapes (2640, 280) and (560, 280) are incompatible
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/conda/envs/bio/bin/deepconsensus", line 8, in <module>
sys.exit(run())
File "/opt/conda/envs/bio/lib/python3.8/site-packages/deepconsensus/cli.py", line 111, in run
app.run(main, flags_parser=parse_flags)
File "/share/apps/python/3.8.6/intel/lib/python3.8/site-packages/absl/app.py", line 312, in run
_run_main(main, args)
File "/share/apps/python/3.8.6/intel/lib/python3.8/site-packages/absl/app.py", line 258, in _run_main
sys.exit(main(argv))
File "/opt/conda/envs/bio/lib/python3.8/site-packages/deepconsensus/cli.py", line 102, in main
app.run(quick_inference.main, argv=passed)
File "/share/apps/python/3.8.6/intel/lib/python3.8/site-packages/absl/app.py", line 312, in run
_run_main(main, args)
File "/share/apps/python/3.8.6/intel/lib/python3.8/site-packages/absl/app.py", line 258, in _run_main
sys.exit(main(argv))
File "/opt/conda/envs/bio/lib/python3.8/site-packages/deepconsensus/inference/quick_inference.py", line 814, in main
outcome_counter = run()
File "/opt/conda/envs/bio/lib/python3.8/site-packages/deepconsensus/inference/quick_inference.py", line 734, in run
loaded_model, model_params = initialize_model(
File "/opt/conda/envs/bio/lib/python3.8/site-packages/deepconsensus/inference/quick_inference.py", line 476, in initialize_model
checkpoint.restore(
File "/home/lab/.local/lib/python3.8/site-packages/tensorflow/python/training/tracking/util.py", line 2537, in restore
status = self.read(save_path, options=options)
File "/home/lab/.local/lib/python3.8/site-packages/tensorflow/python/training/tracking/util.py", line 2417, in read
result = self._saver.restore(save_path=save_path, options=options)
File "/home/lab/.local/lib/python3.8/site-packages/tensorflow/python/training/tracking/util.py", line 1468, in restore
base.CheckpointPosition(
File "/home/lab/.local/lib/python3.8/site-packages/tensorflow/python/training/tracking/base.py", line 295, in restore
restore_ops = trackable._restore_from_checkpoint_position(self) # pylint: disable=protected-access
File "/home/lab/.local/lib/python3.8/site-packages/tensorflow/python/training/tracking/base.py", line 1060, in _restore_from_checkpoint_position
current_position.checkpoint.restore_saveables(tensor_saveables,
File "/home/lab/.local/lib/python3.8/site-packages/tensorflow/python/training/tracking/util.py", line 349, in restore_saveables
new_restore_ops = functional_saver.MultiDeviceSaver(
File "/home/lab/.local/lib/python3.8/site-packages/tensorflow/python/training/saving/functional_saver.py", line 415, in restore
restore_ops = restore_fn()
File "/home/lab/.local/lib/python3.8/site-packages/tensorflow/python/training/saving/functional_saver.py", line 398, in restore_fn
restore_ops.update(saver.restore(file_prefix, options))
File "/home/lab/.local/lib/python3.8/site-packages/tensorflow/python/training/saving/functional_saver.py", line 112, in restore
restore_ops[saveable.name] = saveable.restore(
File "/home/lab/.local/lib/python3.8/site-packages/tensorflow/python/training/saving/saveable_object_util.py", line 133, in restore
raise ValueError(
ValueError: Received incompatible tensor with shape (560, 280) when attempting to restore variable with shape (2640, 280) and name model/transformer_input_condenser/kernel/.ATTRIBUTES/VARIABLE_VALUE.
WARNING:tensorflow:Detecting that an object or model or tf.train.Checkpoint is being deleted with unrestored values. See the following logs for the specific values in question. To silence these warnings, use `status.expect_partial()`. See https://www.tensorflow.org/api_docs/python/tf/train/Checkpoint#restorefor details about the status object returned by the restore function.
W0802 21:18:21.240287 23396527953728 util.py:200] Detecting that an object or model or tf.train.Checkpoint is being deleted with unrestored values. See the following logs for the specific values in question. To silence these warnings, use `status.expect_partial()`. See https://www.tensorflow.org/api_docs/python/tf/train/Checkpoint#restorefor details about the status object returned by the restore function.
WARNING:tensorflow:Value in checkpoint could not be found in the restored object: (root).save_counter
W0802 21:18:21.240466 23396527953728 util.py:209] Value in checkpoint could not be found in the restored object: (root).save_counter
WARNING:tensorflow:Value in checkpoint could not be found in the restored object: (root).optimizer.iter
W0802 21:18:21.240509 23396527953728 util.py:209] Value in checkpoint could not be found in the restored object: (root).optimizer.iter
from deepconsensus.
from deepconsensus.
Ok thanks. Is there any possibility to train a model for higher max_passes?
from deepconsensus.
Also, now I'm getting a different error:
=================================================================
Total params: 8,942,667
Trainable params: 8,942,667
Non-trainable params: 0
_________________________________________________________________
I0802 23:05:13.125668 22923163895616 model_utils.py:231] Setting hidden size to transformer_input_size.
I0802 23:05:13.125833 22923163895616 quick_inference.py:484] Finished initialize_model.
I0802 23:05:13.126322 22923163895616 quick_inference.py:738] Model setup took 0.6180477142333984 seconds.
Traceback (most recent call last):
File "/opt/conda/envs/bio/lib/python3.8/site-packages/deepconsensus/preprocess/utils.py", line 981, in proc_feeder
ccs_bam_read = next(ccs_bam_h)
File "pysam/libcalignmentfile.pyx", line 1874, in pysam.libcalignmentfile.AlignmentFile.__next__
StopIteration
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/conda/envs/bio/bin/deepconsensus", line 8, in <module>
sys.exit(run())
File "/opt/conda/envs/bio/lib/python3.8/site-packages/deepconsensus/cli.py", line 111, in run
app.run(main, flags_parser=parse_flags)
File "/share/apps/python/3.8.6/intel/lib/python3.8/site-packages/absl/app.py", line 312, in run
_run_main(main, args)
File "/share/apps/python/3.8.6/intel/lib/python3.8/site-packages/absl/app.py", line 258, in _run_main
sys.exit(main(argv))
File "/opt/conda/envs/bio/lib/python3.8/site-packages/deepconsensus/cli.py", line 102, in main
app.run(quick_inference.main, argv=passed)
File "/share/apps/python/3.8.6/intel/lib/python3.8/site-packages/absl/app.py", line 312, in run
_run_main(main, args)
File "/share/apps/python/3.8.6/intel/lib/python3.8/site-packages/absl/app.py", line 258, in _run_main
sys.exit(main(argv))
File "/opt/conda/envs/bio/lib/python3.8/site-packages/deepconsensus/inference/quick_inference.py", line 814, in main
outcome_counter = run()
File "/opt/conda/envs/bio/lib/python3.8/site-packages/deepconsensus/inference/quick_inference.py", line 762, in run
for zmw, subreads, dc_config in input_file_generator:
File "/opt/conda/envs/bio/lib/python3.8/site-packages/deepconsensus/inference/quick_inference.py", line 428, in stream_bam
for input_data in proc_feeder():
RuntimeError: generator raised StopIteration
from deepconsensus.
@gevro what does the distribution of the number of passes look like in your dataset?
We do not expect a large benefit from training a model for more passes. Quality goes up as the number of subread passes increases, and DeepConsensus will not be necessary as the sequence becomes more correct.
from deepconsensus.
Is it possible to connect offline via e-mail so I can explain better?
from deepconsensus.
Hi @gevro
In terms of talking about model training possibilities by email, can you send a message to [email protected]. I can loop in Dan and we can continue discussion from there.
from deepconsensus.
I believe we have resolved this issue. If there are any further questions please reach out.
from deepconsensus.
Related Issues (20)
- Lower number of >Q30 average quality reads for v1.1 compared to v0.3 HOT 10
- Error detecting params.json using docker in debian (10) HPC HOT 2
- Installation from source file problem HOT 2
- lower quality and less reads in deepconsensus 1.0 output compared to ccs HOT 2
- python 3.9 HOT 2
- [Repeat] Running deepconsensus results in "free(): invalid pointer" error HOT 17
- QV for each ccs reads HOT 2
- Public raw train dataset availability HOT 2
- Cannot open/create ccs.bam file? HOT 6
- vRAM limit HOT 1
- the label without alignment HOT 5
- bam or fastq issue HOT 2
- Separate subreads for mixed samples? HOT 3
- GPU installation failure with pip HOT 3
- GPU installation using quick start guide fails HOT 5
- OSError: error -3 while reading file HOT 8
- normal pass / fail rate? HOT 2
- KeyError HOT 5
- About making ground truth. HOT 2
- Optimizing runtime on HPC HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deepconsensus.