Skip to content

Commit

Permalink
db_schema: system_info.{source,target}_language -> {source,target}_la…
Browse files Browse the repository at this point in the history
…nguage
  • Loading branch information
lyuyangh committed Oct 18, 2022
1 parent 0a3f91f commit f6ce4df
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 15 deletions.
4 changes: 2 additions & 2 deletions backend/src/impl/db_utils/system_db_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,9 @@ def find_systems(
if subdataset_name:
search_conditions.append({"system_info.sub_dataset_name": subdataset_name})
if source_language:
search_conditions.append({"system_info.source_language": source_language})
search_conditions.append({"source_language": source_language})
if target_language:
search_conditions.append({"system_info.target_language": target_language})
search_conditions.append({"target_language": target_language})
if split:
search_conditions.append({"system_info.dataset_split": split})
if creator:
Expand Down
8 changes: 2 additions & 6 deletions frontend/src/components/SystemsTable/SystemTableContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,20 +138,16 @@ export function SystemTableContent({
render: (_, record) => record.system_info.dataset_split || "unspecified",
},
{
dataIndex: ["system_info", "source_language"],
dataIndex: "source_language",
width: 100,
title: "Input Lang",
align: "center",
render: (_, record) =>
record.system_info.source_language || "unspecified",
},
{
dataIndex: ["system_info", "target_language"],
dataIndex: "target_language",
width: 100,
title: "Output Lang",
align: "center",
render: (_, record) =>
record.system_info.target_language || "unspecified",
},
...metricColumns,
{
Expand Down
20 changes: 13 additions & 7 deletions openapi/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -957,6 +957,12 @@ components:
type: string
is_private:
type: boolean
source_language:
type: string
example: en
target_language:
type: string
example: en
system_info:
$ref: "#/components/schemas/SystemInfo"
metric_stats:
Expand Down Expand Up @@ -998,13 +1004,13 @@ components:
description: |
a place to store arbitrary system details you want to remember
required:
[
system_id,
system_name,
is_private,
system_info,
metric_stats,
]
- system_id
- system_name
- is_private
- source_language
- target_language
- system_info
- metric_stats
- $ref: "#/components/schemas/Time"

DatasetFeature:
Expand Down

0 comments on commit f6ce4df

Please sign in to comment.