YchKhan commited on
Commit
0112e1f
·
verified ·
1 Parent(s): 0cc706f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +86 -0
app.py CHANGED
@@ -24,6 +24,92 @@ class ReqGroupingResponse(BaseModel):
24
  categories: List[ReqGroupingCategory]
25
 
26
  model_config = {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
  "categories": [
28
  {
29
  "id": 1,
 
24
  categories: List[ReqGroupingCategory]
25
 
26
  model_config = {
27
+ "json_schema_extra": {
28
+ "examples": [
29
+ {
30
+ "categories": [
31
+ {
32
+ "id": 1,
33
+ "title": "Robustness & Resilience",
34
+ "requirements": [
35
+ {
36
+ "context": "Subject to the operator’s policy and regulatory requirements, an AI service provided by the 6G network or UE shall be able to provide information regarding robustness scores.",
37
+ "requirement": "Expose an overall robustness score to service consumers."
38
+ },
39
+ {
40
+ "context": "The network can respond with a missings-resilience score for the used AI application.",
41
+ "requirement": "Report a missings-resilience score that quantifies tolerance to missing or corrupted input data."
42
+ }
43
+ ]
44
+ },
45
+ {
46
+ "id": 2,
47
+ "title": "Environmental Sustainability",
48
+ "requirements": [
49
+ {
50
+ "context": "What is the level of energy consumption per information request (per inference run of the AI).",
51
+ "requirement": "Report energy consumption per 1 000 inference requests."
52
+ },
53
+ {
54
+ "context": "What is the portion of renewable energy of the energy consumed by the AI service.",
55
+ "requirement": "Report the share of renewable energy in the AI service’s power mix."
56
+ },
57
+ {
58
+ "context": "The application sets a requirement for the energy consumption needed for inference.",
59
+ "requirement": "Allow the consumer to specify a maximum energy-per-inference threshold that must be met."
60
+ }
61
+ ]
62
+ },
63
+ {
64
+ "id": 3,
65
+ "title": "Explainability & Transparency",
66
+ "requirements": [
67
+ {
68
+ "context": "Local explanation: The aim is to explain individual outputs provided by an ML model.",
69
+ "requirement": "Support local explanations for single predictions."
70
+ },
71
+ {
72
+ "context": "Global explanation: The aim is to explain the whole ML model behaviour.",
73
+ "requirement": "Support global explanations that describe overall model logic."
74
+ },
75
+ {
76
+ "context": "Third-party applications have explanations of AI agent reasoning.",
77
+ "requirement": "Provide on-demand reasoning for predictions to authorised consumers."
78
+ }
79
+ ]
80
+ },
81
+ {
82
+ "id": 4,
83
+ "title": "Service Discovery & Criteria Negotiation",
84
+ "requirements": [
85
+ {
86
+ "context": "A subscriber density prediction service is offered via an exposure interface.",
87
+ "requirement": "Ensure AI services are discoverable through the exposure interface."
88
+ },
89
+ {
90
+ "context": "The application requests further profile information regarding robustness, sustainability and explainability aspects.",
91
+ "requirement": "Expose a profile that includes robustness, sustainability and explainability metrics."
92
+ },
93
+ {
94
+ "context": "A service consumer shall be able to provide service criteria regarding robustness, environmental sustainability, and explainability when requesting an AI service to the 6G system.",
95
+ "requirement": "Accept consumer-supplied criteria for robustness, sustainability and explainability."
96
+ },
97
+ {
98
+ "context": "In some cases the AI service could not be fulfilled, or could fall back to a non-AI mechanism if the criteria cannot be met.",
99
+ "requirement": "Support rejection or graceful fallback when agreed criteria are not satisfied."
100
+ }
101
+ ]
102
+ }
103
+ ]
104
+ }
105
+ ]
106
+ }
107
+ }
108
+
109
+
110
+
111
+
112
+ {
113
  "categories": [
114
  {
115
  "id": 1,