Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions sdk/ml/azure-ai-ml/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Release History

## 1.33.0 (unreleased)

### Features Added

### Bugs Fixed

### Other Changes

## 1.32.0 (unreleased)

### Features Added
Expand Down
40 changes: 31 additions & 9 deletions sdk/ml/azure-ai-ml/azure/ai/ml/_utils/_asset_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
# pylint: disable=protected-access,too-many-lines

import hashlib
import json
import logging
import os
import json
import uuid
import warnings
from concurrent.futures import ThreadPoolExecutor, as_completed
Expand All @@ -16,7 +16,17 @@
from os import PathLike
from pathlib import Path
from platform import system
from typing import TYPE_CHECKING, Any, Dict, Iterable, List, Optional, Tuple, Union, cast
from typing import (
TYPE_CHECKING,
Any,
Dict,
Iterable,
List,
Optional,
Tuple,
Union,
cast,
)

from colorama import Fore
from tqdm import TqdmWarning, tqdm
Expand Down Expand Up @@ -49,14 +59,19 @@
ModelContainersOperations,
ModelVersionsOperations,
)
from azure.ai.ml._restclient.arm_ml_service.models import (
DataVersionBase as DataVersionBaseData,
ModelVersion as ModelVersionData,
from azure.ai.ml._restclient.v2022_05_01.models import (
DataVersionBaseData,
ModelVersionData,
ModelVersionResourceArmPaginatedResult,
)
from azure.ai.ml._restclient.arm_ml_service.models import PendingUploadRequestDto
from azure.ai.ml._restclient.v2023_04_01.models import PendingUploadRequestDto
from azure.ai.ml._utils._pathspec import GitWildMatchPattern, normalize_file
from azure.ai.ml._utils.utils import convert_windows_path_to_unix, retry, snake_to_camel
from azure.ai.ml.constants._common import MAX_AUTOINCREMENT_ATTEMPTS, DefaultOpenEncoding, OrderString
from azure.ai.ml.constants._common import (
MAX_AUTOINCREMENT_ATTEMPTS,
DefaultOpenEncoding,
OrderString,
)
from azure.ai.ml.entities._assets.asset import Asset
from azure.ai.ml.exceptions import (
AssetPathException,
Expand Down Expand Up @@ -383,7 +398,14 @@ def get_upload_files_from_folder(
) -> List[str]:
path = Path(path)
upload_paths = []
for root, _, files in os.walk(path, followlinks=True):
for root, dirs, files in os.walk(path, followlinks=True, topdown=True):
# Skip ignored directories to avoid descending into them
# This significantly improves performance when large ignored folders (e.g., .venv) are present
dirs[:] = [
d for d in dirs
if not ignore_file.is_file_excluded(Path(root).joinpath(d).as_posix())
]

upload_paths += list(
traverse_directory(
root,
Expand Down Expand Up @@ -922,7 +944,7 @@ def _get_latest(
except StopIteration:
latest = None

if latest and isinstance(latest, ModelVersionData):
if latest and isinstance(latest, ModelVersionResourceArmPaginatedResult):
# Data list return object doesn't require this since its elements are already DatasetVersionResources
latest = cast(ModelVersionData, latest)
if not latest:
Expand Down
2 changes: 1 addition & 1 deletion sdk/ml/azure-ai-ml/azure/ai/ml/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------

VERSION = "1.32.0"
VERSION = "1.33.0"
Loading