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

Model card #2895

Merged
merged 9 commits into from
Mar 4, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -29,35 +29,30 @@
</p>
</div>
</template>

<template v-if="biasAndRiskLimitations">
<div class="label-value-pair mt-2">
<h6>Bias and Risk Limitations</h6>
<p>{{ biasAndRiskLimitations }}</p>
</div>
</template>

<template v-if="evaluation">
<div class="label-value-pair mt-2">
<h6>Evaluation</h6>
<p>{{ evaluation }}</p>
</div>
</template>

<template v-if="technicalSpecifications">
<div class="label-value-pair mt-2">
<h6>Technical Specifications</h6>
<p>{{ technicalSpecifications }}</p>
</div>
</template>

<template v-if="!isEmpty(glossary)">
<div class="label-value-pair mt-2">
<h6>Glossary</h6>
<p>{{ glossary.join(', ') }}</p>
</div>
</template>

<template v-if="!isEmpty(moreInformation)">
<div class="label-value-pair mt-2">
<h6>More Information</h6>
Expand All @@ -71,7 +66,6 @@
>
</div>
</template>

<template v-if="!isEmpty(provenance)">
<div class="label-value-pair mt-2">
<h6>Provenance</h6>
Expand All @@ -96,6 +90,18 @@
<p v-html="usage" />
</div>
</template>
<template v-if="!isEmpty(strengths)">
<div class="label-value-pair mt-2">
<h6>Strengths</h6>
<p v-html="strengths" />
</div>
</template>
<template v-if="!isEmpty(assumptions)">
<div class="label-value-pair mt-2">
<h6>Assumptions</h6>
<p v-html="assumptions" />
</div>
</template>
</section>
<section v-else>
<tera-progress-spinner is-centered> Generating card... </tera-progress-spinner>
Expand Down Expand Up @@ -189,9 +195,9 @@ const teraModelDiagramRef = ref();

const card = computed(() => {
// prioritize gollm_card over skema card
if (props.model.metadata?.gollmCard) {
return props.model.metadata.gollmCard;
}
// if (props.model.metadata?.gollmCard) {
// return props.model.metadata.gollmCard;
// }

if (props.model.metadata?.card) {
const cardWithUnknowns = props.model.metadata?.card;
Expand Down Expand Up @@ -232,6 +238,8 @@ const moreInformation = computed(() => card.value?.MoreInformation?.links ?? [])

const uses = computed(() => card.value?.Uses ?? null);
const usage = computed(() => card.value?.usage ?? '');
const strengths = computed(() => card.value?.strengths ?? '');
const assumptions = computed(() => card.value?.assumptions ?? '');
const sourceDataset = computed(() => card.value?.dataset ?? '');
const provenance = computed(() => card.value?.provenance ?? '');
const schema = computed(() => card.value?.schema ?? '');
Expand Down
2 changes: 2 additions & 0 deletions packages/client/hmi-client/src/types/Types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1047,6 +1047,8 @@ export interface Card {
complexity?: string;
usage?: string;
license?: string;
assumptions?: string;
strengths?: string;
}

export interface VariableStatement {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,12 @@ public class Card extends SupportAdditionalProperties implements Serializable {
@JsonAlias("LICENSE")
@TSOptional
private String license;

@JsonAlias("ASSUMPTIONS")
@TSOptional
private String assumptions;

@JsonAlias("STRENGTHS")
@TSOptional
private String strengths;
}
Loading