Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Azure ML Service tasks #1590

Merged
merged 4 commits into from Oct 3, 2019
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Expand Up @@ -21,8 +21,9 @@ These changes are available in the [master branch](https://github.com/PrefectHQ/

### Task Library

- Add `BlobStorageDownload` and `BlobStorageUpload` for interacting with data stored on Azure Blob Storage - [#692](https://github.com/PrefectHQ/prefect/pull/1538)
- Add `BlobStorageDownload` and `BlobStorageUpload` for interacting with data stored on Azure Blob Storage - [#1538](https://github.com/PrefectHQ/prefect/pull/1538)
- Loosen Kubernetes Tasks' requirement of an API secret key - [#1559](https://github.com/PrefectHQ/prefect/pull/1559)
- Add tasks for working in Azure Machine Learning Serviec with Datastores and Datasets - [#1590](https://github.com/PrefectHQ/prefect/pull/1590)

### Fixes

Expand Down
52 changes: 52 additions & 0 deletions docs/core/task_library/azureml.md
@@ -0,0 +1,52 @@
---
title: Azure ML Service
---

# Microsoft Azure Machine Learning Service

A collection of tasks for interacting with Azure Machine Learning Service resources.

## DatasetCreateFromDelimitedFiles <Badge text="task"/>

Task for creating a TabularDataset from delimited files for use in a Azure Machine Learning service Workspace.

[API Reference](/api/unreleased/tasks/azureml.html#prefect-tasks-azureml-dataset-datasetcreatefromdelimitedfiles)

## DatasetCreateFromParquetFiles <Badge text="task"/>

Task for creating a TabularDataset from Parquet files for use in a Azure Machine Learning service Workspace.

[API Reference](/api/unreleased/tasks/azureml.html#prefect-tasks-azureml-dataset-datasetcreatefromparquetfiles)

## DatasetCreateFromFiles <Badge text="task"/>

Task for creating a FileDataset from files for use in a Azure Machine Learning service Workspace.

[API Reference](/api/unreleased/tasks/azureml.html#prefect-tasks-azureml-dataset-datasetcreatefromfiles)


## DatastoreRegisterBlobContainer <Badge text="task"/>

Task for registering Azure Blob Storage container as a Datastore in a Azure ML service Workspace.

[API Reference](/api/unreleased/tasks/azureml.html#prefect-tasks-azureml-datastore-datastoreregisterblobcontainer)


## DatastoreList <Badge text="task"/>

Task for listing the Datastores in a Workspace.

[API Reference](/api/unreleased/tasks/azureml.html#prefect-tasks-azureml-datastore-datastorelist)

## DatastoreGet <Badge text="task"/>

Task for getting a Datastore registered to a given Workspace.

[API Reference](/api/unreleased/tasks/azureml.html#prefect-tasks-azureml-datastore-datastoreget)


## DatastoreUpload <Badge text="task"/>

Task for uploading local files to a Datastore.

[API Reference](/api/unreleased/tasks/azureml.html#prefect-tasks-azureml-datastore-datastoreupload)
11 changes: 11 additions & 0 deletions docs/outline.toml
Expand Up @@ -199,6 +199,17 @@ title = "Azure Tasks"
module = "prefect.tasks.azure"
classes = ["BlobStorageDownload", "BlobStorageUpload"]

[pages.tasks.azureml]
title = "Azure ML Service Tasks"
module = "prefect.tasks.azureml"
classes = ["DatasetCreateFromDelimitedFiles",
"DatasetCreateFromParquetFiles",
"DatasetCreateFromFiles",
"DatastoreRegisterBlobContainer",
"DatastoreList",
"DatastoreGet",
"DatastoreUpload"]

[pages.tasks.github]
title = "GitHub Tasks"
module = "prefect.tasks.github"
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -11,7 +11,7 @@
extras = {
"airtable": ["airtable-python-wrapper >= 0.11, < 0.12"],
"aws": ["boto3 >= 1.9, < 2.0"],
"azure": ["azure-storage-blob >= 2.1.0, < 3.0"],
"azure": ["azure-storage-blob >= 2.1.0, < 3.0", "azureml-sdk >= 1.0.65, < 1.1"],
"dev": dev_requires,
"dropbox": ["dropbox ~= 9.0"],
"google": [
Expand Down
22 changes: 22 additions & 0 deletions src/prefect/tasks/azureml/__init__.py
@@ -0,0 +1,22 @@
"""
This module contains a collection of tasks for interacting with Azure Machine Learning Service resources.
"""

try:
from prefect.tasks.azureml.dataset import (
DatasetCreateFromDelimitedFiles,
DatasetCreateFromParquetFiles,
DatasetCreateFromFiles,
)

from prefect.tasks.azureml.datastore import (
DatastoreRegisterBlobContainer,
DatastoreList,
DatastoreGet,
DatastoreUpload,
)

except ImportError:
raise ImportError(
'Using `prefect.tasks.azureml` requires Prefect to be installed with the "azure" extra.'
)