-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathschema.py
More file actions
43 lines (41 loc) · 1.83 KB
/
schema.py
File metadata and controls
43 lines (41 loc) · 1.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
from pydantic import BaseModel
from typing_extensions import Literal
class ModelInput(BaseModel):
age: int
workclass: Literal[
'State-gov', 'Self-emp-not-inc', 'Private', 'Federal-gov',
'Local-gov', 'Self-emp-inc', 'Without-pay']
fnlgt: int
education: Literal[
'Bachelors', 'HS-grad', '11th', 'Masters', '9th',
'Some-college',
'Assoc-acdm', '7th-8th', 'Doctorate', 'Assoc-voc', 'Prof-school',
'5th-6th', '10th', 'Preschool', '12th', '1st-4th']
marital_status: Literal[
'Never-married', 'Married-civ-spouse', 'Divorced',
'Married-spouse-absent', 'Separated', 'Married-AF-spouse',
'Widowed']
occupation: Literal[
'Adm-clerical', 'Exec-managerial', 'Handlers-cleaners',
'Prof-specialty', 'Other-service', 'Sales', 'Transport-moving',
'Farming-fishing', 'Machine-op-inspct', 'Tech-support',
'Craft-repair', 'Protective-serv', 'Armed-Forces',
'Priv-house-serv']
relationship: Literal[
'Not-in-family', 'Husband', 'Wife', 'Own-child',
'Unmarried', 'Other-relative']
race: Literal[
'White', 'Black', 'Asian-Pac-Islander', 'Amer-Indian-Eskimo',
'Other']
sex: Literal['Male', 'Female']
hoursPerWeek: int
nativeCountry: Literal[
'United-States', 'Cuba', 'Jamaica', 'India', 'Mexico',
'Puerto-Rico', 'Honduras', 'England', 'Canada', 'Germany', 'Iran',
'Philippines', 'Poland', 'Columbia', 'Cambodia', 'Thailand',
'Ecuador', 'Laos', 'Taiwan', 'Haiti', 'Portugal',
'Dominican-Republic', 'El-Salvador', 'France', 'Guatemala',
'Italy', 'China', 'South', 'Japan', 'Yugoslavia', 'Peru',
'Outlying-US(Guam-USVI-etc)', 'Scotland', 'Trinadad&Tobago',
'Greece', 'Nicaragua', 'Vietnam', 'Hong', 'Ireland', 'Hungary',
'Holand-Netherlands']