Skip to content
This repository was archived by the owner on Sep 25, 2026. It is now read-only.
This repository was archived by the owner on Sep 25, 2026. It is now read-only.

Hyperparameter a pipeline parameter, not random value #107

Closed

Description

MLOpsPython/code/training/train.py picks a hyperparameter value randomly. This is an antipattern in 2 ways: (1) DevOps processes should yield reproducible outputs, (2) hyperparameters should be an AML pipeline parameter.

# Randomly pic alpha
alphas = np.arange(0.0, 1.0, 0.05)
alpha = alphas[np.random.choice(alphas.shape[0], 1, replace=False)][0]

Activity

  1. dtzar commented on Nov 26, 2019

    @dtzar
    Contributor

    Yes, this is done for demo purposes to display something interesting on the metrics visuals. Real customer code would of course not do this.

  2. algattik commented on Nov 26, 2019

    @algattik
    ContributorAuthor

    As this repo is a starting point for MLOps projects, it would be great to show best practice in code right away.

    How about making the hyperparameter value a pipeline parameter, and generating a random value for it in the devops pipeline?

  3. dtzar commented on Nov 26, 2019

    @dtzar
    Contributor

    sure. PRs welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions