Skip to content

Commit

Permalink
finished about page, updated search
Browse files Browse the repository at this point in the history
  • Loading branch information
joaquinvanschoren committed Oct 21, 2023
1 parent ccf8061 commit 7b26266
Show file tree
Hide file tree
Showing 22 changed files with 346 additions and 222 deletions.
17 changes: 11 additions & 6 deletions app/public/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@
"helmet": "About",
"title": "About OpenML",
"core": "Authors",
"core_text": "The following people are currently core contributors to OpenML’s development and maintenance. They are elected by other core contributors based on merit and dedication.",
"core_text": "The following people are currently core contributors to OpenML’s development and maintenance. They are elected by other core contributors based on merit and dedication, and have write access to one or more OpenML repositories.",
"join_us": "Join us, get involved!",
"header": {
"team": "Meet the team",
Expand Down Expand Up @@ -251,11 +251,16 @@
]
},
"foundation": {
"description": "The Open Machine Learning Foundation is a not-for-profit organization supporting, but not controlling, the OpenML project. We are open to collaborate and engage with universities, companies, or anyone sharing the same goals and willing to support the project. This can involve sponsorship, the co-development of new features, or other forms of partnership, insofar they align with the Foundation's mission and do not affect the independence of the OpenML open source project itself.",
"mission": "Our mission is to make machine learning simple, accessible, collaborative and open",
"mission2": "to enhance and streamline machine learning research, education and skillful practice. The foundation aims to achieve this mission by, among others, supporting the OpenML.org platform to offer a worldwide community the means to openly share and build upon each other’s work, enhancing collaboration, education, scholarship, openness of data and code, automation of processes, and reproducibility of results. We do this in close collaboration with the OpenML community and in accordance with the guiding principles of the OpenML platform, such as the code of honor and the citation policy. More generally, we aim to provide the infrastructure, data, code, and scientific foundations necessary to accelerate research for the general benefit of society and to create positive outcomes for future generations.",
"board_title": "Foundation Board",
"board": "We want to make sure that the money that the foundation receives is invested for the interest of the community. For this purpose, we have a board that supervises the activity of the foundation. Core contributors to the OpenML project can serve on this board, to make decisions on behalf of the community. The current board members are Joaquin Vanschoren, Jan van Rijn, Matthias Feurer, Bernd Bischl, Heidi Seibold, and Giuseppe Casalicchio."
"title": "A not-for-profit foundation to support OpenML",
"text": "The Open Machine Learning Foundation supports the OpenML project. We are open to collaborate and engage with universities, companies, or anyone sharing the same goals and willing to support the project. This can involve sponsorship, the co-development of new features, or other forms of partnership, insofar they align with the Foundation's mission and do not affect the independence of the OpenML open source project itself."
},
"foundation_mission": {
"title": "Our mission is to make machine learning simple, accessible, collaborative and open",
"text": "... to enhance and streamline machine learning research, education and skillful practice. The foundation aims to achieve this mission by, among others, supporting the OpenML.org platform to offer a worldwide community the means to openly share and build upon each other’s work, enhancing collaboration, education, scholarship, openness of data and code, automation of processes, and reproducibility of results. We do this in close collaboration with the OpenML community and in accordance with the guiding principles of the OpenML platform, such as the code of honor and the citation policy. More generally, we aim to provide the infrastructure, data, code, and scientific foundations necessary to accelerate research for the general benefit of society and to create positive outcomes for future generations."
},
"foundation_board": {
"title": "Foundation Board",
"text": "We want to make sure that the money that the foundation receives is invested for the interest of the community. For this purpose, we have a board that supervises the activity of the foundation. Core contributors to the OpenML project can serve on this board, to make decisions on behalf of the community. The current board members are Joaquin Vanschoren, Jan van Rijn, Matthias Feurer, Bernd Bischl, Heidi Seibold, and Giuseppe Casalicchio."
}
},
"meetup": {
Expand Down
37 changes: 28 additions & 9 deletions app/src/components/search/ResultCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import { Card, Tooltip, CardHeader, Avatar } from "@mui/material";
import TimeAgo from "react-timeago";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { blue, orange, red, green, grey, purple } from "@mui/material/colors";
import * as colors from "@mui/material/colors";

import {
faCheck,
faCloudDownloadAlt,
Expand Down Expand Up @@ -172,6 +174,18 @@ const data_stats2 = [
{ param: "NumberOfMissingValues", unit: "missing" },
];

const colorNames = Object.keys(colors).filter(
(color) => typeof colors[color] === "object"
);
const shadeKeys = ["300", "500"];
function getRandomColor() {
const randomColorName =
colorNames[Math.floor(Math.random() * colorNames.length)];
const randomShade = shadeKeys[Math.floor(Math.random() * 2)];

return colors[randomColorName][randomShade];
}

const abbreviateNumber = (value) => {
let newValue = value;
if (value > 1000) {
Expand Down Expand Up @@ -202,6 +216,7 @@ const ResultCard = ({ result }) => {
const selected = false;
const fullwidth = undefined;

//console.log("result", result);
return (
<SearchResultCard
onClick={() => router.push(result.id.raw)}
Expand All @@ -213,17 +228,18 @@ const ResultCard = ({ result }) => {
<SlimCardHeader
avatar={
<Avatar
src={image}
src={result.image.raw}
style={{
height: 50,
width: 50,
backgroundColor: this.randomColor(),
backgroundColor: getRandomColor(),
}}
>
{initials}
{result.first_name.raw[0] + result.last_name.raw[0]}
</Avatar>
}
title={result.name}
title={result.first_name.raw + " " + result.last_name.raw}
subheader={result.bio.raw}
/>
)}
{type !== "user" && (
Expand All @@ -233,7 +249,7 @@ const ResultCard = ({ result }) => {
{result.name.raw}
</Title>
)}
{result.description.raw && (
{type !== "user" && result.description.raw && (
<SubTitle>{getTeaser(result.description.raw.toString())}</SubTitle>
)}
{stats !== undefined && (
Expand Down Expand Up @@ -270,10 +286,13 @@ const ResultCard = ({ result }) => {
</Stats>
</Tooltip>
{stats2 !== undefined && type === "run" && scores}
<ColorStats color={grey[400]}>
<ColoredIcon icon={faHistory} fixedWidth />
<TimeAgo date={new Date(result.date.raw)} minPeriod={60} />
</ColorStats>

{type !== "user" && (
<ColorStats color={grey[400]}>
<ColoredIcon icon={faHistory} fixedWidth />
<TimeAgo date={new Date(result.date.raw)} minPeriod={60} />
</ColorStats>
)}
<SubStats color={grey[400]}>
{dataStatus[result.status] !== undefined && (
<Tooltip
Expand Down
Loading

0 comments on commit 7b26266

Please sign in to comment.