Use Batch Mode

Learn more about using batch mode.

Important: On Windows, the paths in the following batch commands will be slightly different. For example:
<install_location>\common\eds\win64\bin\win64\edspy.bat
Note: While using hooks during prediction from the command line, the hooks directory can be specified using the --hooks-dir <hooks_path> argument. The python hook and the _predict_inp.json or predict_inp.csv should be present in the hooks directory.

Create Datasets

Batch command to create a dataset:
<install_location>\common\eds\linux\bin\linux\edspy.sh --physicsai  --create-dataset <dataset_name.psdata> --spec <data_spec.yaml>
<dataset_name.psdata>
The name of the output dataset file to create. Names without a path will appear in the current working directory. This file typically has an *.psdata extension.
<data_spec.yaml>
The specification file that contains information about the dataset. This file typically has a *.yaml extension and is located in the datasets directory within a project. Because the contents of the file are updated with each version, it is recommended to manually create a dataset from the GUI and modify the list of files and paths within.

Train a Model on a Dataset

Batch command for training a PhysicsAI model:
<install_location>\common\eds\linux\bin\linux\edspy.sh --physicsai --train <model_name.psmdl> --dataset <dataset_name.psdata> --spec <train_spec.pscfg> [--pretrained-model <pretrained_model_name.psmdl>]
<model_name.psmdl>
The name of the output trained PhysicsAI model to create. Names without a path will appear in the current working directory. This file typically has a *.psmdl extension.
<dataset_name.psdata>
The dataset file to be used as the training set. This file typically has an *.psdata extension and is located in the datasets directory within a project.
<train_spec.pscfg>
The specification file that contains information about the training process. This file typically has a *.pscfg extension and it located in the specfiles directory within a project. Note that this file can only be created from inside the PhysicsAI GUI.
<pretrained_model_name.psmdl>
The previously trained PhysicsAI model that will be used as the starting point for the transfer learning. This file typically has a *.psmdl extension and is located in the subdirectries folder within the models directory folder of a project.
Note: In the batch command for training above, the dataset and spec files are already existing while the .psmdl file is generated after the execution of the command. You only specify the name of the PhysicsAI model.

For example, to train a model named Bracket_displacement, the command would be:

<install_location>\common\eds\linux\bin\linux\edspy.sh --physicsai --train Bracket_displacement.psmdl --dataset "C:\PhysicsAI\Ibeam_project\New folder\Bracket_train.psdata" --spec “C:\PhysicsAI\Ibeam_project\New folder\spec_24_02_21_17_29_59.pscfg”

This will train a model in batch mode and generate a model called Bracket_displacement.psmdl.

Test a Trained Model on a Dataset

Batch command for testing a trained PhysicsAI model:
<install_location>\common\eds\linux\bin\linux\edspy.sh --physicsai --score
    <scorefile_name.psscr>    --model <model_name.psmdl> --dataset <dataset_name.psdata>
    [--write-files]
<scorefile_name.psscr>
The output PhysicsAI scoring file that stores the information about the testing process. Names without a path will appear in the current working directory. This file typically has a *.psscr extension.
<model_name.psmdl>
The trained PhysicsAI model to use during the testing assessment. This file typically has a *.psmdl extension and is located in the subdirectries folder within the models directory folder of a project.
<dataset_name.psdata>
The dataset file to be used as the test set. This file typically has a *.psdata extension and is located in the datasets directory within a project.
--write-files
If this option is omitted, there will be no files on disk to load to visualize in a post-processor.

Predict a New Mesh or CAD Model

Batch command for predicting on a new mesh or CAD model:

<install_location>\common\eds\linux\bin\linux\edspy.sh --physicsai --predict-write
<outputfile_name.h3d> --model <model_name.psmdl> --input-file <inputfile_name> [-- hooks-dir=<hookdir>]
<outputfile_name.h3d>
The output animation file name to create. Names without a path will appear in the current working directory. This file typically has a *.h3d extension.
<model_name.psmdl>
The trained PhysicsAI model to use during the prediction. This file typically has a *.psmdl extension and is located in the subdirectries folder within the models directory folder of a project.