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

__main__.py upon cloning does not work #13

Closed
TrentBrick opened this issue Apr 5, 2019 · 3 comments
Closed

__main__.py upon cloning does not work #13

TrentBrick opened this issue Apr 5, 2019 · 3 comments

Comments

@TrentBrick
Copy link

Thank you so much for making this package!

I am trying to get it working by cloning the repo and calling python __main__.py however, I am running into a lot of issues with dependencies.

  1. I had to clone PeptideBuilder from github
  2. I had an error with h5py and had to install this and restart my terminal
  3. I am now having errors with:

For padding the packed sequences:
Traceback (most recent call last): File "__main__.py", line 165, in <module> train_model_path = train_model("TRAIN", training_file, validation_file, args.learning_rate, args.minibatch_size) File "__main__.py", line 97, in train_model loss = model.compute_loss(primary_sequence, tertiary_positions) File "C:\Users\fmsft\openprotein\openprotein.py", line 41, in compute_loss emissions, backbone_atoms_padded, batch_sizes = self._get_network_emissions(original_aa_string) File "C:\Users\fmsft\openprotein\models.py", line 46, in _get_network_emissions packed_input_sequences = self.embed(original_aa_string) File "C:\Users\fmsft\openprotein\openprotein.py", line 24, in embed torch.nn.utils.rnn.pack_sequence(original_aa_string)) File "D:\Anaconda2\envs\py36\lib\site-packages\torch\nn\utils\rnn.py", line 277, in pack_sequence return pack_padded_sequence(pad_sequence(sequences), [v.size(0) for v in sequences]) File "D:\Anaconda2\envs\py36\lib\site-packages\torch\nn\utils\rnn.py", line 148, in pack_padded_sequence return PackedSequence(torch._C._VariableFunctions._pack_padded_sequence(input, lengths, batch_first)) RuntimeError: Length of all samples has to be greater than 0, but found an element in 'lengths' that is <= 0

And with starting the web server:
self.run() File "C:\Users\fmsft\openprotein\dashboard.py", line 45, in run call(["/bin/bash", "start_web_app.sh"]) File "D:\Anaconda2\envs\py36\lib\subprocess.py", line 267, in call with Popen(*popenargs, **kwargs) as p: File "D:\Anaconda2\envs\py36\lib\subprocess.py", line 709, in __init__ restore_signals, start_new_session) File "D:\Anaconda2\envs\py36\lib\subprocess.py", line 997, in _execute_child startupinfo) FileNotFoundError: [WinError 2] The system cannot find the file specified

@TrentBrick
Copy link
Author

I switched over to my Linux subsystem. Still had to install the first 2 dependencies ( PeptideBuilder and h5py) also have to now install npm. These dependencies should be listed out. The code now and the webserver works.

@JeppeHallgren
Copy link
Collaborator

Thanks for filing this @TrentBrick - I've added #14 to track the dependency list issue and will close this for now. Let me know if you hit other install issues!

@TrentBrick
Copy link
Author

I had to switch back over to windows. I have the code running but can't get the Flask server to work (I know almost nothing about Flask). When I run it I get this error:

File "D:\Anaconda2\envs\py36\lib\threading.py", line 916, in _bootstrap_inner self.run() File "c:\Users\fmsft\PAE-New\dashboard.py", line 45, in run call(["/bin/bash", "start_web_app.sh"]) File "D:\Anaconda2\envs\py36\lib\subprocess.py", line 267, in call with Popen(*popenargs, **kwargs) as p: File "D:\Anaconda2\envs\py36\lib\subprocess.py", line 709, in __init__ restore_signals, start_new_session) File "D:\Anaconda2\envs\py36\lib\subprocess.py", line 997, in _execute_child startupinfo) FileNotFoundError: [WinError 2] The system cannot find the file specified

What edit can I make so that this works on Windows? Thank you.

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

No branches or pull requests

2 participants