Skip to content

Commit 8f5d09f

Browse files
committed
*: remove v-html tags
1 parent 7d7e20a commit 8f5d09f

File tree

8 files changed

+18
-23
lines changed

8 files changed

+18
-23
lines changed

cli/src/hellaswag_gpt.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ async function main(): Promise<void> {
4949
const args = parse<HellaSwagArgs>({
5050
model: {
5151
type: (raw: string) => raw as ModelType,
52-
description: `Model type, one of ${ModelTypes}`,
52+
description: `Model type, one of ${ModelTypes.toString()}`,
5353
defaultValue: 'onnx'
5454
},
5555
numDataPoints: {
@@ -77,7 +77,7 @@ async function main(): Promise<void> {
7777
const logFile = path.join(__dirname, args.logFile);
7878
fs.writeFileSync(logFile, '', 'utf-8'); // Clear the log file
7979

80-
let model: | models.GPT | models.ONNXModel | undefined;
80+
let model: models.GPT | models.ONNXModel | undefined;
8181
switch (args.model) {
8282
case 'onnx':
8383
log("Using ONNX pretrained model Xenova/gpt2")
@@ -95,8 +95,6 @@ async function main(): Promise<void> {
9595
const encodedModel = await fsPromise.readFile(args.pretrainedModelPath);
9696
model = await serialization.model.decode(encodedModel) as models.GPT;
9797
break;
98-
default:
99-
throw new Error(`Unrecognized model type: ${model}`);
10098
}
10199
await evaluateModel(model, args.numDataPoints);
102100

discojs/src/default_tasks/cifar10.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ export const cifar10: TaskProvider<"image", "decentralized"> = {
1414
title: 'CIFAR10',
1515
summary: {
1616
preview: 'CIFAR-10 is a classic image classification task, and one of the most widely used datasets for machine learning research.',
17-
overview: "The dataset contains 60,000 32x32 color images in 10 different classes: airplanes, cars, birds, cats, deer, dogs, frogs, horses, ships, and trucks. The official CIFAR-10 website can be found <a class='underline text-blue-400' href='https://www.cs.toronto.edu/~kriz/cifar.html' target='_blank'>here</a>. You can find a link to a sample dataset at the next step (Connect Your Data)."
17+
overview: "The dataset contains 60,000 32x32 color images in 10 different classes: airplanes, cars, birds, cats, deer, dogs, frogs, horses, ships, and trucks. The official CIFAR-10 website can be found at https://www.cs.toronto.edu/~kriz/cifar.html . You can find a link to a sample dataset at the next step."
1818
},
19-
model: 'The model is a pretrained <a class="underline text-blue-400" target="_blank" href="https://github.com/tensorflow/tfjs-models/tree/master/mobilenet">MobileNetV1 model</a> trained in Tensorflow.js. The last output layer is replaced with a fully connected layer with softmax activation and one output neuron per CIFAR10 category. The data preprocessing reshapes images into 224x224 pixels and normalizes values between 0 and 1. The neural network is optimized via Stochastic Gradient Descent and a categorical Cross Entropy loss.',
19+
model: 'The model is a pretrained MobileNetV1 model trained in Tensorflow.js. The last output layer is replaced with a fully connected layer with softmax activation and one output neuron per CIFAR10 category. The data preprocessing reshapes images into 224x224 pixels and normalizes values between 0 and 1. The neural network is optimized via Stochastic Gradient Descent and a categorical Cross Entropy loss.',
2020
dataFormatInformation: 'Images should be of .png format and of size 32x32. <br> The CSV file should start with the exact header "filename,label", and each row should contain an image filename (without extension) and its label.<br><br> For example if you have images: 0.png (of a frog) and 1.png (of a car) <br> The CSV file should be: <br>filename, label <br><br> 0, frog <br> 1, car',
2121
dataExample:
2222
"https://storage.googleapis.com/deai-313515.appspot.com/example_training_data/cifar10-example.png",

discojs/src/default_tasks/lus_covid.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export const lusCovid: TaskProvider<"image", "federated"> = {
1212
title: 'Lung Ultrasound Image Classification',
1313
summary: {
1414
preview: "Medical images are a typical example of data that exists in huge quantity yet that can't be shared due to confidentiality reasons. Medical applications would immensely benefit from training on data currently locked. More data diversity leads to better generalization and bias mitigation.",
15-
overview: "Disco allows data owners to collaboratively train machine learning models using their respective data without any privacy breach. This example problem is about diagnosing whether patients are positive or negative to COVID-19 from lung ultrasounds images. <br>Don't have a dataset of your own? You can find a link to a sample dataset at the next step."
15+
overview: "Disco allows data owners to collaboratively train machine learning models using their respective data without any privacy breach. This example problem is about diagnosing whether patients are positive or negative to COVID-19 from lung ultrasounds images. You can find a link to a sample dataset at the next step."
1616
},
1717
model: "The model is a simple Convolutional Neural Network composed of two convolutional layers with ReLU activations and max pooling layers, followed by a fully connected output layer. The data preprocessing reshapes images into 100x100 pixels and normalizes values between 0 and 1",
1818
dataFormatInformation: 'This model takes as input an image dataset of lung ultrasounds. The images are resized automatically.',

discojs/src/default_tasks/mnist.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export const mnist: TaskProvider<"image", "decentralized"> = {
1212
title: 'Handwritten Digit Recognition',
1313
summary: {
1414
preview: "The MNIST handwritten digit classification problem is a classic dataset used in computer vision and deep learning. The objective is to classify handwritten digits from 28x28 pixel images.",
15-
overview: "Download the classic MNIST dataset of hand-written numbers <a class='underline text-blue-400' target='_blank' href='https://www.kaggle.com/scolianni/mnistasjpg'>here</a>. You can also find a sample dataset at the next step."
15+
overview: "Download the classic MNIST dataset of hand-written numbers at https://www.kaggle.com/scolianni/mnistasjpg . You can also find a sample dataset at the next step."
1616
},
1717
model: "The model is a simple Convolutional Neural Network composed of three convolutional layers with ReLU activations and max pooling layers, followed by two fully connected layers. The data preprocessing simply normalizes values between 0 and 1. The neural network is optimized via RMSProp and a categorical cross-entropy loss.",
1818
dataFormatInformation: 'This model is trained on images corresponding to digits 0 to 9. You can connect your own images of each digit in the box corresponding to its label. The model takes images of size 28x28 as input.',

discojs/src/default_tasks/titanic.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ export const titanic: TaskProvider<"tabular", "federated"> = {
1212
title: 'Titanic Prediction',
1313
summary: {
1414
preview: "The Titanic classification task is one of the main entrypoints into machine learning. Using passenger data (name, age, gender, socio-economic class, etc), the goal is to identify who was more likely to survive the infamous shipwreck.",
15-
overview: "The original competition can be found on <a target='_blank' class='underline text-blue-400' href='https://www.kaggle.com/c/titanic'>Kaggle</a> and a link to the training set can be found here <a target='_blank' class='underline text-blue-400' href='https://storage.googleapis.com/deai-313515.appspot.com/example_training_data/titanic_train.csv'>here</a>."
15+
overview: ""
1616
},
1717
model: 'The model is a simple 5-layer feedforward network with ReLU activations. The model is optimized with Adam and binary cross-entropy loss. The preprocessing only fills missing value with a placeholder value (0).',
18-
dataFormatInformation: 'The expected format for the tabular dataset is exactly the same as the sample data provided above or in the Kaggle competition. It is a CSV file with 12 columns. The features are general information about the passenger (sex, age, name, etc.) and specific related Titanic data such as the ticket class bought by the passenger, its cabin number, etc.<br>The first line of the CSV contains the header: "PassengerId, Survived, Pclass, Name, Sex, Age, SibSp, Parch, Ticket, Fare, Cabin, Embarked"<br>Each subsequent row contains passenger data.',
18+
dataFormatInformation: 'The expected format for the tabular dataset is exactly the same as the sample data provided above or in the Kaggle competition. It is a CSV file with 12 columns. The features are general information about the passenger (sex, age, name, etc.) and specific related Titanic data such as the ticket class bought by the passenger, its cabin number, etc. The first line of the CSV contains the header: "PassengerId, Survived, Pclass, Name, Sex, Age, SibSp, Parch, Ticket, Fare, Cabin, Embarked". Each subsequent row contains passenger data.',
1919
dataExample: [
2020
{ name: "PassengerId", data: "1" },
2121
{ name: "Survived", data: "0" },

discojs/src/default_tasks/wikitext.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export const wikitext: TaskProvider<"text", "federated"> = {
1010
title: "GPT Language Modeling",
1111
summary: {
1212
preview: 'Train a language model (L)LM in your browser, collaboratively and from scratch.',
13-
overview: "You can train a GPT-2 model in your browser and in a collaborative manner on any textual dataset. As an example, you can try the Wikitext-103 dataset, composed of Wikipedia articles, widely used in natural language modeling, which you can download <a class='underline text-blue-400' target='_blank' href='https://dax-cdn.cdn.appdomain.cloud/dax-wikitext-103/1.0.1/wikitext-103.tar.gz'>here</a>. More information on how to connect the dataset at the next step."
13+
overview: "You can train a GPT-2 model in your browser and in a collaborative manner on any textual dataset. As an example, you can try the Wikitext-103 dataset, composed of Wikipedia articles, widely used in natural language modeling. More information on how to connect the dataset at the next step."
1414
},
1515
model: [
1616
"The model follows the exact GPT-2 architecture and is implemented in TensorFlow.js.",

webapp/src/components/dataset_input/DataDescription.vue

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,14 @@
1616
class="underline text-blue-400"
1717
:href="task.displayInformation.sampleDataset.link"
1818
>here</a
19-
>. <br /><span
20-
v-html="task.displayInformation.sampleDataset.instructions"
21-
/><br />
19+
>. <br />
20+
<span>
21+
{{task.displayInformation.sampleDataset.instructions}}
22+
</span>
2223
</div>
23-
2424
<!-- Sample dataset link and instructions -->
25-
<div
26-
v-if="task.displayInformation.dataFormatInformation !== undefined"
27-
>
28-
<div v-html="task.displayInformation.dataFormatInformation" />
29-
<br />
25+
<div>
26+
{{ task.displayInformation.dataFormatInformation }}
3027
</div>
3128
</div>
3229

webapp/src/components/training/TrainingDescription.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
{{ props.task.displayInformation.title }}
66
</template>
77

8-
<div v-html="props.task.displayInformation.summary.preview" />
9-
<div v-html="props.task.displayInformation.summary.overview" />
8+
<div>{{ props.task.displayInformation.summary.preview }}</div>
9+
<div>{{ props.task.displayInformation.summary.overview }}</div>
1010
</IconCard>
1111

1212
<IconCard v-if="task.displayInformation.model !== undefined">
1313
<template #title> The Model </template>
1414
<template #icon> <ModelIcon /> </template>
1515

16-
<div v-html="task.displayInformation.model" />
16+
<div>{{ task.displayInformation.model }}</div>
1717
</IconCard>
1818

1919
<DropdownCard>

0 commit comments

Comments
 (0)