Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the index to 0 instead of -1 #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ghadialhajj
Copy link

self.sample_keys and hdf5_sample_keys both use -1 to index the output of the split method, so self.sample_keys ends up being a list of extensions, e.g. ".tsv" or a list of empty strings depending on whether self.metadata[self.sample_id_column] has the file names with or without the extension of each file, respectively. hdf5_sample_keys would also end up being a list of extensions.

Then, unfound_samples would not pick the error in case both lists have the extensions, and self.hdf5_inds would end up having the same index 0, because of how the .index() method works.

Consequently, the data loader would end up loading the same repertoire because sample_sequences_start_end would have the same start:end pairs, except that it will load them with different targets because the latter is sampled separately.

This was at least my experience running, e.g. the example_single_task_cnn.py file with the example dataset :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant