Metadata-Version: 2.4
Name: deep-learning-azure
Version: 0.0.12
Summary: Generic Azure integration layer for dl-core.
Project-URL: Homepage, https://github.com/Blazkowiz47/dl-azure
Project-URL: Documentation, https://github.com/Blazkowiz47/dl-azure/tree/main/readme
Project-URL: Repository, https://github.com/Blazkowiz47/dl-azure
Project-URL: Issues, https://github.com/Blazkowiz47/dl-azure/issues
License: MIT License
        
        Copyright (c) 2026 Sushrut Patwardhan
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Classifier: License :: OSI Approved :: MIT License
Requires-Python: >=3.10
Requires-Dist: azure-ai-ml==1.31.0
Requires-Dist: azure-identity==1.25.1
Requires-Dist: azure-storage-blob==12.19.0
Requires-Dist: azureml-core==1.60.0.post1
Requires-Dist: azureml-mlflow==1.60.0.post1
Requires-Dist: deep-learning-core<0.1,>=0.0.17
Requires-Dist: setuptools<81
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == 'dev'
Description-Content-Type: text/markdown

# deep-learning-azure

Public Azure integration layer for `deep-learning-core`.

`deep-learning-azure` adds Azure ML execution, Azure storage helpers, and
Azure-oriented dataset wrappers on top of `deep-learning-core`.

Install it directly or through the `deep-learning-core[azure]` extra. The
package is kept separate so Azure-specific dependencies and scaffold wiring do
not leak into plain `deep-learning-core` installations.

## Install

Install from PyPI through the core extra:

```bash
pip install "deep-learning-core[azure]"
```

Install the package directly:

```bash
pip install deep-learning-azure
```

Install in a `uv` project:

```bash
uv add "deep-learning-core[azure]" deep-learning-azure
```

## Scope

- Azure ML executor
- Azure storage helpers and AzCopy wrappers
- Azure dataset wrappers
- Azure experiment scaffold integration through `dl-init --with-azure`

## Out Of Scope

- Generic trainer, dataset, and metric abstractions
- Public framework defaults
- Concrete experiment repositories

## Quick Start

Install it into an experiment repository through the Azure extra:

```bash
uv add "deep-learning-core[azure]" deep-learning-azure
```

If the repository was scaffolded with `dl-init --with-azure`, the
experiment package will import `dl_azure` automatically so its executor
and generic dataset wrappers register at runtime, and the scaffold will also
create `azure-config.json`.

The Azure executor is sweep-oriented. Use
`uv run dl-sweep experiments/lr_sweep.yaml --dry-run` before the first real
submission in a new repository.

Concrete experiment flow:

```bash
uv init
uv add deep-learning-azure
uv run dl-init --root-dir . --with-azure
uv run dl-core add dataset AzureSeq --base azure_compute_multiframe
uv run dl-sweep experiments/lr_sweep.yaml --dry-run
```

Tracker naming defaults to the repository root name. If you want Azure job
submission and Azure MLflow to use a different destination name, set
`tracking.experiment_name` in your sweep config.

Azure submissions automatically rewrite the default local `runtime.output_dir`
from `artifacts` to `outputs/artifacts` inside the remote job. That keeps
checkpoints, plots, metrics, and other run files under Azure ML's managed
output directory without changing the local default artifact layout.

When you analyze an Azure-backed sweep with `dl-analyze`, the Azure metrics
source fetches only the metric histories requested on the CLI, for example:

```bash
uv run dl-analyze --sweep experiments/lr_sweep.yaml \
  --metric test/eer --mode min \
  --metric test/accuracy --mode max \
  --rank-method rank-sum
```

Those fetched metric histories are cached in `analysis_cache.json` next to
`sweep_tracking.json`. Use `--force` to refresh them.

If you want the tracked Azure job outputs locally after the sweep finishes, run:

```bash
uv run dl-sync --sweep experiments/lr_sweep.yaml --artifacts
```

That downloads the Azure job bundle for each tracked run and patches
`sweep_tracking.json` with the resolved local artifact paths.

Concrete dataset scaffold examples:

```bash
uv run dl-core add dataset AzureImages --base azure_compute
uv run dl-core add dataset AzureFrames --base azure_compute_frame
uv run dl-core add dataset AzureSeq --base azure_compute_multiframe
uv run dl-core add dataset AzureStream --base azure_streaming
uv run dl-core add dataset AzureStreamSeq --base azure_streaming_multiframe
```

## What You Get

- the `azure` executor
- Azure storage helpers and AzCopy wrappers
- generic Azure dataset foundations:
  `AzureComputeWrapper`, `AzureStreamingWrapper`,
  `AzureComputeFrameWrapper`, `AzureStreamingFrameWrapper`,
  `AzureComputeMultiFrameWrapper`, and `AzureStreamingMultiFrameWrapper`
- `dl-init --with-azure` scaffold integration
- a managed `.amlignore` block that preserves user content while excluding
  common local-only outputs from Azure submissions
- Azure job output routing to `outputs/artifacts` for automatic artifact
  persistence in Azure ML

## Companion Packages

- [`dl-core`](https://github.com/Blazkowiz47/dl-core)
- [`dl-mlflow`](https://github.com/Blazkowiz47/dl-mlflow)
- [`dl-wandb`](https://github.com/Blazkowiz47/dl-wandb)

## Documentation

- [Documentation Index](https://github.com/Blazkowiz47/dl-azure/tree/main/readme)
- [GitHub Repository](https://github.com/Blazkowiz47/dl-azure)

## License

MIT. See [LICENSE](LICENSE).
