Search code examples
javapythonmodelartificial-intelligencemicroservices

Java Microservice to train AI model Problem


I've already built a server which contains several spring boot microservices, and we've also wrote a python script to train AI models.

Now we want to build a service into this server to check our data at a specific time every day and run the python script to train the model.

Is there a good way to design this service? Do I need to call the Python script from Java or is there better ways? Is there any libraries you recommend?

Thanks a lot!


Solution

  • Calling python service at specific time can be achieved in different ways, however which option you decide depends on the needs of the application. Few options you can explore:-

    1. Create spring scheduled service that will run automatically refer to this for details.
    2. Creat CRON job on the server that will call the python service. Refer here for details of CRON job