Making Predictions¶
After completing a training session, use the new or updated federated model to make predictions.
Retrieve the model parameters using the model’s state_dict
method. These parameters can then be saved with torch.save()
.
Example: Predict the target column and save the whole dataset with a filled target column as an output.
model_predict --token <IAI_TOKEN> --session-id <session.id> --dataset-path <data_path> --batch-size <batch_size>
where
session.id
is the reference to the completed sessionIAI_TOKEN
is your access tokendataset_path
is the absolute path to the dataset on your local machine. The data must contain all of the predictor columns that were specified when training the model.batch-size
is an integer input value for the size of the batch of data
The prediction output is saved as file under the same directory as the input data with the file name <original_input_file_name>_