Skip to content

Trial name could not be passed to env  #1844

@alexeygorobets

Description

@alexeygorobets

/kind bug

What steps did you take and what happened:
I am trying to get access to the trial name from the trial's pod (I need it to build S3 bucket path for trained model).
I follow this example.
But I've got an error

Error from server: error when creating "trial-metadata-substitution.yaml": admission webhook "validator.experiment.katib.kubeflow.org" denied the request: parameter reference ${trialSpec.Name} does not exist in spec.parameters: [{lr double {0.03 0.01 [] }}]

This example itself does not work.

What did you expect to happen:
Trials running with env TRIAL_NAME resolved as trail's name.

Anything else you would like to add:
This example was working on Katib 0.12.0.
It looks like additional check added in this PR might cause this issue. One of the resolution might be to skip this check here if it's trial metadata (such as name, kind, apiversion etc.).

But I will be happy with any other solution which allows me to pass trial name to pod as environment variable.

Environment:

  • Katib version (check the Katib controller image version): 0.13.0
  • Kubernetes version: 1.22
  • OS : CentOS

Impacted by this bug? Give it a 👍 We prioritize the issues with the most 👍

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions