Testbed SDK API Reference#

Note

See the Glossary for the meaning of the acronyms used in this guide.

generics#

fit_estimator(estimator, x, y, **kwargs)

estimator_predict(estimator, x, **kwargs)

utilities#

contexts.plugin_dirs([dirs])

decorators.require_package(name[, ...])

logging.attach_stdout_stream_handler(as_json)

logging.clear_logger_handlers(logger)

logging.configure_structlog()

logging.set_logging_level(level[, logger])

logging.StderrLogStream(as_json)

logging.StdoutLogStream(as_json)

paths.set_path_ext(filepath, ext)

exceptions#

ARTDependencyError

Method/function depends on the "art" package.

CryptographyDependencyError

Method/function depends on the "cryptography" package.

EstimatorPredictGenericPredTypeError

Unknown pred_type argument passed to estimator_predict.

PrefectDependencyError

Method/function depends on the "prefect" package.

TensorflowDependencyError

Method/function depends on the "tensorflow" package.

UnknownPackageError

PyPlugs could not import the given package.

UnknownPluginError

PyPlugs could not locate the given plugin.

UnknownPluginFunctionError

PyPlugs could not locate the given function within a plugin.

pyplugs#

pyplugs.register()

Decorator for registering a new plug-in

pyplugs.task_nout(nout)

pyplugs.names(package)

List all plug-ins in one package

pyplugs.funcs(package, plugin)

List all functions in one plug-in

pyplugs.info(package, plugin[, func])

Get information about a plug-in

pyplugs.exists(package, plugin)

Check if a given plugin exists

pyplugs.get(package, plugin[, func])

Get a given plugin

pyplugs.call(package, plugin[, func])

Call the given plugin

pyplugs.get_task(package, plugin[, func])

Get a given plugin wrapped as a prefect task

pyplugs.call_task(package, plugin[, func])

Call the given plugin as a prefect task

pyplugs.names_factory(package)

Create a names() function for one package

pyplugs.funcs_factory(package)

Create a funcs() function for one package

pyplugs.info_factory(package)

Create a info() function for one package

pyplugs.exists_factory(package)

Create an exists() function for one package

pyplugs.get_factory(package)

Create a get() function for one package

pyplugs.call_factory(package)

Create a call() function for one package

pyplugs.get_task_factory(package)

Create a get_task() function for one package

pyplugs.call_task_factory(package)

Create a call_task() function for one package

rq#

tasks.run_mlflow_task(workflow_uri, ...[, ...])

cryptography#

common.load_payload(filepath)

Load the payload contents

keygen.generate_rsa_key_pair([...])

Generate a public/private key pair using the RSA algorithm

keygen.save_private_key(private_key, filepath)

Save the private RSA key to a file

keygen.save_public_key(public_key, filepath)

Save the public RSA key to a file

sign.load_private_key(filepath)

Load the private RSA key from a file

sign.sign_payload(payload, private_key, filepath)

Sign the payload

verify.load_public_key(filepath)

Load the public RSA key from a file

verify.load_signature(filepath)

Load the signature

verify.verify_payload(payload, signature, ...)

Verify the payload signature