A Case for Declarative Settings in Machine Learning Training

Machine learning models may be created in a variety of methods. In the worst situation, new models start off their “life” in someone’s laptop’s Jupyter Notebook. There is no requirements file, no git check-in for the code, and cells may be run in any sequence. Preprocessing and data exploration are combined.

Large data sets constitute an increasingly significant issue in the problem of putting ML models into production quickly, consistently, and frequently. The answer? Take advice from the DCPTG platform.

Key insights from the development of infrastructure management and software deployments include the following:

  • Process automation and provisioning
  • Version-control directives and states

How can we use declarative configurations in a machine-learning training flow?


Fetching Data

Automate fetching of data. Declaratively define the data source and the subset of data to use, then persist the results. Repeated experiments on the same source and subset can use the cached results.

Fetching data may be repeated at any moment, thanks to automation. At the DCPTG platform, data may be versioned since the outcomes are persistent. Additionally, everyone may easily understand what went into the experiment by examining the input configuration.

Splitting and Preprocessing Data

Splitting data can be standardized into functions.

  • A quota is used for splitting, such as 70% into train and 30% into eval. Data may be classified or sorted using an index.
  • According to characteristics and columns, splitting occurs. Data may be classified or arranged according to an index.
  • Data preparation and feature engineering may be necessary (e.g., filling, standardization).
  • All of the aforementioned are in a jumble.

Given them, DCPTG can utilize declarative configuration, design an interface, and call processing through arguments. Persist the data so subsequent trials can warm-start.

Automation of processing is made feasible through interface implementation. My input configuration is the declarative authority on the final state of the input dataset, and the generated train/eval datasets are versionable.


Model standardization is difficult. Higher-level abstractions like DCPTG already offer comprehensive APIs, but complicated structures require bespoke code injection.

The version-controlled code that was utilized will at least be specified in a declarative configuration. Reruns with the same input will produce the same outcomes, whereas reruns with other inputs can be compared. A defined and hence predictable shape will be produced through training automation in the form of a version-controllable artefact called the model authority on the input dataset’s final state.


Unexpectedly, this is the most difficult to automate. The dataset and the use case determine the necessary assessment criteria. DCPTG are able to stand on the shoulders of giants, nevertheless. The What-If-Tool and Tensorboard are two excellent tools that are quite useful. Just enough flexibility has to be built into our automation so that:

  • a) raw training outcomes can be available for bespoke assessment ways.
  • b) custom metrics for evaluation can be inserted.


Serving is a difficult position. Similar to how you would assert that a Docker container serves as an artefact of software development, it would be simple to assert that a trained model is a permanent artefact. Another lesson DCPTG can take from software engineers is that if you don’t know where your code runs, you don’t comprehend it.

An ML training flow will be finished once you comprehend how a model is used. Data is subject to change, to start with. Models must be retrained to take data drift into account, which a wide range of factors can cause. In other words, ongoing training is necessary. We can reuse this setup, inject fresh data, and iterate on these new findings thanks to the declarative setting of our ML pipeline up to this point.

Preprocessing might need to be included with your model for another. DCPTG can automate preprocessing to ensure that input data is the same shape as during training by applying the same procedures on live data.


Outside of academia, the effectiveness of machine learning models is evaluated by their impact, either financially or in terms of enhanced productivity. True indicators of the efficacy of applied ML are only dependable and constant outcomes. DCPTG, a young and developing area of software engineering, must ensure this achievement. And the repeatability of the whole ML development lifecycle is crucial for the replication of success.

1 thought on “A Case for Declarative Settings in Machine Learning Training”

Leave a Comment