-
Notifications
You must be signed in to change notification settings - Fork 1
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
adding git paths to inputs #9
Conversation
@cehbrecht let me know if this fixes the issue in the demo when you deploy it. |
@PaoloBonettiPolimi the fix might work ... but there is another issue:
You need to use See: |
@cehbrecht I've now used self.workdir, let me know if it is ok now. |
@PaoloBonettiPolimi I have run it again ... still I get an error ... but I don't understand yet why ??? Here is the error:
... but the file is available:
|
@cehbrecht uhm.. it works if I start the bird locally and use birdy in a notebook: do you have any idea on this issue? A possible workaround (not much elegant) may be to put the model on a static directory of the virtual machine you are using to deploy the bird, if that is accessible by the process when it is deployed, and directly insert the local path? |
@PaoloBonettiPolimi I have looked at the issue again. The module load is expecting a "keras zip file" ... but the file seems to be a HDF file ... same as the one on github: |
@cehbrecht the file on github is exactly the file that I'm loading in the last commit, after retrieving it from github to the local directory of the prototype (which works if I test it on Levante). Do you have any idea of the reason why if looks like a HDF file to it? models.load_model should also work with h5 files, so the only two changes that come to my mind are to try to put the keras file directly on the virtual machine you are using, so that we can use the load_model without previously copying the .keras file from git, or to try to change the extension of the file from .keras to .h5, although I've never used it. |
Hi @PaoloBonettiPolimi ... I have looked a bit more at it. It seems to be that the version of tensorflow on macos (in my case 2.15) behaves different then the one on Linux (2.16). The current HDF5 format of the keras file is probably a legacy format. The new keras format is different ... a zip file. I can load the current HDF5 format on macos with tensorflow 2.15. But I get an issue when I try it with version 2.16. I tried to install version 2.15 on Linux ... but installation fails ... complaining about cuda. I also tried to rename the file to So ... the issue is not the keras file itself :) Not sure how to fix .... but I would guess the following:
There is a conda spec file (Linux only) to make the enviroment reproducible: You could try the installation on Linux and update the |
@cehbrecht I am double checking the issue from Levante, which is Linux based. When I install the process in the conda environment produced by the environment.yml file, I have Tensorflow 2.15, and the load works as it is currently implemented. Do you know why it becomes tensorflow 2.16 in the demo? Do you think we can try to force Tensorflow=2.15.0 in that file, and check if it works? |
@PaoloBonettiPolimi well, we can try :) You could in addition generate a conda spec file ... on linux. Would be good to have the necessary dependencies in the conda environment ... in case something is missing. That way it should be reproducible. |
@PaoloBonettiPolimi ... if you run tests with a docker image you could pick AlmaLinux 9.4. That is the one we use for deployment. |
fixing tensorflow 2.15.0
@cehbrecht uhm.. for the moment I'm just using the terminal or a notebook in Levante, I've fixed the tensorflow version and it works correctly there, which is Linux-based. Let me know how it goes when deployed, otherwise I'll try to save the model as an .h5 file directly from keras. |
@PaoloBonettiPolimi it works now :) I have updated also the conda spec file. Do you like to merge? |
Overview
This PR fixes the access of the prototype to inputs, that are now all zipped and accessed through git.