Hello Bhaskar pathak,
Welcome to microsoft Q&A, Thankyou for posting your query here.
If your Python script runs slower on Azure Batch compared to your local computer, there could be several reasons for this difference.
1.Think about using a VM on Azure that match or better than your computer.
- If your script needs to do a lot of work with storage, switch to a faster storage option.
- Make sure your Azure Batch account and any other Azure services it uses (like Azure Blob Storage) are located in the same area to reduce latency.
- Azure batch supports parallelism, break your task into smaller parts that can run at the same time on different nodes to speed things up.
- Use Azure Batch's application packager or container features to install dependencies to run your script's , just like on your computer.
- After checking the insights change your configuration in your Azure Batch job to improve speed.
Hope this helps you, If an answer has been helpful, please consider accepting the answer to help increase visibility of this question for other members of the Microsoft Q&A community. If not, please let us know what is still needed in the comments so the question can be answered. Thank you for helping to improve Microsoft Q&A!