Skip to content

Commit

Permalink
Revert to using image_url for image classification tasks.
Browse files Browse the repository at this point in the history
  • Loading branch information
rdondera-microsoft committed Oct 24, 2024
1 parent 86b6c21 commit bc1aeb6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ jobs:
compute_model_import: ${{parent.inputs.compute_model_import}}
compute_finetune: ${{parent.inputs.compute_finetune}}
task_name: ${{parent.inputs.task_type}}
user_column_names: image,label
user_column_names: image_url, label
task_specific_extra_params: '"model_family=HuggingFaceImage;model_name=${{parent.inputs.model_name}};metric_for_best_model=${{parent.inputs.primary_metric}};number_of_epochs=${{parent.inputs.number_of_epochs}}"'

framework_selector:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ inputs:

input_column_names:
type: string
default: image
default: image_url
optional: true
description: Input column names in provided test dataset, for example column1. Add comma delimited values in case of multiple input columns, for example column1,column2.

Expand Down
4 changes: 2 additions & 2 deletions assets/training/model_evaluation/tests/test_image_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def get_mock_run_context():


@pytest.mark.parametrize("task_type,input_column_names,label_column_name", [
(TASK.IMAGE_CLASSIFICATION, ["image"], "label"),
(TASK.IMAGE_CLASSIFICATION, ["image_url"], "label"),
(TASK.IMAGE_OBJECT_DETECTION, ["image", "image_meta_info", "text_prompt"], "label"),
(TASK.IMAGE_GENERATION, ["prompt"], "label"),
])
Expand Down Expand Up @@ -192,7 +192,7 @@ def test_image_dataset(task_type, input_column_names, label_column_name):
# Compare the loaded dataset with the original.
if task_type == TASK.IMAGE_CLASSIFICATION:
loaded_dataset = [
{k: row[k] for k in ["image", "label"]} for _, row in df.iterrows()
{k: row[k] for k in ["image_url", "label"]} for _, row in df.iterrows()
]

for r1, r2 in zip(dataset, loaded_dataset):
Expand Down

0 comments on commit bc1aeb6

Please sign in to comment.