Making Predictions
Use the federated model built from a completed session to generate 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.
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>_<timestamp>
For custom models - if you specify a model prediction output that has more than two dimensions, it is flattened into a two-dimensional table in order for results to be displayed, in the same order as they are outputted.
Last updated