Skip to content

Conversation

@SantaMcCloud
Copy link
Contributor

FOR CONTRIBUTOR:

  • I have read the CONTRIBUTING.md document and this tool is appropriate for the tools-iuc repo.
  • License permits unrestricted use (educational + commercial)
  • This PR adds a new tool or tool collection
  • This PR updates an existing tool or tool collection
  • This PR does something else (explain below)

@SantaMcCloud
Copy link
Contributor Author

Test will fail because a datatype is still missing: galaxyproject/galaxy#21024
Also i did comment out a test since i think the tool can not detect anything to make this test work with the amount of data got with the test but im not sure in this case.

@SantaMcCloud
Copy link
Contributor Author

The file model.pt now the question could this be slip such that even it is bigger then 1 MB it will be approved or should i remove it and also remove all the test using this as input to test certain functionality?

@SaimMomin12
Copy link
Contributor

The file model.pt now the question could this be slip such that even it is bigger then 1 MB it will be approved or should i remove it and also remove all the test using this as input to test certain functionality?

For file sizes >1 MB, you can consider uploading it to Zenodo and using the link in the test

@SantaMcCloud
Copy link
Contributor Author

The file model.pt now the question could this be slip such that even it is bigger then 1 MB it will be approved or should i remove it and also remove all the test using this as input to test certain functionality?

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!

@SantaMcCloud
Copy link
Contributor Author

#7344

@SantaMcCloud
Copy link
Contributor Author

#7326

@@ -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"/>
Copy link
Member

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?

Copy link
Contributor Author

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!

Copy link
Contributor Author

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.

Copy link
Member

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 :(

Copy link
Contributor Author

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?

Copy link
Contributor Author

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! :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! This maybe helps

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 &&

Copy link
Contributor Author

@SantaMcCloud SantaMcCloud Oct 16, 2025

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

Copy link
Contributor Author

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

@bernt-matthias bernt-matthias changed the title Update Sembin 2.0.2 to 2.2.0 Update Semibin 2.0.2 to 2.2.0 Oct 14, 2025
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.

3 participants