Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add info icon and simplified descriptions for terms in Layers Inventory #852

Merged
merged 5 commits into from
Jul 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
14 changes: 7 additions & 7 deletions frontend/src/Home.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const Home = () => {

// input responses
const [customModelName, setCustomModelName] = useState(
`Model ${new Date().toLocaleString()}`
`Model ${new Date().toLocaleString()}`,
);
const [fileURL, setFileURL] = useState("");
const [notificationPhoneNumber, setNotificationPhoneNumber] = useState();
Expand All @@ -55,11 +55,11 @@ const Home = () => {
const [features, setFeatures] = useState([]);
const [problemType, setProblemType] = useState(PROBLEM_TYPES[0]);
const [criterion, setCriterion] = useState(
problemType === PROBLEM_TYPES[0] ? CRITERIONS[3] : CRITERIONS[0]
problemType === PROBLEM_TYPES[0] ? CRITERIONS[3] : CRITERIONS[0],
);
const [optimizerName, setOptimizerName] = useState(OPTIMIZER_NAMES[0]);
const [usingDefaultDataset, setUsingDefaultDataset] = useState(
DEFAULT_DATASETS[0]
DEFAULT_DATASETS[0],
);
const [shuffle, setShuffle] = useState(BOOL_OPTIONS[1]);
const [epochs, setEpochs] = useState(5);
Expand All @@ -69,7 +69,7 @@ const Home = () => {
uploadedColumns.map((e, i) => ({
label: e.name,
value: i,
}))
})),
);
const [activeColumns, setActiveColumns] = useState([]);
const [beginnerMode, setBeginnerMode] = useState(true);
Expand Down Expand Up @@ -151,7 +151,7 @@ const Home = () => {
{
queryText: "Criterion",
options: CRITERIONS.filter((crit) =>
crit.problem_type.includes(problemType.value)
crit.problem_type.includes(problemType.value),
),
onChange: setCriterion,
defaultValue: criterion,
Expand Down Expand Up @@ -193,7 +193,7 @@ const Home = () => {

useEffect(() => {
setCriterion(
problemType === PROBLEM_TYPES[0] ? CRITERIONS[3] : CRITERIONS[0]
problemType === PROBLEM_TYPES[0] ? CRITERIONS[3] : CRITERIONS[0],
);
setInputKey((e) => e + 1);
}, [problemType]);
Expand Down Expand Up @@ -356,7 +356,7 @@ const Home = () => {
problemType={problemType}
/>
),
[dlpBackendResponse, problemType]
[dlpBackendResponse, problemType],
);

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ import DataTable from "react-data-table-component";

const ClassicalMLModel = () => {
const [customModelName, setCustomModelName] = useState(
`Model ${new Date().toLocaleString()}`
`Model ${new Date().toLocaleString()}`,
);
const [addedLayers, setAddedLayers] = useState([]);
const [usingDefaultDataset, setUsingDefaultDataset] = useState(
DEFAULT_DATASETS[0]
DEFAULT_DATASETS[0],
);
const [shuffle, setShuffle] = useState(BOOL_OPTIONS[1]);
const [email, setEmail] = useState("");
Expand All @@ -56,7 +56,7 @@ const ClassicalMLModel = () => {
uploadedColumns.map((e, i) => ({
label: e.name,
value: i,
}))
})),
);
const input_responses = {
shuffle: shuffle?.value,
Expand Down Expand Up @@ -138,7 +138,7 @@ const ClassicalMLModel = () => {
choice="classicalml"
/>
),
[dlpBackendResponse, PROBLEM_TYPES[0]]
[dlpBackendResponse, PROBLEM_TYPES[0]],
);

const onClick = () => {
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components_old/ImageModels/ImageModels.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import {

const ImageModels = () => {
const [customModelName, setCustomModelName] = useState(
`Model ${new Date().toLocaleString()}`
`Model ${new Date().toLocaleString()}`,
);
const [addedLayers, setAddedLayers] = useState(DEFAULT_IMG_LAYERS);
const [trainTransforms, setTrainTransforms] = useState(DEFAULT_TRANSFORMS);
Expand Down Expand Up @@ -121,7 +121,7 @@ const ImageModels = () => {
problemType={PROBLEM_TYPES[0]}
/>
),
[dlpBackendResponse, PROBLEM_TYPES[0]]
[dlpBackendResponse, PROBLEM_TYPES[0]],
);

const onClick = () => {
Expand Down
14 changes: 7 additions & 7 deletions frontend/src/components_old/LearnMod/Exercise.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ const Exercise = (props) => {
const [features, setFeatures] = useState([]);
const [problemType, setProblemType] = useState(PROBLEM_TYPES[0]);
const [criterion, setCriterion] = useState(
problemType === PROBLEM_TYPES[0] ? CRITERIONS[3] : CRITERIONS[0]
problemType === PROBLEM_TYPES[0] ? CRITERIONS[3] : CRITERIONS[0],
);
const [optimizerName, setOptimizerName] = useState(OPTIMIZER_NAMES[0]);
const [usingDefaultDataset, setUsingDefaultDataset] = useState(
DEFAULT_DATASETS[0]
DEFAULT_DATASETS[0],
);
const [shuffle, setShuffle] = useState(BOOL_OPTIONS[1]);
const [epochs, setEpochs] = useState(5);
Expand All @@ -54,7 +54,7 @@ const Exercise = (props) => {
uploadedColumns.map((e, i) => ({
label: e.name,
value: i,
}))
})),
);
const [activeColumns, setActiveColumns] = useState([]);
const [finalAccuracy, setFinalAccuracy] = useState("");
Expand Down Expand Up @@ -128,7 +128,7 @@ const Exercise = (props) => {
{
queryText: "Criterion",
options: CRITERIONS.filter((crit) =>
crit.problem_type.includes(problemType.value)
crit.problem_type.includes(problemType.value),
),
onChange: setCriterion,
defaultValue: criterion,
Expand Down Expand Up @@ -182,7 +182,7 @@ const Exercise = (props) => {

useEffect(() => {
setCriterion(
problemType === PROBLEM_TYPES[0] ? CRITERIONS[3] : CRITERIONS[0]
problemType === PROBLEM_TYPES[0] ? CRITERIONS[3] : CRITERIONS[0],
);
setInputKey((e) => e + 1);
}, [problemType]);
Expand Down Expand Up @@ -220,7 +220,7 @@ const Exercise = (props) => {
useEffect(() => {
if (dlpBackendResponse != null) {
setFinalAccuracy(
dlpBackendResponse["dl_results"][epochs - 1]["train_acc"]
dlpBackendResponse["dl_results"][epochs - 1]["train_acc"],
);
}

Expand Down Expand Up @@ -303,7 +303,7 @@ const Exercise = (props) => {
/>
</div>
),
[dlpBackendResponse, problemType]
[dlpBackendResponse, problemType],
);

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import FilerobotImageEditor, {

const ObjectDetection = () => {
const [customModelName, setCustomModelName] = useState(
`Model ${new Date().toLocaleString()}`
`Model ${new Date().toLocaleString()}`,
);
const [problemType, setProblemType] = useState("");
const [detectionType, setDetectionType] = useState("");
Expand All @@ -37,7 +37,7 @@ const ObjectDetection = () => {
const [inputKey, setInputKey] = useState(0);
const [uploadFile, setUploadFile] = useState(null);
const [imageTransforms, setImageTransforms] = useState(
DEFAULT_DETECTION_TRANSFORMS
DEFAULT_DETECTION_TRANSFORMS,
);

const input_responses = {
Expand Down Expand Up @@ -71,7 +71,7 @@ const ObjectDetection = () => {
choice="objectdetection"
/>
),
[dlpBackendResponse, OBJECT_DETECTION_PROBLEM_TYPES[0]]
[dlpBackendResponse, OBJECT_DETECTION_PROBLEM_TYPES[0]],
);

const onClick = () => {
Expand Down Expand Up @@ -126,7 +126,7 @@ const ObjectDetection = () => {
onSave={(editedImageObject) => {
const file = dataURLtoFile(
editedImageObject.imageBase64,
editedImageObject.fullName
editedImageObject.fullName,
);
setUploadFile(file);
}}
Expand Down
Loading