Skip to content

Commit

Permalink
until main will include operator_utiles
Browse files Browse the repository at this point in the history
Signed-off-by: dafnapension <[email protected]>
  • Loading branch information
dafnapension committed Nov 3, 2024
1 parent 1910393 commit 132a030
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions performance/card_profiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@

from unitxt.api import load_recipe
from unitxt.artifact import fetch_artifact
from unitxt.loaders import Loader
from unitxt.logging_utils import get_logger
from unitxt.operator import SequentialOperator
from unitxt.operator_utils import find_step_by_type

# from unitxt.operator_utils import find_step_by_type
from unitxt.settings_utils import get_settings
from unitxt.standard import StandardRecipe
from unitxt.stream import MultiStream
Expand Down Expand Up @@ -94,11 +94,11 @@ def profiler_print_first_dicts(self, ms: MultiStream, card_name: str):
def profiler_do_the_profiling(self, card_name: str, **kwargs):
logger.info(f"\nProfiling card {card_name}")
recipe = self.profiler_instantiate_recipe(**kwargs)
loader_step_index, _ = find_step_by_type(recipe.steps, Loader)
assert loader_step_index is not None, "Did not find any Loader step in recipe"
assert (
loader_step_index == 0
), f"Found loader in step {loader_step_index} of recipe, rather than step 0."
# loader_step_index, _ = find_step_by_type(recipe.steps, Loader)
# assert loader_step_index is not None, "Did not find any Loader step in recipe"
# assert (
# loader_step_index == 0
# ), f"Found loader in step {loader_step_index} of recipe, rather than step 0."
ms = self.profiler_load_by_recipe(recipe)

rest = SequentialOperator(steps=recipe.steps[1:])
Expand Down

0 comments on commit 132a030

Please sign in to comment.