diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml
new file mode 100644
index 000000000000..ffe0c82e5210
--- /dev/null
+++ b/.github/workflows/e2e-tests.yml
@@ -0,0 +1,40 @@
+name: label-studio:tests
+
+on:
+ push:
+ branches: ['*', '*/*', master]
+
+jobs:
+ tests:
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v2
+
+ - uses: actions/setup-python@v2
+ with:
+ python-version: '3.x'
+ - uses: py-actions/py-dependency-install@v2
+ - run: pip install -e .
+
+ - uses: actions/setup-node@v1
+ with:
+ node-version: 12
+ # cache npm deps for faster runs
+ - name: Cache node modules
+ uses: actions/cache@v1
+ env:
+ cache-name: cache-node-modules
+ with:
+ path: ~/.npm
+ key: npm-${{ runner.os }}-${{ hashFiles('e2e/package-lock.json') }}
+ restore-keys: |
+ npm-${{ runner.os }}-
+ - run: cd e2e && npm ci
+ - run: cd e2e && npm run test:headless
+
+ - uses: actions/upload-artifact@master
+ if: ${{ failure() }}
+ with:
+ name: e2e output
+ path: e2e/output/
diff --git a/.github/workflows/master.yaml b/.github/workflows/master.yaml
index b2686f835de1..60175292fe87 100644
--- a/.github/workflows/master.yaml
+++ b/.github/workflows/master.yaml
@@ -31,6 +31,8 @@ jobs:
run: |
label-studio init my_project
- name: Test with pytest
+ env:
+ collect_analytics: 0
run: |
coverage run -m --source=label_studio pytest
coverage report -m --fail-under=40
diff --git a/.gitignore b/.gitignore
index 1a7304112a17..20ff32e48d2b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -53,3 +53,4 @@ label-studio-projects
build/
dist/
venv/
+tmp/
diff --git a/Dockerfile b/Dockerfile
index 620177a084e5..d690fba82d27 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -5,10 +5,16 @@ WORKDIR /label-studio
# Copy and install requirements.txt first for caching
COPY requirements.txt /label-studio
+RUN pip install --upgrade pip
RUN pip install -r requirements.txt
ENV PORT="8080"
-ENV PROJECT_NAME=my_project
+ENV PROJECT_NAME="my_project"
+ENV HOST=0.0.0.0
+ENV PROTOCOL=http://
+# basic auth params
+ENV USERNAME=""
+ENV PASSWORD=""
EXPOSE ${PORT}
diff --git a/README.md b/README.md
index ad8dda26cfc5..1dcba824ced3 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# Label Studio ·     ·
-[Website](https://labelstud.io/) • [Docs](https://labelstud.io/guide/) • [Twitter](https://twitter.com/heartexlabs) • [Join Slack Community ](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 ](https://join.slack.com/t/label-studio/shared_invite/zt-cr8b7ygm-6L45z7biEBw4HXa5A2b5pw)
@@ -129,8 +129,10 @@ INIT_COMMAND=--init --force
## One Click Deploy
+You can deploy LS right now in one click on any of these clouds:
+
[](https://heroku.com/deploy)
-[](https://azuredeploy.net/)
+[](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Fheartexlabs%2Flabel-studio%2Fmaster%2Fazuredeploy.json)
[](https://deploy.cloud.run)
## Features :star2:
diff --git a/docs/Tags.md b/docs/Tags.md
index 1791c557f588..d00b9b6bf70a 100644
--- a/docs/Tags.md
+++ b/docs/Tags.md
@@ -497,7 +497,9 @@ Table tag, show object keys and values in a table
### Examples
```html
-
+
+
+
```
## View
diff --git a/docs/_config.yml b/docs/_config.yml
index 5b95c8920260..cba55c313742 100644
--- a/docs/_config.yml
+++ b/docs/_config.yml
@@ -101,3 +101,4 @@ search:
path: search.xml
field: all
content: true
+
diff --git a/docs/package-lock.json b/docs/package-lock.json
index c49b5dfe4a2b..a2efa098c523 100644
--- a/docs/package-lock.json
+++ b/docs/package-lock.json
@@ -2560,6 +2560,14 @@
}
}
},
+ "hexo-tag-details": {
+ "version": "0.1.7",
+ "resolved": "https://registry.npmjs.org/hexo-tag-details/-/hexo-tag-details-0.1.7.tgz",
+ "integrity": "sha512-wjt5OLJKvhaqnjj3HaOWVRrRaAlLeV/YWq5CpyRzIqZ+K7lvuWXf4dTjzzb46NrENaiRLE4saENyDVK0jOWUbw==",
+ "requires": {
+ "hexo-util": "^0.6.3"
+ }
+ },
"hexo-util": {
"version": "0.6.3",
"resolved": "https://registry.npmjs.org/hexo-util/-/hexo-util-0.6.3.tgz",
diff --git a/docs/package.json b/docs/package.json
index 6d6bc105baaf..6a2bc9435813 100644
--- a/docs/package.json
+++ b/docs/package.json
@@ -26,7 +26,8 @@
"hexo-renderer-marked": "^2.0.0",
"hexo-renderer-stylus": "^0.3.3",
"hexo-server": "^0.3.3",
- "save": "^2.4.0"
+ "save": "^2.4.0",
+ "hexo-tag-details": "^0.1.7"
},
"scripts": {
"server": "hexo serve",
diff --git a/docs/source/blog/index.html b/docs/source/blog/index.html
index 153386f590f6..7f026e11e6c5 100644
--- a/docs/source/blog/index.html
+++ b/docs/source/blog/index.html
@@ -90,7 +90,16 @@
color: #777;
}
+ .sidebar {
+ display: none;
+ }
+
@media screen and (max-width: 900px) {
+
+ .sidebar {
+ display: flex;
+ }
+
@media only screen and (max-width: 768px) {
.grid {
width: auto;
diff --git a/docs/source/guide/FAQ.md b/docs/source/guide/FAQ.md
new file mode 100644
index 000000000000..d119b65b0557
--- /dev/null
+++ b/docs/source/guide/FAQ.md
@@ -0,0 +1,109 @@
+---
+title: FAQ
+type: guide
+order: 101
+---
+
+Frequently asked questions about setup and usage.
+
+## Image/audio/resource loading error while labeling
+
+The most common mistake while resource loading is CORS (Cross-Origin Resource Sharing) problem or Cross Domain. When you are trying to fetch a picture from external hosting it could be blocked by security reasons. Go to browser console (Ctrl + Shift + i for Chrome) and check errors there. Typically, this problem is solved by the external host setup.
+
+
+
+
+
+
+
+
+
+
+* If you have an access to the hosting server as admin then you need to allow CORS for the web server. For nginx you can try to add these lines to `/etc/nginx/nginx.conf` into your `location` section:
+
+
+ ```
+ location {
+ if ($request_method = 'OPTIONS') {
+ add_header 'Access-Control-Allow-Origin' '*';
+ add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
+ #
+ # Custom headers and headers various browsers *should* be OK with but aren't
+ #
+ add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
+ #
+ # Tell client that this pre-flight info is valid for 20 days
+ #
+ add_header 'Access-Control-Max-Age' 1728000;
+ add_header 'Content-Type' 'text/plain; charset=utf-8';
+ add_header 'Content-Length' 0;
+ return 204;
+ }
+ if ($request_method = 'POST') {
+ add_header 'Access-Control-Allow-Origin' '*';
+ add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
+ add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
+ add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range';
+ }
+ if ($request_method = 'GET') {
+ add_header 'Access-Control-Allow-Origin' '*';
+ add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
+ add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
+ add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range';
+ }
+ }
+ ```
+
+
+* If you use Amazon S3 with LS [read this manual](storage.html#CORS-and-access-problems).
+
+* If you use Google Storage with LS [read this manual](storage.html#CORS-and-access-problems-1).
+
+* Not every host supports CORS setup, but you may to try find these settings in the admin area.
+
+
+
+## How to make pre-annotations & pre-labeling
+You can import pre-annotated tasks into LS. Pre-annotations will be automatically shown on Labeling page. Prepare your tasks with `predictions` field which is very similar to `completions` and then import your tasks to LS. [Read more](tasks.html#Basic-format) about task format and predictions.
+
+
+```json
+[{
+ "data": {
+ "my_text": "Opossum is great"
+ },
+
+ "predictions": [{
+ "result": [{
+ "from_name": "sentiment_class",
+ "to_name": "message",
+ "type": "choices",
+ "value": {
+ "choices": ["Positive"]
+ }
+ }]
+ }]
+}]
+```
+
+## How to display labels on bounding boxes, polygons and other regions
+
+
+
+
+## How to run LSB with external domain name
+
+If you want to run LSB with some domain name you need to use Host, Protocol, Port parameters at LS run. They are responsible for correct URLs while a resource files import (images, audio, etc) and sample tasks generation.
+
+There are several possible ways to do it:
+
+1. Replace these parameters inside of your `project/config.json` (or `label_studio/utils/schema/default_config.json` from LSB package directory).
+2. Specify these parameters at start: `label-studio start --host label-studio.example.com --protocol http:// --port 8080`.
+3. For docker usage: specify environment variables `HOST`, `PROTOCOL`, `PORT` while docker setup.
+
+LSB web server always use `0.0.0.0` address for start. But if you really need to change it to `localhost` just set Host as `localhost` and web server will start at `localhost`.
+
+
+
+
+
diff --git a/docs/source/guide/export.md b/docs/source/guide/export.md
index aa6e5d3fa202..7a9ee4346eca 100644
--- a/docs/source/guide/export.md
+++ b/docs/source/guide/export.md
@@ -18,6 +18,12 @@ The output data is stored in _completions_ - JSON formatted files, one per each
```json
{
+ "id": 1,
+
+ "data": {
+ "image": "https://htx-misc.s3.amazonaws.com/opensource/label-studio/examples/images/nick-owuor-astro-nic-visuals-wDifg5xc9Z4-unsplash.jpg"
+ },
+
"completions": [
{
"id": "1001",
@@ -43,10 +49,7 @@ The output data is stored in _completions_ - JSON formatted files, one per each
]
}
],
- "data": {
- "image": "https://htx-misc.s3.amazonaws.com/opensource/label-studio/examples/images/nick-owuor-astro-nic-visuals-wDifg5xc9Z4-unsplash.jpg"
- },
- "id": 1,
+
"predictions": [
{
"created_ago": "3 hours",
diff --git a/docs/source/guide/frontend.md b/docs/source/guide/frontend.md
index c93c63e1c31b..0587a43eb9cf 100644
--- a/docs/source/guide/frontend.md
+++ b/docs/source/guide/frontend.md
@@ -4,89 +4,138 @@ type: guide
order: 705
---
-Frontend, as its name suggests, is the frontend library based on React and mobx-state-tree, distributed as an NPM package. You can include it in your applications and provide data annotation support to your users. It can be granularly customized and extended.
+Frontend, as its name suggests, is the frontend library called [«Label Studio Frontend»](https://github.com/heartexlabs/label-studio-frontend) (**LSF**) based on React and mobx-state-tree, distributed as an NPM package. You can include it in your applications without «Label Studio Backend» (**LSB**) part and provide data annotation support to your users. It can be customized and extended.
-Its repository is located at https://github.com/heartexlabs/label-studio-frontend
+LSF is located as a separated github repository:
+https://github.com/heartexlabs/label-studio-frontend
-## Install
+
+
-```bash
-npm install label-studio
+
+## Frontend development
+
+### Manual builds
+
+If you want to build a new tag or change the behaviour of default components inside of LSF then you need to go into LSF repo and check [Development part](https://github.com/heartexlabs/label-studio-frontend#development) of readme. Note that this will require you to have a good knowledge of React and Javascript.build.js
+
+
+### Github Artifacts
+
+Github Artifacts provide zip archives with LSF builds for download via simple link. Branches from the official LSF repo will be built automatically and placed on Github Artifacts hosting. Check [this link](https://github.com/heartexlabs/label-studio-frontend/actions) to access it.
+
+Also you can configure github token to obtain artifacts automatically:
+```
+export GITHUB_TOKEN=
+cd label-studio/scripts
+node get-lsf-build.js
```
-## CDN
+### CDN
+
+You can include `main..css` and `main..js` files from CDN directly. Explore `https://unpkg.com/browse/label-studio@/build/static/` (e.g. [0.7.3](https://unpkg.com/browse/label-studio@0.7.3/build/static/) to find correct filenames of js/css.
```xhtml
-
+
-
+
```
-## Quickstart
-Instantiate a new Label Studio object with a selector for the div that should become the editor.
+## Frontend integration guide
-```xhtml
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ ```
+
+## Custom LSF + LSB integration
+
+LS Frontend (LSF) with Backend (LSB) integration is similar to described in «[Frontend integration guide](#Frontend-integration-guide)». Javascript integration script is placed in [lsf-sdk.js](https://github.com/heartexlabs/label-studio/blob/master/label_studio/static/js/lsf-sdk.js) in Backend. The main idea of this integration based on LSF callbacks.
+
+1. Make your custom LSF build by following this [instructions](https://github.com/heartexlabs/label-studio-frontend#development). Final your development with `npm run build-bundle` to generate `main..css` and `main..js` files.
+
+2. **Do not forget** to remove the old build from LSB:
+```bash
+rm -r label-studio/label_studio/static/editor/*
```
-> You can use [Playground](/playground) to test out different types of config.
+3. Copy build folder from LSF to LSB:
+ ```bash
+ cp -r label-studio-frontend/build/static/{js,css} label-studio/label_studio/static/editor/
+ ```
-To see all the available options for the initialization of **LabelStudio**, please check the [Reference](frontend_reference.html).
+ If you installed LS as a pip package then you should replace `/lib/python/site-packages/label_studio/static/editor/`
+
+4. Run LS instance as usual and it will use a new LSF build:
+ ```bash
+ label-studio start
+ ```
+ You can check a new build by exploring the source code of Labeling page in your browser, there must be something like this in the `` section:
+
+ ```xhtml
+
+
+
+
+
+ ```
+
+ If you have doubled css/js files then you need to repeat these instruction from the step 2.
\ No newline at end of file
diff --git a/docs/source/guide/index.md b/docs/source/guide/index.md
index d7890e80b61f..35dcd62b771c 100644
--- a/docs/source/guide/index.md
+++ b/docs/source/guide/index.md
@@ -21,17 +21,31 @@ Here are the main concepts behind Label Studio's workflow:
- **Frontend Labeling UI** is accessible from any browser, distributed as precompiled js/css scripts and could be [easily extendable with new labeling tags](frontend.html). You can also [embed Label Studio UI into your applications](frontend.html#Quickstart).
-**Relations among tasks, completions and results**
+### Main modules
+
+The main modules of LS are
+* [Label Studio Backend](https://github.com/heartexlabs/label-studio/) (LSB, main repository)
+* [Label Studio Frontend](https://github.com/heartexlabs/label-studio-frontend) (LSF, editor)
+* [Machine Learning Backends](https://github.com/heartexlabs/label-studio/tree/master/label_studio/ml) (MLB)
+
+
+
+
+### Relations among tasks, completions and results
Here you can see relations among labeling objects: tasks, completions, results, etc.
One user provides one completion, it’s atomic, and it consists of the result items. Result items can have relations between themselves with the specified direction of three types: left-right, right-left, or bidirectional. Normalizations are additional information in the custom string format about the current result item.
-
+
Completions and Predictions are very similar. But predictions must be generated automatically by ML models.
+**Usage statistics**
+
+Label Studio collects anonymous usage statistics without any sensitive info about page request number and data types from the labeling config. It helps us to improve the labeling quality and gives a better understanding about the next development.
+
## Quickstart
@@ -132,6 +146,8 @@ Or put `username` and `password` in the project config.json.
}
```
+> For docker you need to setup environment variables `USERNAME` and `PASSWORD`
+
It will be the same username and password for all the users.
diff --git a/docs/source/guide/ml.md b/docs/source/guide/ml.md
index db12a9a34ed4..0de925a7e2e5 100644
--- a/docs/source/guide/ml.md
+++ b/docs/source/guide/ml.md
@@ -20,6 +20,10 @@ That gives you the opportunities to use:
- [Text classification with Scikit-Learn](/tutorials/sklearn-text-classifier.html)
- [Transfer learning for images with PyTorch](/tutorials/pytorch-image-transfer-learning.html)
+#### Create your own ML backend
+
+Check examples in [`label-studio/ml/examples`](https://github.com/heartexlabs/label-studio/tree/master/label_studio/ml/examples) directory.
+
## Quickstart
Here is a quick example tutorial on how to run the ML backend with a simple text classifier:
@@ -51,7 +55,21 @@ Here is a quick example tutorial on how to run the ML backend with a simple text
```bash
label-studio start text_classification_project --init --template text_sentiment --ml-backends http://localhost:9090
```
+ You can confirm that the model has connected properly from the `/model` subpage in the Label Studio UI.
+
+5. Getting predictions
+ You should see model predictions in the labeling interface. For example in an image classification task: the model will
+ pre-select an image class for you to verify.
+
+6. Model training
+ Model training can be triggered manually by pushing the Start Training button on the `/model` page, or by using an API call:
+ ```
+ curl -X POST http://localhost:8080/api/train
+ ```
+ In development mode, training logs will have an output into the console. In production mode, runtime logs are available in
+ `my_backend/logs/uwsgi.log` and RQ training logs in `my_backend/logs/rq.log`
+
## 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/).
@@ -82,6 +100,13 @@ docker-compose up
The server starts listening on port 9090, and you can connect it to Label Studio by specifying `--ml-backends http://localhost:9090`
or via UI on **Model** page.
-## Create your own ML backend
+## Active Learning
+
+The process of creating annotated training data for supervised machine learning models is often expensive and time-consuming. Active Learning is a branch of machine learning that **seeks to minimize the total amount of data required for labeling by strategically sampling observations** that provide new insight into the problem. In particular, Active Learning algorithms seek to select diverse and informative data for annotation (rather than random observations) from a pool of unlabeled data using **prediction scores**.
-Check examples in `label-studio/ml/examples` directory.
\ No newline at end of file
+Depending on score types you can select a sampling strategy
+* prediction-score-min (min is the best score)
+* prediction-score-max (max is the best score)
+
+Read more about active learning sampling [on the task page](https://labelstud.io/guide/tasks.html#Sampling).
+
diff --git a/docs/source/guide/storage.md b/docs/source/guide/storage.md
index 7b96b27db972..640bbfbc2f75 100644
--- a/docs/source/guide/storage.md
+++ b/docs/source/guide/storage.md
@@ -33,13 +33,32 @@ The following commands launch Label Studio, configure the connection to your S3
label-studio start my_project --init --source s3 --source-path my-s3-bucket
```
-
#### Write completions to bucket
```bash
label-studio start my_project --init --target s3-completions --target-path my-s3-bucket
```
+### CORS and access problems
+
+Check the browser console (Ctrl + Shift + i in Chromium) for errors if you have troubles with the bucket objects access.
+
+* If you see CORS problems, please [read here](https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html).
+
+
+* You must specify the `region` when you create a new bucket. Don't forget to change it in your `.aws/config` file. Otherwise your bucket objects will have problems with access.
+
+ E.g.: `~/.aws/config`
+ ```
+ [default]
+ region=us-east-2 # change to the region of your bucket
+ ```
+
+* Use LS version >= 0.7.5, it has a signature version s3v4 to support more aws regions.
+
+* If you see 403 errors, make sure you have the correct [credentials configured](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html).
+
+
### Working with Binary Large OBjects (BLOBs)
When you are storing BLOBs in your S3 bucket (like images or audio files), you might want to use then as is, by generating URLs pointing to those objects (e.g. `gs://my-s3-bucket/image.jpg`)
@@ -77,7 +96,6 @@ Generate task data with URLs pointed to your bucket objects(for resources like j
To connect your [GCS](https://cloud.google.com/storage) bucket with Label Studio, be sure you have enabled programmatic access. [Check this link](https://cloud.google.com/storage/docs/reference/libraries) to learn more about how to set up access to your GCS bucket.
-
### Create connection on startup
The following commands launch Label Studio, configure the connection to your GCS bucket, scan for existing tasks, and load them into the app for the labeling.
@@ -94,6 +112,14 @@ label-studio start my_project --init --source gcs --source-path my-gcs-bucket
label-studio start my_project --init --target gcs-completions --source-path my-gcs-bucket
```
+### CORS and access problems
+
+Check the browser console (Ctrl + Shift + i in Chromium) for errors if you have troubles with the bucket objects access.
+
+* If you see CORS problems, please [read here](https://cloud.google.com/storage/docs/configuring-cors).
+
+* If you see 403 errors, make sure you have the correct [credentials configured](https://cloud.google.com/storage/docs/reference/libraries#setting_up_authentication).
+
### Working with Binary Large OBjects (BLOBs)
When you are storing BLOBs in your GCS bucket (like images or audio files), you might want to use then as is, by generating URLs pointing to those objects (e.g. `gs://my-gcs-bucket/image.jpg`)
diff --git a/docs/source/guide/tasks.md b/docs/source/guide/tasks.md
index bf5fe326ac10..05df90159619 100644
--- a/docs/source/guide/tasks.md
+++ b/docs/source/guide/tasks.md
@@ -126,7 +126,7 @@ this is a second task,456
### Plain text
```bash
-label-studio init --input-path=my_tasks.txt --input-format=text --label-config=config.xml
+label-studio init my-project --input-path=my_tasks.txt --input-format=text --label-config=config.xml
```
In a typical scenario, you may use only one input data stream (or in other words only one [object tag](/tags) specified in label config). In this case, you don't need to use JSON format, but simply write down your values in a plain text file, line by line, e.g.
@@ -139,7 +139,7 @@ this is a second task
### Directory with plain text files
```bash
-label-studio init --input-path=dir/with/text/files --input-format=text-dir --label-config=config.xml
+label-studio init my-project --input-path=dir/with/text/files --input-format=text-dir --label-config=config.xml
```
You can split your input data into several plain text files, and specify the directory path. Then Label Studio scans each file line-by-line, creating one task per line. Each plain text file is formatted the same as above.
@@ -147,7 +147,7 @@ You can split your input data into several plain text files, and specify the dir
### Directory with image files
```bash
-label-studio init --input-path=dir/with/images --input-format=image-dir --label-config=config.xml --allow-serving-local-files
+label-studio init my-project --input-path=dir/with/images --input-format=image-dir --label-config=config.xml --allow-serving-local-files
```
> WARNING: "--allow-serving-local-files" is intended to use only for locally running instances: avoid using it for remote servers unless you are sure what you're doing.
@@ -163,7 +163,7 @@ Supported formats are: `.png` `.jpg` `.jpeg` `.tiff` `.bmp` `.gif`
### Directory with audio files
```bash
-label-studio init --input-path=my/audios/dir --input-format=audio-dir --label-config=config.xml --allow-serving-local-files
+label-studio init my-project --input-path=my/audios/dir --input-format=audio-dir --label-config=config.xml --allow-serving-local-files
```
> WARNING: "--allow-serving-local-files" is intended to use only for locally running instances: avoid using it for remote servers unless you are sure what you're doing.
@@ -178,9 +178,7 @@ 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.
+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
diff --git a/docs/source/playground/index.html b/docs/source/playground/index.html
index 34094d813b35..95c0299d015c 100644
--- a/docs/source/playground/index.html
+++ b/docs/source/playground/index.html
@@ -3,6 +3,9 @@
order: 201
---
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -1515,9 +1607,9 @@
Output preview
var url = new URL(url_string);
// Label code mirror
- let labelEditor = CodeMirror.fromTextArea(document.getElementById('id_label_config'), {
+ var labelEditor = CodeMirror.fromTextArea(document.getElementById('id_label_config'), {
lineNumbers: true,
- mode: "text/html",
+ mode: "text/html"
});
labelEditor.focus();
@@ -1589,7 +1681,7 @@
url: host + '/business/projects/upload-example/',
data: {label_config: val}
})
- .fail(o => {
+ .fail(function(o) {
$('#upload-data-example').text('...')
})
- .done(o => {
+ .done(function(o) {
$('#upload-data-example').text(JSON.stringify(JSON.parse(o), null, 4))
})
}
diff --git a/docs/source/tags/filter.md b/docs/source/tags/filter.md
index 3cdd7f7f4b9d..6af5d00eeab3 100644
--- a/docs/source/tags/filter.md
+++ b/docs/source/tags/filter.md
@@ -4,22 +4,27 @@ type: tags
order: 501
---
-Filter tag, show filter
+Filter search for large amount of labels
### Parameters
| Param | Type | Default | Description |
| --- | --- | --- | --- |
-| value | string | | text of filter |
-| [size] | number | 4 | size of filter |
+| [placeholder] | string | | placeholder text of filter |
+| [minlength] | number | 4 | size of filter |
| [style] | string | | css style string |
-| [underline] | boolean | false | underline of filter |
+| [hotkey] | string | | hotkey to focus on filter text area |
### Example
```html
-
-```
-### Example
-```html
-
+
+
+
+
+
+
+
+
```
diff --git a/docs/source/tags/header.md b/docs/source/tags/header.md
index fb54c4e6410b..954886fc3a0c 100644
--- a/docs/source/tags/header.md
+++ b/docs/source/tags/header.md
@@ -17,9 +17,13 @@ Header tag, show header
### Example
```html
-
+
+
+
```
### Example
```html
-
+
+
+
```
diff --git a/docs/source/tags/hypertext.md b/docs/source/tags/hypertext.md
index ec03117f632a..49b62485ac45 100644
--- a/docs/source/tags/hypertext.md
+++ b/docs/source/tags/hypertext.md
@@ -18,5 +18,7 @@ HyperText tag shows an HyperText markup that can be labeled
### Example
```html
-
+
+
+
```
diff --git a/docs/source/tags/hypertextlabels.md b/docs/source/tags/hypertextlabels.md
index 245d3c9598b2..ad1a4ad96bd4 100644
--- a/docs/source/tags/hypertextlabels.md
+++ b/docs/source/tags/hypertextlabels.md
@@ -4,7 +4,6 @@ type: tags
order: 406
---
-HyperTextLabels tag
HyperTextLabels tag creates labeled hyper text (HTML)
### Parameters
diff --git a/docs/source/tags/keypoint.md b/docs/source/tags/keypoint.md
index 69c3525935d1..1a4e51363744 100644
--- a/docs/source/tags/keypoint.md
+++ b/docs/source/tags/keypoint.md
@@ -4,8 +4,7 @@ type: tags
order: 407
---
-KeyPoint tag
-KeyPoint is used to add a keypoint to an image
+KeyPoint is used to add a keypoint to an image without label selection. It's useful when you have only one label.
### Parameters
diff --git a/docs/source/tags/label.md b/docs/source/tags/label.md
index 75270dc00bf2..7e47bf427113 100644
--- a/docs/source/tags/label.md
+++ b/docs/source/tags/label.md
@@ -20,6 +20,7 @@ Label tag represents a single label
| [size] | string | "medium" | size of text in the label |
| [background] | string | | background color of an active label |
| [selectedColor] | string | | color of text in an active label |
+| [granularity] | symbol \| word | | control per symbol or word selection (only for Text) |
### Example
```html
diff --git a/docs/source/tags/pairwise.md b/docs/source/tags/pairwise.md
index 127996036b48..4ba630b5ca12 100644
--- a/docs/source/tags/pairwise.md
+++ b/docs/source/tags/pairwise.md
@@ -25,8 +25,10 @@ Pairwise element. Compare two different objects, works with any label studio obj
```
### Example
-```html
+
You can also style the appearence using the View tag:
+
+```html
diff --git a/docs/source/tags/polygon.md b/docs/source/tags/polygon.md
index 1608839e0bea..a5395886a462 100644
--- a/docs/source/tags/polygon.md
+++ b/docs/source/tags/polygon.md
@@ -4,8 +4,7 @@ type: tags
order: 413
---
-Polygon tag
-Polygon is used to add polygons to an image
+Polygon is used to add polygons to an image without label selection. It's useful when you have only one label.
### Parameters
diff --git a/docs/source/tags/ranker.md b/docs/source/tags/ranker.md
index 73ed8d66b166..16bfa0e05089 100644
--- a/docs/source/tags/ranker.md
+++ b/docs/source/tags/ranker.md
@@ -1,11 +1,22 @@
---
title: Ranker
type: tags
-order: 415
+order: 416
---
Ranker tag, used to ranking models
+> Ranker has a complex mechanics and uses only the "prediction" field from the input task,
+please explore input task example carefully.
+
+It renders given list of strings and allows to drag and reorder them.
+To see this tag in action you have to use **Input task example** json below as task
+on "Import" page:
+1) setup given config,
+2) go to Import,
+3) copy-paste json to the input field and submit,
+4) start the labeling.
+
### Parameters
| Param | Type | Default | Description |
@@ -17,6 +28,33 @@ Ranker tag, used to ranking models
### Example
```html
+
+
```
+### Example
+
+Input task example
+
+```json
+[{
+ "data": {
+ "text": "Some text for ranker"
+ },
+ "predictions": [{
+ "model_version": "1564027355",
+ "result": [{
+ "from_name": "ranker-1",
+ "to_name": "ranker-1",
+ "type": "ranker",
+ "value": {
+ "items": ["abc", "def", "ghk", "more more more", "really long text"],
+ "weights": [1.00, 0.78, 0.75, 0.74, 0.74],
+ "selected": [false, false, false, false, false]
+ }
+ }],
+ "score": 1.0
+ }]
+}]
+```
diff --git a/docs/source/tags/rectangle.md b/docs/source/tags/rectangle.md
index d271f5aa9683..cc348721c3aa 100644
--- a/docs/source/tags/rectangle.md
+++ b/docs/source/tags/rectangle.md
@@ -4,8 +4,8 @@ type: tags
order: 417
---
-Rectangle
-Rectangle is used to add rectangle (Bounding Box) to an image
+Rectangle is used to add rectangle (Bounding Box) to an image without label selection. It's useful when you have
+only one label.
### Parameters
diff --git a/docs/source/tags/relation.md b/docs/source/tags/relation.md
index 34d8274380bf..43447053fec2 100644
--- a/docs/source/tags/relation.md
+++ b/docs/source/tags/relation.md
@@ -17,8 +17,14 @@ Relation tag represents a single relation label
```html
-
-
+
+
+
+
+
+
+
+
```
diff --git a/docs/source/tags/relations.md b/docs/source/tags/relations.md
index 62275673f765..87edd0333e00 100644
--- a/docs/source/tags/relations.md
+++ b/docs/source/tags/relations.md
@@ -19,6 +19,7 @@ Relations tag, create relations labels
+
diff --git a/docs/source/tags/shortcut.md b/docs/source/tags/shortcut.md
index c37aaa7a689e..ccf8e756f9d9 100644
--- a/docs/source/tags/shortcut.md
+++ b/docs/source/tags/shortcut.md
@@ -18,7 +18,7 @@ Shortcut tag can be used to define a shortcut, which adds a predefined object
```html
```
diff --git a/docs/source/tags/text.md b/docs/source/tags/text.md
index fcfb7e3d5bb1..ca9ca39af4c4 100644
--- a/docs/source/tags/text.md
+++ b/docs/source/tags/text.md
@@ -20,5 +20,7 @@ Text tag shows an Text markup that can be labeled
### Example
```html
-
+
+
+
```
diff --git a/docs/source/tutorials/dummy_model.md b/docs/source/tutorials/dummy_model.md
index 361dcd92f1c8..5d90a8df596d 100644
--- a/docs/source/tutorials/dummy_model.md
+++ b/docs/source/tutorials/dummy_model.md
@@ -4,6 +4,17 @@
It explains the basics of Machine Learning (ML) backend usage within Label Studio. For the sake of simplicity, a _dummy model_ is served and actually does nothing but produces the random predictions.
It is compatible with any classication task, i.e. where `` tag is used.
+For example, let's consider this labeling config:
+```
+
+
+
+
+
+
+
+```
+
### Create dummy model script
If you create ML backend by using Label Studio's ML SDK, you have to follow the rules:
@@ -66,9 +77,9 @@ Let's call ML backend `my_backend` and initialize ML backend directory `./my_bac
label-studio-ml init my_backend
```
-The later command takes your script `./model.py` then creates `./my_backend` directory at the same level and copies configs and scripts needed for launching ML backend either in development or production modes.
+The last command takes your script `./model.py` then creates `./my_backend` directory at the same level and copies configs and scripts needed for launching ML backend either in development or production modes.
-> Note: You can specify different location for your model script, e.g. `label-studio init my_backend --script /path/to/my/script.py`
+> Note: You can specify different location for your model script, e.g. `label-studio-ml init my_backend --script /path/to/my/script.py`
### Launch ML backend server
@@ -103,7 +114,7 @@ Now you can explore runtime logs in `my_backend/logs/uwsgi.log` and RQ training
Initialize and start new Label Studio project connecting to the running ML backend:
```bash
-label-studio start --init --ml-backend-url http://localhost:9090
+label-studio start --init --ml-backends http://localhost:9090
```
#### Getting predictions
diff --git a/docs/source/tutorials/pytorch-image-transfer-learning.md b/docs/source/tutorials/pytorch-image-transfer-learning.md
index 2ee6981e5504..42b8bba0bd96 100644
--- a/docs/source/tutorials/pytorch-image-transfer-learning.md
+++ b/docs/source/tutorials/pytorch-image-transfer-learning.md
@@ -171,7 +171,7 @@ Let's call ML backend `my_backend` and initialize ML backend directory `./my_bac
label-studio-ml init my_backend
```
-The later command takes your script `./model.py` then creates `./my_backend` directory at the same level and copies configs and scripts needed for launching ML backend either in development or production modes.
+The last command takes your script `./model.py` then creates `./my_backend` directory at the same level and copies configs and scripts needed for launching ML backend either in development or production modes.
> Note: You can specify different location for your model script, e.g. `label-studio init my_backend --script /path/to/my/script.py`
@@ -208,7 +208,7 @@ Now you can explore runtime logs in `my_backend/logs/uwsgi.log` and RQ training
Initialize and start new Label Studio project connecting to the running ML backend:
```bash
-label-studio start --init --ml-backend-url http://localhost:9090
+label-studio start --init --ml-backends http://localhost:9090
```
#### Getting predictions
diff --git a/docs/source/tutorials/sklearn-text-classifier.md b/docs/source/tutorials/sklearn-text-classifier.md
index 1aeeac0d86d6..8164e141249f 100644
--- a/docs/source/tutorials/sklearn-text-classifier.md
+++ b/docs/source/tutorials/sklearn-text-classifier.md
@@ -146,7 +146,7 @@ Let's call ML backend `my_backend` and initialize ML backend directory `./my_bac
label-studio-ml init my_backend
```
-The later command takes your script `./model.py` then creates `./my_backend` directory at the same level and copies configs and scripts needed for launching ML backend either in development or production modes.
+The last command takes your script `./model.py` then creates `./my_backend` directory at the same level and copies configs and scripts needed for launching ML backend either in development or production modes.
> Note: You can specify different location for your model script, e.g. `label-studio init my_backend --script /path/to/my/script.py`
@@ -183,7 +183,7 @@ Now you can explore runtime logs in `my_backend/logs/uwsgi.log` and RQ training
Initialize and start new Label Studio project connecting to the running ML backend:
```bash
-label-studio start --init --ml-backend-url http://localhost:9090
+label-studio start --init --ml-backends http://localhost:9090
```
#### Getting predictions
diff --git a/docs/themes/htx/_config.yml b/docs/themes/htx/_config.yml
index 5a4eed2ff2ba..d78c07ac25a9 100644
--- a/docs/themes/htx/_config.yml
+++ b/docs/themes/htx/_config.yml
@@ -1,3 +1,5 @@
site_description: Label Studio - Data labeling, annotation and exploration tool
google_analytics: UA-129877673-4
root_domain: labelstud.io
+
+copy_button: true
\ No newline at end of file
diff --git a/docs/themes/htx/layout/layout.ejs b/docs/themes/htx/layout/layout.ejs
index f3b0bac3e2a1..74d9b06c14c6 100644
--- a/docs/themes/htx/layout/layout.ejs
+++ b/docs/themes/htx/layout/layout.ejs
@@ -24,7 +24,6 @@
-
diff --git a/docs/themes/htx/layout/partials/index.ejs b/docs/themes/htx/layout/partials/index.ejs
index dec5221a6dc0..8c0de1c352e8 100644
--- a/docs/themes/htx/layout/partials/index.ejs
+++ b/docs/themes/htx/layout/partials/index.ejs
@@ -477,7 +477,7 @@
Load assets from AWS S3 or GCP.
Read more in our blog.