Skip to content

Commit

Permalink
update callbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
v-chen_data committed Nov 19, 2024
1 parent 213af37 commit fc56d8b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/callbacks/test_callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

from typing import cast

import os
import pytest

from composer.core import Callback, Engine, Event, State
Expand All @@ -19,6 +20,15 @@
from tests.common import EventCounterCallback


@pytest.fixture(autouse=True)
def setup_mlflow_tracking(monkeypatch, tmp_path):
mlflow = pytest.importorskip('mlflow')
# Use a temporary directory instead of 'databricks'
tracking_uri = str(tmp_path / 'mlruns')
monkeypatch.setenv(mlflow.environment_variables.MLFLOW_TRACKING_URI.name, tracking_uri)
os.makedirs(tracking_uri, exist_ok=True)


def test_callbacks_map_to_events():
# callback methods must be 1:1 mapping with events
# exception for private methods
Expand Down

0 comments on commit fc56d8b

Please sign in to comment.