Skip to content

Commit

Permalink
Release/0.7.2 (#312)
Browse files Browse the repository at this point in the history
Release 0.7.2
  • Loading branch information
makseq authored Jun 11, 2020
1 parent eb280f3 commit 95d18d4
Show file tree
Hide file tree
Showing 46 changed files with 813 additions and 351 deletions.
41 changes: 10 additions & 31 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,32 +1,11 @@
node_modules
npm-debug.log
Dockerfile
.dockerignore
build
dist
docs
tests
tox.ini
public
label_studio.egg-info
.git
.github
.vscode
.editorconfig
.gitignore
*.md
!README.md
*.txt
!requirements.txt
*.yml
*.json
*.pem
.python-version

# shell scripts
update_pypi.sh
# Ignore everything:
**

# misc folders
tmp
etc
my_*
# Except:
!images
!label_studio
!scripts
!tools
!setup.py
!requirements.txt
!README.md
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Label Studio · ![GitHub](https://img.shields.io/github/license/heartexlabs/label-studio?logo=heartex) [![Build Status](https://travis-ci.com/heartexlabs/label-studio.svg?branch=master)](https://travis-ci.com/heartexlabs/label-studio) [![codecov](https://codecov.io/gh/heartexlabs/label-studio/branch/master/graph/badge.svg)](https://codecov.io/gh/heartexlabs/label-studio) ![GitHub release](https://img.shields.io/github/v/release/heartexlabs/label-studio?include_prereleases) · :sunny:

[Website](https://labelstud.io/)[Docs](https://labelstud.io/guide)[Twitter](https://twitter.com/heartexlabs)[Join Slack Community <img src="https://go.heartex.net/docs/images/slack-mini.png" width="18px"/>](https://join.slack.com/t/label-studio/shared_invite/zt-cr8b7ygm-6L45z7biEBw4HXa5A2b5pw)
[Website](https://labelstud.io/)[Docs](https://labelstud.io/guide/)[Twitter](https://twitter.com/heartexlabs)[Join Slack Community <img src="https://go.heartex.net/docs/images/slack-mini.png" width="18px"/>](https://join.slack.com/t/label-studio/shared_invite/zt-cr8b7ygm-6L45z7biEBw4HXa5A2b5pw)

<br/>

Expand Down
166 changes: 94 additions & 72 deletions docs/public/search.xml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Export results
type: guide
order: 104
order: 105
---

Your annotations are stored in [raw completion format](#Completion-format) inside `my_project_name/completions` directory, one file per labeled task named as `task_id.json`.
Expand Down
2 changes: 1 addition & 1 deletion docs/source/guide/labeling.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Labeling
type: guide
order: 103
order: 104
---

Let's explore the complex example of multi-task labeling which includes text + image + audio data objects:
Expand Down
29 changes: 29 additions & 0 deletions docs/source/guide/ml.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,36 @@ Here is a quick example tutorial on how to run the ML backend with a simple text
label-studio start text_classification_project --init --template text_sentiment --ml-backend-url http://localhost:9090
```

## Start with docker compose

Label Studio ML scripts include everything you need to create production ready ML backend server, powered by docker. It uses [uWSGI](https://uwsgi-docs.readthedocs.io/en/latest/) + [supervisord](http://supervisord.org/) stack, and handles background training jobs using [RQ](https://python-rq.org/).

After running this command:

```bash
label-studio-ml init my-ml-backend --script label_studio/ml/examples/simple_text_classifier.py
```

you'll see configs in `my-ml-backend/` directory needed to build and run docker image using docker-compose.
Some preliminaries:
1. Ensure all requirements are specified in `my-ml-backend/requirements.txt` file, e.g. place
```requirements.txt
scikit-learn
```
2. There are no services currently running on ports 9090, 6379 (otherwise change default ports in `my-ml-backend/docker-compose.yml`)
Then from `my-ml-backend/` directory run
```bash
docker-compose up
```
The server starts listening on port 9090, and you can connect it to Label Studio by specifying `--ml-backend http://localhost:9090`
or via UI on **Model** page.
## Create your own ML backend
Check examples in `label-studio/ml/examples` directory.
2 changes: 1 addition & 1 deletion docs/source/guide/setup.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Project setup
type: guide
order: 102
order: 101
---

**Project** is a directory where all annotation assets are located. It is a self-contained entity: when you start Label Studio for the first time e.g. `label-studio start ./my_project --init`,
Expand Down
6 changes: 4 additions & 2 deletions docs/source/guide/storage.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
title: Cloud storages
type: guide
order: 101
order: 103
---

You can integrate the popular cloud storage with Label Studio, collect new tasks uploaded to your buckets, and sync back annotation results to use them in your machine learning pipelines.

Cloud storage type and bucket need to be configured during the start of the server, and further configured during the runtime via UI.
You can configure storage type, bucket and prefixes during the start of the server or during the runtime via UI on **Tasks** page.

You can configure one or both:

Expand All @@ -17,6 +17,8 @@ The connection to both storages is synced, so you can see new tasks after upload

The parameters like prefix or matching filename regex could be changed any time from the webapp interface.

> Note: Choose target storage carefully: be sure it's empty when you just start labeling project, or it contains completions that match previously created/import tasks from source storage. Tasks are synced with completions based on internal ids (keys in `source.json`/`target.json` files in your project directory), so if you accidentally connect to the target storage with existed completions with the same ids, you may fail with undefined behaviour.
## Amazon S3

To connect your [S3](https://aws.amazon.com/s3) bucket with Label Studio, be sure you have programmatic access enabled. [Check this link](https://boto3.amazonaws.com/v1/documentation/api/latest/guide/quickstart.html#configuration) to learn more how to set up access to your S3 bucket.
Expand Down
57 changes: 55 additions & 2 deletions docs/source/guide/tasks.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Import tasks
title: Tasks
type: guide
order: 101
order: 102
---

## Basic format
Expand Down Expand Up @@ -176,6 +176,12 @@ http://<host:port>/data/filename?d=<path/to/the/local/directory>

Supported formats are: `.wav` `.aiff` `.mp3` `.au` `.flac`

### Upload resource files on Import page

For label configs with one data key (e.g.: one input image) Label Studio supports a file uploading via GUI,
just drag & drop your files (or select them from file dialog) on "Import" page.
This option is suitable for limited file number.


## Import using API

Expand All @@ -186,6 +192,53 @@ curl -X POST -H Content-Type:application/json http://localhost:8080/api/import \
--data "[{\"my_key\": \"my_value_1\"}, {\"my_key\": \"my_value_2\"}]"
```

## Retrieve tasks using API

You can retrieve project settings including total task count using API in JSON format:

```json
http://<host:port>/api/project
```

Response example:

```json
{
...
"task_count": 3,
...
}
```

To get tasks with pagination in JSON format:

```
http://<host:port>/api/tasks?page=1&page_size=10&order={-}[id|completed_at]
```

Response example:

```json
[
{
"completed_at": "2020-05-29 03:31:15",
"completions": [
{
"created_at": 1590712275,
"id": 10001,
"lead_time": 4.0,
"result": [ ... ]
}
],
"data": {
"image": "s3://htx-dev/dataset/training_set/dogs/dog.102.jpg"
},
"id": 2,
"predictions": []
}
]
```

## Sampling

You can define the way of how your imported tasks are exposed to annotators. Several options are available. To enable one of them, specify `--sampling=<option>` as command line option.
Expand Down
Loading

0 comments on commit 95d18d4

Please sign in to comment.