Skip to content

Commit

Permalink
Release 0.2.2 (#132)
Browse files Browse the repository at this point in the history
* Pre-release 0.2.2

* build bundle

* hide predictions:menu

* show predictions in explore mode

* removing commented code
  • Loading branch information
Michael Malyuk authored and niklub committed Nov 28, 2019
1 parent 7d26e77 commit 25fb456
Show file tree
Hide file tree
Showing 18 changed files with 59 additions and 68 deletions.
8 changes: 5 additions & 3 deletions backend/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def reload_config():
global ml_backend
global project
c = load_config()

label_config_line = config_line_stripped(open(c['label_config']).read())
if analytics is None:
analytics = Analytics(label_config_line, c.get('collect_analytics', True))
Expand Down Expand Up @@ -118,9 +119,10 @@ def index():
task_id = request.args.get('task_id', None)

if task_id is not None:
task_data = db.get_task_with_completions(task_id)
if task_data is None:
task_data = db.get_task(task_id)
task_data = db.get_task_with_completions(task_id) or db.get_task(task_id)
if ml_backend:
task_data = deepcopy(task_data)
task_data['predictions'] = ml_backend.make_predictions(task_data, project)

analytics.send(getframeinfo(currentframe()).function)
return flask.render_template('index.html', config=c, label_config_line=label_config_line,
Expand Down
3 changes: 1 addition & 2 deletions backend/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"submit", // submit button on controls
"update", // update button on controls
"predictions", // show predictions from task.predictions = [{...}, {...}]
"predictions:menu", // right menu with prediction items
"predictions:menu",
"completions", // show completions
"completions:menu", // right menu with completion items
"side-column" // entity
Expand All @@ -71,7 +71,6 @@
"controls", // all control buttons: skip, submit, update
"submit", // submit button on controls
"predictions", // show predictions from task.predictions = [{...}, {...}]
"predictions:menu", // right menu with prediction items
"completions", // show completions
"side-column" // entity
]
Expand Down
1 change: 1 addition & 0 deletions backend/utils/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ def init(config):
"""
global c, tasks
c = config

label_config = LabelConfigParser(c['label_config'])

if not os.path.exists(c['output_dir']):
Expand Down
4 changes: 0 additions & 4 deletions backend/utils/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,6 @@ def generator():
c['input_path'] = args.input_path if args.input_path else c['input_path']
c['output_dir'] = args.output_dir if args.output_dir else c['output_dir']

c['label_config'] = os.path.join(os.path.dirname(config_path), c['label_config'])
c['input_path'] = os.path.join(os.path.dirname(config_path), c['input_path'])
c['output_dir'] = os.path.join(os.path.dirname(config_path), c['output_dir'])

# re-init db
if prev_config != c:
print('Config changes detected, reloading DB')
Expand Down
18 changes: 6 additions & 12 deletions build/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
{
"main.css": "/static/css/main.eedf9445.chunk.css",
"main.js": "/static/js/main.457661e8.chunk.js",
"main.js.map": "/static/js/main.457661e8.chunk.js.map",
"static/css/1.a1dad4f7.chunk.css": "/static/css/1.a1dad4f7.chunk.css",
"static/js/1.ac0f96d4.chunk.js": "/static/js/1.ac0f96d4.chunk.js",
"static/js/1.ac0f96d4.chunk.js.map": "/static/js/1.ac0f96d4.chunk.js.map",
"runtime~main.js": "/static/js/runtime~main.229c360f.js",
"runtime~main.js.map": "/static/js/runtime~main.229c360f.js.map",
"static/media/config.xml": "/static/media/config.c5233796.xml",
"static/css/main.eedf9445.chunk.css.map": "/static/css/main.eedf9445.chunk.css.map",
"static/css/1.a1dad4f7.chunk.css.map": "/static/css/1.a1dad4f7.chunk.css.map",
"main.css": "/static/css/main.6284dcdb.css",
"main.js": "/static/js/main.291897a4.js",
"main.js.map": "/static/js/main.291897a4.js.map",
"static/media/config.xml": "/static/media/config.1890026d.xml",
"static/css/main.6284dcdb.css.map": "/static/css/main.6284dcdb.css.map",
"index.html": "/index.html",
"precache-manifest.d8d2f6a15cfd91d5974eb245f18cfa89.js": "/precache-manifest.d8d2f6a15cfd91d5974eb245f18cfa89.js",
"precache-manifest.b7cf03775598129ac3f72933c4bb4133.js": "/precache-manifest.b7cf03775598129ac3f72933c4bb4133.js",
"service-worker.js": "/service-worker.js"
}
16 changes: 4 additions & 12 deletions build/index.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="shortcut icon" href="/favicon.ico"/><link href="//fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600|Roboto Mono" rel="stylesheet"/><link href="//fonts.googleapis.com/css?family=Dosis:500&text=LabelStudio" rel="stylesheet"/><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name="theme-color" content="#000000"><link rel="manifest" href="/manifest.json"><link rel="stylesheet" href="/styles/main.css"><title>Label Studio</title><link href="/static/css/1.a1dad4f7.chunk.css" rel="stylesheet"><link href="/static/css/main.eedf9445.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="header"><a id="logo" href="/"><img src="./images/ls_logo.png" alt="label studio logo"> <span style="font-size:1.2em">Label Studio</span></a><ul id="nav" style="display:flex;align-items:center"><a style="margin-right:1em;text-decoration:underline" href="https://labelstud.io/guide">Guide</a> <a class="github-button" href="https://github.com/heartexlabs/label-studio" data-icon="octicon-star" data-size="large" data-show-count="true" aria-label="Star heartexlabs/label-studio on GitHub"><img src="./images/GitHub-Mark-64px.png" height="25"/></a></ul></div><div id="label-studio"></div><footer class="footer">Made by <a target="_blank" href="https://heartex.net">Heartex</a> in San Francisco<br/><br/><img src="./images/3nowhite.svg" height="80"/></footer><script>setTimeout(() => {
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="shortcut icon" href="/favicon.ico"/><link href="//fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600|Roboto Mono" rel="stylesheet"/><link href="//fonts.googleapis.com/css?family=Dosis:500&text=LabelStudio" rel="stylesheet"/><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name="theme-color" content="#000000"><link rel="manifest" href="/manifest.json"><link rel="stylesheet" href="/styles/main.css"><title>Label Studio</title><link href="/static/css/main.6284dcdb.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="header"><a id="logo" href="/"><img src="./images/ls_logo.png" alt="label studio logo"> <span style="font-size:1.2em">Label Studio</span></a><ul id="nav" style="display:flex;align-items:center"><a style="margin-right:1em;text-decoration:underline" href="https://labelstud.io/guide">Guide</a> <a class="github-button" href="https://github.com/heartexlabs/label-studio" data-icon="octicon-star" data-size="large" data-show-count="true" aria-label="Star heartexlabs/label-studio on GitHub"><img src="./images/GitHub-Mark-64px.png" height="25"/></a></ul></div><div id="label-studio"></div><footer class="footer">Made by <a target="_blank" href="https://heartex.net">Heartex</a> in San Francisco<br/><br/><img src="./images/3nowhite.svg" height="80"/></footer><script>setTimeout(() => {
var ls = new LabelStudio("label-studio", {
config: `
<View>
<Image name="img" value="$image"></Image>
<RectangleLabels name="tag" toName="img">
<Label value="Hello"></Label>
<Label value="World"></Label>
</RectangleLabels>
</View>
`,

description: "Description",

interfaces: [
Expand All @@ -20,6 +10,8 @@
"side-column",
"update",
"check-empty",
"predictions",
"predictions:menu"
],

expert: {
Expand All @@ -37,4 +29,4 @@
}
}
});
}, 2000);</script><script>!function(l){function e(e){for(var r,t,n=e[0],o=e[1],u=e[2],f=0,i=[];f<n.length;f++)t=n[f],p[t]&&i.push(p[t][0]),p[t]=0;for(r in o)Object.prototype.hasOwnProperty.call(o,r)&&(l[r]=o[r]);for(s&&s(e);i.length;)i.shift()();return c.push.apply(c,u||[]),a()}function a(){for(var e,r=0;r<c.length;r++){for(var t=c[r],n=!0,o=1;o<t.length;o++){var u=t[o];0!==p[u]&&(n=!1)}n&&(c.splice(r--,1),e=f(f.s=t[0]))}return e}var t={},p={2:0},c=[];function f(e){if(t[e])return t[e].exports;var r=t[e]={i:e,l:!1,exports:{}};return l[e].call(r.exports,r,r.exports,f),r.l=!0,r.exports}f.m=l,f.c=t,f.d=function(e,r,t){f.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},f.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.t=function(r,e){if(1&e&&(r=f(r)),8&e)return r;if(4&e&&"object"==typeof r&&r&&r.__esModule)return r;var t=Object.create(null);if(f.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:r}),2&e&&"string"!=typeof r)for(var n in r)f.d(t,n,function(e){return r[e]}.bind(null,n));return t},f.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return f.d(r,"a",r),r},f.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},f.p="/";var r=window.webpackJsonp=window.webpackJsonp||[],n=r.push.bind(r);r.push=e,r=r.slice();for(var o=0;o<r.length;o++)e(r[o]);var s=n;a()}([])</script><script src="/static/js/1.ac0f96d4.chunk.js"></script><script src="/static/js/main.457661e8.chunk.js"></script></body></html>
}, 2000);</script><script src="/static/js/main.291897a4.js"></script></body></html>
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
self.__precacheManifest = [
{
"revision": "be40f1925770baa20dfce083b9bc907c",
"url": "/static/media/config.be40f192.xml"
"revision": "291897a411b866a8278a",
"url": "/static/css/main.6284dcdb.css"
},
{
"revision": "b41549b4aa244a0d0e50",
"url": "/static/css/main.c268c7ee.css"
"revision": "291897a411b866a8278a",
"url": "/static/js/main.291897a4.js"
},
{
"revision": "5bb63d8f59b769afa2951085535974c9",
"url": "/static/media/config.5bb63d8f.xml"
},
{
"revision": "c5233796cc8c88c6a29e9c9e774b75f3",
"url": "/static/media/config.c5233796.xml"
"revision": "0e105404c427362b08e886d17f78941d",
"url": "/static/media/config.0e105404.xml"
},
{
"revision": "3c2fe907a28d47b14bb2cd1ad2a28397",
Expand All @@ -28,8 +28,8 @@ self.__precacheManifest = [
"url": "/static/media/config.2a6054fe.xml"
},
{
"revision": "b41549b4aa244a0d0e50",
"url": "/static/js/main.b41549b4.js"
"revision": "be40f1925770baa20dfce083b9bc907c",
"url": "/static/media/config.be40f192.xml"
},
{
"revision": "f4626f44ab6f63bfc683408a117236b7",
Expand All @@ -52,7 +52,7 @@ self.__precacheManifest = [
"url": "/static/media/config.1890026d.xml"
},
{
"revision": "8df846b89fb442dcde5c0e460af7200d",
"revision": "afa19be1d4f0f5a8984c4874478e1adc",
"url": "/index.html"
}
];
4 changes: 2 additions & 2 deletions build/service-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
importScripts("https://storage.googleapis.com/workbox-cdn/releases/3.6.3/workbox-sw.js");

importScripts(
"/precache-manifest.d8d2f6a15cfd91d5974eb245f18cfa89.js"
"/precache-manifest.b7cf03775598129ac3f72933c4bb4133.js"
);

workbox.clientsClaim();
Expand All @@ -30,5 +30,5 @@ workbox.precaching.precacheAndRoute(self.__precacheManifest, {});

workbox.routing.registerNavigationRoute("/index.html", {

blacklist: [/^\/_/,/\/[^\/]+\.[^\/]+$/],
blacklist: [/^\/_/,/\/[^/]+\.[^/]+$/],
});
19 changes: 19 additions & 0 deletions build/static/css/main.6284dcdb.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions build/static/css/main.6284dcdb.css.map

Large diffs are not rendered by default.

19 changes: 0 additions & 19 deletions build/static/css/main.c268c7ee.css

This file was deleted.

1 change: 0 additions & 1 deletion build/static/css/main.c268c7ee.css.map

This file was deleted.

2 changes: 2 additions & 0 deletions build/static/js/main.291897a4.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions build/static/js/main.291897a4.js.map

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions build/static/js/main.b41549b4.js

This file was deleted.

1 change: 0 additions & 1 deletion build/static/js/main.b41549b4.js.map

This file was deleted.

7 changes: 7 additions & 0 deletions examples/image_classification/config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<View>
<Image name="img" value="$image_url"></Image>
<Choices name="choice" toName="img">
<Choice value="CAT" />
<Choice value="DOG" />
</Choices>
</View>
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "label-studio",
"version": "0.2.1-8",
"version": "0.2.2",
"description": "Label Studio is a multi-domain data labeling tool with standardized output format",
"homepage": "https://labelstud.io",
"author": {
Expand Down

0 comments on commit 25fb456

Please sign in to comment.