Data Parsing
Finite Element (FE) engineers are data engineers. Every FE solve involves organizing data into certain formats, sending it to a solver, and then post processing the outputs. It literally is all data and working with and manipulating data. And that takes time. Naturally any engineer would like to know, in advance, how long it will take to run their model. By using some basic AI/ML (Artificial Intelligence/Machine Learning) tools available from scikit-learn, a freely available python package, we can determine the relationships between the model’s dimensions (nodes, elements, DOFs, cores, steps…) and the time it takes to solve the model. (Better said, we use python and scikit to automatically determine the relationships and optimize the prediction.) We can do this using our own local data (or any data one has available) to create a scikit-learn ML estimator for the time to solve a model. What the ML part does is determine the weighting of the inputs and their effect on the output (time). This short example will show you 1. how to gather your local data using a parser and, in part, 2. how to use scikit-learn to create a ML system to create a method to estimate times to solve for your FE models. I will use VS Code here to demo how to run this code. If you use a different IDE (good for you) it will be easier and more straightforward.Step 0: Python venv setup
Create a virtual environment to store the required modules. Here I create a directory called ‘bob’ because I call everything bob when I start a project.Step 1: Get Data
Getting the data itself is a bit of a procedure. Parsing can be done very efficiently if the source(s) are uniform and the search well organized.Get Data: Steps
- Determine a few key parameters that are likely to be key to estimating solve times
- Locate the solve.out files in the local directory
- Then parse the individual solve.out files
- And naturally, get the time to solve out of the .out file.
- Write these data points to a file for later use