def test_write_output(self):
     print('++ テスト開始')
     aaa = AITManifestGenerator('./')
     aaa.set_ait_name("set_ait_name")
     aaa.set_ait_description("set_ait_description")
     aaa.set_ait_author("set_ait_author")
     aaa.set_ait_email("set_ait_email")
     aaa.set_ait_version("0.1")
     aaa.set_ait_quality("set_ait_quality")
     aaa.set_ait_reference("set_ait_reference")
     aaa.add_ait_inventories('name1', 'type1', 'description1', ['csv'],
                             'schema1')
     aaa.add_ait_inventories('name2', 'type2', 'description2',
                             ['gz', 'zip'], 'schema')
     aaa.add_ait_parameters('name1', 'type1', 'description1',
                            'default_val1')
     aaa.add_ait_parameters('name2', 'type2', 'description2')
     aaa.add_ait_measures('name1', 'type1', 'description1', 'structure1')
     aaa.add_ait_measures('name2', 'type2', 'description2', 'structure2')
     aaa.add_ait_resources('name1', 'type1', 'description1')
     aaa.add_ait_resources('name2', 'type2', 'description2')
     aaa.add_ait_downloads('name1', 'description1')
     aaa.add_ait_downloads('name2', 'description2')
     aaa.write()
     print('++ テスト終了')
예제 #2
0
                                            description='privileged classes',
                                            default_val='25.0')
    manifest_genenerator.add_ait_measures(
        name='mean_difference',
        type_='float',
        description='mean difference of metric fairness',
        structure='single',
        min='-1',
        max='1')
    manifest_genenerator.add_ait_resources(
        name='metric_fairness_plot',
        type_='picture',
        description=
        'base rates polt of privileged_groups and unprivileged_groups')
    manifest_genenerator.add_ait_downloads(name='Log', description='AITLog')
    manifest_path = manifest_genenerator.write()

# In[9]:

#########################################
# area:create input
# should edit
#########################################
if not is_ait_launch:
    from ait_sdk.common.files.ait_input_generator import AITInputGenerator
    input_generator = AITInputGenerator(manifest_path)
    input_generator.add_ait_inventories(name='Data',
                                        value='german_credit/german.csv')
    input_generator.set_ait_params(name='protected_attribute', value='age')
    input_generator.set_ait_params(name='privileged_classes', value='25.0')
    input_generator.write()