-
Couldn't load subscription status.
- Fork 481
Update Semibin 2.0.2 to 2.2.0 #7347
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
base: main
Are you sure you want to change the base?
Conversation
|
Test will fail because a datatype is still missing: galaxyproject/galaxy#21024 |
|
The file |
For file sizes >1 MB, you can consider uploading it to Zenodo and using the link in the test |
Ah okay thank you i didnt know i will do it this way then! |
tools/semibin/bin.xml
Outdated
| @@ -44,7 +44,7 @@ SemiBin2 bin | |||
| <expand macro="environment"/> | |||
| </when> | |||
| <when value="history"> | |||
| <param argument="--model" type="data" format="h5" label="Trained semi-supervised deep learning model"/> | |||
| <param argument="--model" type="data" format="pt" label="Trained semi-supervised deep learning model"/> | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SantaMcCloud do you know if we can use the safetensor datatype here? Or that this tool can consume safetensor datatypes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Im not sure i didnt see anything about this in the documentation. This might work with the old file too but i have to look at it since certain packages has to be downgraded in this case.
I will test it first if this works with safetensor or not and will let you know if it works or not!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bgruening i try to run sembin2 with safetensor but it looks like it can not be used. The only option here is to run a convert befor and after when a .pt file is used/outputed somewhere. My question now is it is possible to write a short python script in the commnad line of the wrapper to start torch and tranform it to safetensor?
With this it is possible to ouput the model created in the sembin_train will be safetensor. For semibin_bin the convert to safetensor to .pt should be also doable so semibin can run without problem and the .pt file can be deleted via commnad line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the Galaxy side that is possible, yes. You can include a small auxiliary Python script with the tool and then do the conversion.
If is possible from the semibin side, e.g. that no data gets lost during the transformation, I do not know :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can not tell it either i can try to have some runs with the test data and see if there is any problem with it. and will give you feedback then.
For the script is there any source or exmaple for it so i can have a look into it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bgruening so on the first look the little script i wrote for the specific usecase for semibin to convert the .pt file to safetensor and back works. both result with the testdata are the same with the original model and the converted model. So this should work as workaround! :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! This maybe helps
tools-iuc/tools/macs2/macs2_callpeak.xml
Line 127 in 848922d
| python '$__tool_directory__/dir2html.py' |
its just an additional script that you call around the original command.
You can put many commands in the command section, just separate them by &&
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did add the script and i hope now that it works with it, i also open an issue to see if the upstream devs might change it in the futher
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
File "/home/runner/work/tools-iuc/tools-iuc/tools/semibin/convert.py", line 4, in <module>
from safetensors.torch import save_file, load_file
ModuleNotFoundError: No module named 'safetensors'
based on this i should rewrote the recipe and include the safetensors package? @bgruening
FOR CONTRIBUTOR: