bodywork-core v2.1.0 has been released

bodywork-core v2.1.0 is available to download from PyPI.


Version 2.1.0 adds support for ML projects hosted in public or private repositories on GitLab, Azure DevOps or BitBucket!


This update also enables the Git commit hash of a deployed project to be accessed from within any Bodywork container, via the `GIT_COMMIT_HASH` environment variable. This allows you to tag any artefacts produced by your pipelines, such as datasets and trained models, with the precise version of the pipeline used to create them. For example,


import os

git_hash = os.getenv('GIT_COMMIT_HASH')
model_filename = f'my-classifier--pipeline={git_hash}.pkl'
save_model(model, model_filename)

It is now possible to specify a batch stage that is only executed after a workflow fails to execute. This stage can now be configured in the optional project.run_on_failure parameter within bodywork.yaml, as follows,

version: "1.0"
project:
  name: bodywork-ml-pipeline-project
  docker_image: bodyworkml/bodywork-core:latest
  DAG: stage_1_train_model >> stage_2_scoring_service
  run_on_failure: send_notifications
stages:
  stage_1_train_model:
    ...
  stage_2_scoring_service:
    ...
  send_notifications:
    executable_module_path: raise_alerts.py
    requirements:
      - requests==2.22.0
    cpu_request: 0.5
    memory_request_mb: 100
    batch:
      max_completion_time_seconds: 30
      retries: 1


Within the `raise_alerts.py` module you could trigger a webhook for posting to Slack, use the Python standard library to send an e-mail, or use the Python client for your company's chosen incident response platform (e.g. PagerDuty).

Full details can be found in the official release notes.

Subscribe to our Newsletter

You can unsubscribe at any time by clicking on the 'unsubscribe' link in the footer of our emails.

Thank you for subscribing to our newsletter!
Oops! Something went wrong while submitting the form.