Generate an AntiNex AI Request

This method will use the environment variables from the consts.py:

generate_ai_request Method

antinex_client.generate_ai_request.generate_ai_request(predict_rows, req_dict=None, req_file='/opt/antinex/client/examples/predict-rows-scaler-full-django.json', features=[], ignore_features=[], sort_values=[], ml_type='classification', use_model_name='Full-Django-AntiNex-Simple-Scaler-DNN', predict_feature='label_value', seed=42, test_size=0.2, batch_size=32, epochs=15, num_splits=3, loss='binary_crossentropy', optimizer='adam', metrics=[], histories=[], filter_features_dict={}, filter_features=[], convert_enabled=True, convert_to_type='float', include_failed_conversions=False, value_for_missing='-1.0', version='1', publish_to_core=True, check_missing_predict_feature=True, debug=False)[source]
Parameters:
  • predict_rows – list of predict rows to build into the request
  • req_dict – request dictionary to update - for long-running clients
  • req_file – file holding a request dict to update - one-off tests
  • features – features to process in the data
  • ignore_features – features to ignore in the data (non-numerics)
  • sort_values – optional - order rows for scaler normalization
  • ml_type – machine learning type - classification/regression
  • use_model_name – use a pre-trained model by name
  • predict_feature – predict the values of this feature
  • seed – seed for randomness reproducability
  • test_size – split train/test data
  • batch_size – batch size for processing
  • epochs – test epochs
  • num_splits – test splits for cross validation
  • loss – loss function
  • optimizer – optimizer
  • metrics – metrics to apply
  • histories – historical values to test
  • filter_features_dict – dictionary of features to use
  • filter_features – list of features to use
  • convert_to_type – convert predict_row values to scaler-ready values
  • include_failed_conversions – should the predict rows include fails
  • value_for_missing – set this value to any columns that are missing
  • version – version of the API request
  • publish_to_core – want to publish it to the core or the worker
  • debug – log debug messages