Skip to content

Conversation

bpkroth
Copy link
Contributor

@bpkroth bpkroth commented Jun 2, 2025

Pull Request

Title

Fixup refactor/allow git repo root env resolution from different dirs and restores


Description

  • Fixes a bug when running tests from mlos_bench/mlos_bench/tests directory in which the root env config is initially resolved from the root of the repo and storage interally as mlos_bench/mlos_bench/tests/environment.jsonc and next re-used by another component (e.g., Scheduler) as that new path which doesn't exist when run from the mlos_bench/mlos_bench/tests dir.
  • Now, we keep track of both relative and absolute paths in memory and use the latter when necessary.
  • Additionally, reuses the git repo info stored in the DB directly for restoring an Experiment from Storage (e.g., for forked TrialRunners in the ParallelScheduler) rather than trying to resolve it independently.
    This part is mostly cosmetic, since currently those values aren't used by TrialRunners or Environments, but is good to fix for potential future works.

Type of Change

  • 🛠️ Bug fix
  • 🔄 Refactor
  • 🧪 Tests

Testing

  • Local
  • CI unit tests

Additional Notes (optional)

This is part of a series of fixups and should be merged after #991


bpkroth and others added 30 commits May 28, 2025 09:13


def get_git_info(path: str = __file__) -> tuple[str, str, str]:
def get_git_root(path: str = __file__) -> str:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The git changes should be merged in #991 first to make it easier to review this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ready for review Ready for review refactor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant