graphorge.gnn_base_model.predict.prediction.save_sample_predictions

save_sample_predictions(predictions_dir, prediction_id, sample_results, file_name_pattern=None)[source]

Save model prediction results for given sample.

Parameters:
  • predictions_dir (str) – Directory where sample prediction results are stored.

  • prediction_id (int) – Prediction ID appended to the prediction sample results file name.

  • sample_results (dict) – Sample prediction results.

  • file_name_pattern (str, default=None) – A f-string pattern for the file name. The pattern will be evaluated when saving the predictions and has access to prediction_id and all the sample_results[‘metadata’] content. If None, the pattern 'prediction_sample_{prediction_id}' is used.