maxffarrell commited on
Commit
27ca70c
·
verified ·
1 Parent(s): 24c9fb2

Pin reproducible runtime dependencies and checkpoint-specific export settings

Browse files
Files changed (3) hide show
  1. SHA256SUMS +2 -2
  2. runtime-smoke.json +66 -1
  3. smoke_mini.py +7 -1
SHA256SUMS CHANGED
@@ -7,7 +7,7 @@ d720cb43ee361fb162de1c5b8fb0460a9fde9f5a5f7f463e415293efd9e954cf convert_mini.p
7
  6e91d7729b36183cbbb7df684d1601efcd8ef25858f9c93fa31bf96a1c720bb8 coreai_mini.py
8
  3a83da88f746a41c45a23f3fcb3306978191bea6d93177a9207c4c479599c456 manifest.json
9
  d4e1bf42e2598b84d5800323fdec87fbf338613e8e866e6bb5ce11ed628c8cb2 requirements.txt
10
- 755a21be5ba30e8469e6625539a549883ecd974e36ef342a6ab0284f079d9b6f runtime-smoke.json
11
  9e17531efd289cf720a36688d943197f9baf9db7c4f743aa4951f6b6f7dbafda serve/README.md
12
  0579eb845ee7af463ec88cf627d99dd636466f2c12d840a7cbe183d8f17044fd serve/amos/__init__.py
13
  ba094d9eaedd229a99b2bdcd35a371ffdeb9aaee258a342524cc19e2f85ec421 serve/amos/calibrate.py
@@ -21,7 +21,7 @@ b0523591c320a074a0ec0751b68ebc205aeedd090ff5e7ca10bda3fb94a07ef8 serve/amos/ser
21
  133d1e29cc64e371f5df1f0cb0328fd77b8b9093d8465319580cf5ea4af5d081 serve/amos/vision.py
22
  bea3f98882a5d12c891aae4a5d75eda8c5a5436e88889d94b6a7d3d648d126f2 serve/pyproject.toml
23
  0d43aa4e58fe6131f4ed1f4bbcbcaa4a0815f8b1fe5331c7e96489700681136b serve/sources.json
24
- 5ebfa87f58e3eaf3a7f9d6e493a906c1df59b3890f805d87859a52378644646b smoke_mini.py
25
  a8d97fff1f3efd130401987198943d69c67202f47e7f029d8887fea06bbcf573 text.aimodel/main.hash
26
  b330fa3eef9565b6d4d2743ab3f2c71e87bed2b1246f92d7d7702be7da4bff33 text.aimodel/main.mlirb
27
  4c017ad5ee82a62b803dd371fa4a1b5585839d1896aee649ca1c909480304292 text.aimodel/metadata.json
 
7
  6e91d7729b36183cbbb7df684d1601efcd8ef25858f9c93fa31bf96a1c720bb8 coreai_mini.py
8
  3a83da88f746a41c45a23f3fcb3306978191bea6d93177a9207c4c479599c456 manifest.json
9
  d4e1bf42e2598b84d5800323fdec87fbf338613e8e866e6bb5ce11ed628c8cb2 requirements.txt
10
+ 288a1003d92b06f780c508b03247c5c755d8ca7923457e99336eefdec847be3b runtime-smoke.json
11
  9e17531efd289cf720a36688d943197f9baf9db7c4f743aa4951f6b6f7dbafda serve/README.md
12
  0579eb845ee7af463ec88cf627d99dd636466f2c12d840a7cbe183d8f17044fd serve/amos/__init__.py
13
  ba094d9eaedd229a99b2bdcd35a371ffdeb9aaee258a342524cc19e2f85ec421 serve/amos/calibrate.py
 
21
  133d1e29cc64e371f5df1f0cb0328fd77b8b9093d8465319580cf5ea4af5d081 serve/amos/vision.py
22
  bea3f98882a5d12c891aae4a5d75eda8c5a5436e88889d94b6a7d3d648d126f2 serve/pyproject.toml
23
  0d43aa4e58fe6131f4ed1f4bbcbcaa4a0815f8b1fe5331c7e96489700681136b serve/sources.json
24
+ cb884a21039e93d088527a1b1eb1f1ec07e7b8f40e9834908fc71545fcd602f1 smoke_mini.py
25
  a8d97fff1f3efd130401987198943d69c67202f47e7f029d8887fea06bbcf573 text.aimodel/main.hash
26
  b330fa3eef9565b6d4d2743ab3f2c71e87bed2b1246f92d7d7702be7da4bff33 text.aimodel/main.mlirb
27
  4c017ad5ee82a62b803dd371fa4a1b5585839d1896aee649ca1c909480304292 text.aimodel/metadata.json
runtime-smoke.json CHANGED
@@ -1,6 +1,7 @@
1
  {
2
  "passed": true,
3
  "pytorch_neural_execution_disabled": true,
 
4
  "result": {
5
  "answers": {
6
  "refund": {
@@ -8,5 +9,69 @@
8
  "noul": 0.916654646396637
9
  }
10
  }
11
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  }
 
1
  {
2
  "passed": true,
3
  "pytorch_neural_execution_disabled": true,
4
+ "capacity_guard": true,
5
  "result": {
6
  "answers": {
7
  "refund": {
 
9
  "noul": 0.916654646396637
10
  }
11
  }
12
+ },
13
+ "image_result": [
14
+ {
15
+ "type": "region",
16
+ "cell": 20,
17
+ "box": [
18
+ 0.8571428656578064,
19
+ 0.2857142984867096,
20
+ 1.0,
21
+ 0.4285714328289032
22
+ ],
23
+ "p": 0.05823236703872681,
24
+ "heatmap": [
25
+ 0.003627329133450985,
26
+ 0.020690279081463814,
27
+ 0.0386543832719326,
28
+ 0.03262745961546898,
29
+ 0.02201051637530327,
30
+ 0.0018908462952822447,
31
+ 0.010826016776263714,
32
+ 0.03380902111530304,
33
+ 0.03466738760471344,
34
+ 0.03497584909200668,
35
+ 0.03742406144738197,
36
+ 0.012618103064596653,
37
+ 0.012579098343849182,
38
+ 0.031272485852241516,
39
+ 0.017472349107265472,
40
+ 0.02468717470765114,
41
+ 0.027419449761509895,
42
+ 0.026453131809830666,
43
+ 0.015212040394544601,
44
+ 0.006261775270104408,
45
+ 0.05823236703872681,
46
+ 0.010453012771904469,
47
+ 0.01569506525993347,
48
+ 0.019370632246136665,
49
+ 0.019656328484416008,
50
+ 0.026168236508965492,
51
+ 0.035445187240839005,
52
+ 0.026440417394042015,
53
+ 0.018468672409653664,
54
+ 0.017326094210147858,
55
+ 0.019229138270020485,
56
+ 0.015094936825335026,
57
+ 0.010123384185135365,
58
+ 0.009488607756793499,
59
+ 0.013879264704883099,
60
+ 0.008674007840454578,
61
+ 0.02177773229777813,
62
+ 0.029268911108374596,
63
+ 0.03802910074591637,
64
+ 0.01372094452381134,
65
+ 0.012725206092000008,
66
+ 0.0032521961256861687,
67
+ 0.018943725153803825,
68
+ 0.01302894577383995,
69
+ 0.012247411534190178,
70
+ 0.007578960154205561,
71
+ 0.005169404670596123,
72
+ 0.014182678423821926,
73
+ 0.041150692850351334
74
+ ]
75
+ }
76
+ ]
77
  }
smoke_mini.py CHANGED
@@ -8,6 +8,12 @@ async def main():
8
  root=Path('bundles/amos-1-mini-CoreAI');m=await AmosMini.load(root)
9
  out=await m.request({'state':'Please refund the duplicate charge.','questions':{'refund':{'type':'noul','instructions':'Is a refund requested?'}}})
10
  assert out['answers']['refund']['noul']>0.5,out
11
- (root/'runtime-smoke.json').write_text(json.dumps({'passed':True,'pytorch_neural_execution_disabled':True,'result':out},indent=2))
 
 
 
 
 
 
12
  print(out)
13
  if __name__=='__main__':asyncio.run(main())
 
8
  root=Path('bundles/amos-1-mini-CoreAI');m=await AmosMini.load(root)
9
  out=await m.request({'state':'Please refund the duplicate charge.','questions':{'refund':{'type':'noul','instructions':'Is a refund requested?'}}})
10
  assert out['answers']['refund']['noul']>0.5,out
11
+ from PIL import Image
12
+ image_result=await m.predict('A red image.',[{'type':'region','text':'Point to the red area.'}],[Image.new('RGB',(360,240),'red')])
13
+ assert image_result[0]['type']=='region'
14
+ try:await m.predict('word '*1000,[{'type':'noul','text':'Is there text?'}])
15
+ except ValueError:capacity_guard=True
16
+ else:raise AssertionError('Over-capacity request was accepted')
17
+ (root/'runtime-smoke.json').write_text(json.dumps({'passed':True,'pytorch_neural_execution_disabled':True,'capacity_guard':capacity_guard,'result':out,'image_result':image_result},indent=2))
18
  print(out)
19
  if __name__=='__main__':asyncio.run(main())