Skip to content

Multiple issues with MinIO credentials initialization in Experiment.py #176

@Alexiszcv

Description

@Alexiszcv

Problem description

Currently, the Experiment class in Experiment.py has several issues leading to errors when running experiments:

  1. Order of operationscheck_minio_credentials() was called before env_setup(), causing environment variables for MinIO to not be set in time.
  2. Faulty condition — the code tried to log self.auth.method even when self.auth was None, raising:
    AttributeError: 'NoneType' object has no attribute 'method'
    
  3. Missing credentials — if MinIO credentials were only present in the .cfg file but not exported in the environment, the process failed.

This behavior causes experiments to crash unexpectedly.

Steps to Reproduce

  1. Run:
    mlops run scripts/train.py -c config/local_config.cfg --ignore_git_check
    
  2. Observe the crash in check_minio_credentials().

Proposed Solution

  • Change the initialization order:

    1. Call self.config_setup().
    2. Call self.env_setup() to set environment variables.
    3. Call self.check_minio_credentials().
  • Add setting of MinIO environment variables directly in env_setup() to ensure they’re available before credentials check.

Related Context

  • Part of fixing an issue raised in MLOpsTutorial.
  • The .cfg updates to include MinIO credentials are tracked in the MLOpsTutorial repo, while the code fix is in MLOps.

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