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 · ![GitHub](https://img.shields.io/github/license/heartexlabs/label-studio?logo=heartex) ![label-studio:build](https://github.com/heartexlabs/label-studio/workflows/label-studio:build/badge.svg) ![code-coverage](https://github.com/heartexlabs/label-studio/blob/master/.github/test-coverage.svg) ![GitHub release](https://img.shields.io/github/v/release/heartexlabs/label-studio?include_prereleases) · -[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: + + + +* 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 --- + + + +
+ + + ``` 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.

-
Last version is 0.7.4.post0
+
Last version is 0.7.4.post1
@@ -664,15 +664,6 @@ Templates - -
-

Solutions

- -
-

Help

diff --git a/docs/themes/htx/layout/partials/sidebar.ejs b/docs/themes/htx/layout/partials/sidebar.ejs index dc8b8b5e0c6c..de70157ca888 100644 --- a/docs/themes/htx/layout/partials/sidebar.ejs +++ b/docs/themes/htx/layout/partials/sidebar.ejs @@ -8,3 +8,7 @@ " alt="label studio logo" height="120" />
<% } %> + +<% if (page.type === "playground") { %> +<%- partial('partials/sidebar_main_page', {type: page.type === 'menu' ? 'guide' : page.type, index: page.index}) %> +<% } %> \ No newline at end of file diff --git a/docs/themes/htx/layout/partials/sidebar_main_page.ejs b/docs/themes/htx/layout/partials/sidebar_main_page.ejs index f755cbe5bac1..5d91bd58e5ec 100644 --- a/docs/themes/htx/layout/partials/sidebar_main_page.ejs +++ b/docs/themes/htx/layout/partials/sidebar_main_page.ejs @@ -1,4 +1,4 @@ -<% if (page.type !== "playground" && page.type !== "blog") { %> +<% if (page.type !== "blog") { %>