Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
5ff9c51
feat: DEV-1646: Move model_version to ML backend and add get versions…
KonstantinKorotaev Feb 14, 2022
0ab92a3
Fix models extraction for data manager
KonstantinKorotaev Feb 16, 2022
440896e
Fix tests
KonstantinKorotaev Feb 16, 2022
571eb35
Add model version to setup
KonstantinKorotaev Feb 17, 2022
994d187
Merge branch 'develop' into DEV-1646
KonstantinKorotaev Jun 7, 2022
ca468fe
Add feature flag
KonstantinKorotaev Jun 8, 2022
e7ec4e5
Merge branch 'develop' into DEV-1646
KonstantinKorotaev Jun 24, 2022
da55f4c
Merge branch 'develop' into DEV-1646
KonstantinKorotaev Jul 14, 2022
5892fad
Add test and old ML backend version support
KonstantinKorotaev Jul 18, 2022
e664e5e
Fix test
KonstantinKorotaev Jul 19, 2022
04465f1
fix: DEV-2905: Change the model version selector api response handlin…
bmartel Jul 19, 2022
cd3e7a0
Build frontend
robot-ci-heartex Jul 19, 2022
bdadb50
Update ModelVersionSelector.js
bmartel Jul 19, 2022
72f310e
Build frontend
robot-ci-heartex Jul 19, 2022
dc1f927
Merge branch 'DEV-1646', remote-tracking branch 'origin' into fb-dev-…
bmartel Jul 20, 2022
84eeb97
Merge remote-tracking branch 'origin' into fb-dev-2905
bmartel Jul 21, 2022
713540d
Build frontend
robot-ci-heartex Jul 21, 2022
7ab8d74
fix: DEV-2905: Allow both error and versions to be set in model versi…
bmartel Jul 21, 2022
0688133
Build frontend
robot-ci-heartex Jul 21, 2022
c81cd93
fix: DEV-2905: ml backend model version key was incorrect
bmartel Jul 21, 2022
73f7634
Merge branch 'fb-dev-2905' of github.com:heartexlabs/label-studio int…
bmartel Jul 21, 2022
eac4d3a
Build frontend
robot-ci-heartex Jul 21, 2022
86a7dc7
fix: DEV-2905: ml backend model version requires further date handling
bmartel Jul 21, 2022
8abea67
Merge branch 'fb-dev-2905' of github.com:heartexlabs/label-studio int…
bmartel Jul 21, 2022
d61a7fe
Build frontend
robot-ci-heartex Jul 21, 2022
67f6d1c
fix: DEV-2905: ml backend model version date handling should allow st…
bmartel Jul 21, 2022
ab0044e
Merge branch 'fb-dev-2905' of github.com:heartexlabs/label-studio int…
bmartel Jul 21, 2022
438705e
Build frontend
robot-ci-heartex Jul 21, 2022
0fc2e93
fix: DEV-2905: ml backend model version date handling should convert …
bmartel Jul 21, 2022
a5b422b
Merge branch 'fb-dev-2905' of github.com:heartexlabs/label-studio int…
bmartel Jul 21, 2022
649d2a1
Build frontend
robot-ci-heartex Jul 21, 2022
eed39a7
fix: DEV-2905: model version selector should be enabled even if error…
bmartel Jul 21, 2022
3cfcdb4
Build frontend
robot-ci-heartex Jul 21, 2022
628b385
fix: DEV-2905: model version selector value should reflect current se…
bmartel Jul 22, 2022
6c9f792
Merge branch 'fb-dev-2905' of github.com:heartexlabs/label-studio int…
bmartel Jul 22, 2022
70a13b8
Build frontend
robot-ci-heartex Jul 22, 2022
e970feb
fix: DEV-2905: model version selector value should reflect current se…
bmartel Jul 22, 2022
2deed6b
Merge branch 'fb-dev-2905' of github.com:heartexlabs/label-studio int…
bmartel Jul 22, 2022
fc8f8be
Build frontend
robot-ci-heartex Jul 22, 2022
3f17c21
fix: DEV-2905: model version selector options loading state to ensure…
bmartel Jul 22, 2022
ecc4b9f
Build frontend
robot-ci-heartex Jul 22, 2022
4900702
Add auto model update to setup
KonstantinKorotaev Aug 2, 2022
6a26fda
Merge branch 'develop' into DEV-1646
KonstantinKorotaev Aug 5, 2022
9a2bb55
Merge branch 'DEV-1646' into fb-dev-2905
KonstantinKorotaev Aug 8, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion label_studio/frontend/dist/react-app/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion label_studio/frontend/dist/react-app/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion label_studio/frontend/dist/react-app/main.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion label_studio/frontend/dist/react-app/main.css.map

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { useCallback, useEffect, useState } from 'react';
import { useAPI } from '../../../providers/ApiProvider';
import { Select } from '../../../components/Form';
import { Block, Elem } from '../../../utils/bem';

import './ModelVersionSelector.styl';

export const ModelVersionSelector = ({
name = "model_version",
Expand All @@ -11,6 +14,7 @@ export const ModelVersionSelector = ({
...props
}) => {
const api = useAPI();
const [error, setError] = useState(null);
const [versions, setVersions] = useState([]);

const fetchMLVersions = useCallback(async () => {
Expand All @@ -24,24 +28,37 @@ export const ModelVersionSelector = ({
},
});

if (!modelVersions) return;
if (modelVersions?.message) {
setError(modelVersions.message);
return;
}


if (!modelVersions?.versions?.length) return;

setVersions(Object.entries(modelVersions).reduce((v, [key, value]) => [...v, {
value: key,
label: key + " (" + value + " predictions)",
}], []));
setVersions(modelVersions.versions.map(version => ({
value: version,
label: `${version} (${version} predictions)`,
})));
}, [api, object?.id, apiName]);

useEffect(fetchMLVersions, []);

return (
<Select
name={name}
disabled={!versions.length}
defaultValue={object?.[valueName] || null}
options={versions}
placeholder={placeholder}
{...props}
/>
<Block name="modelVersionSelector">
<Select
name={name}
disabled={!versions.length || error}
defaultValue={object?.[valueName] || null}
options={versions}
placeholder={placeholder}
{...props}
/>
{error && (
<Elem name="message">
{error}
</Elem>
)}
</Block>
);
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.modelVersionSelector
width 100%
display flex
flex-direction column
gap 12px

&__message
font-size 16px
color #DD0000
margin-bottom 12px