Observed since 21 Oct, 10:51 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
A harness project for ML & DL
This project would like to supply some convenient tools for the machine learning and deep learning. Current features:
<?xml version="1.0" encoding="UTF-8" ?>
<configuration>
<arg name="name" default="TestName" help="Name Test Help"/>
<arg name="age" default="20" help="Age Test Help"/>
<group name="address">
<arg name="home" default="shanghai" help="Home test Help"/>
<arg name="phone" default="136" help="Phone test Help"/>
</group>
<group name="education">
<arg name="school" default="beijing" help="school test Help"/>
<arg name="grade" default="master" help="grade test Help"/>
</group>
</configuration>
you can define multiple xml configuration files, and if the name is same, the value of the later will cover the previous.
from aiharness.configuration import configclass,field
@configclass
class Address:
phone: int = field(139, "phone help")
home: str = field("beijing", "phone help")
@configclass
class Education:
school: str = field('ustb', "phone help")
grade: str = field("master", "phone help")
@configclass
class Config:
name: str = field("test", "name help")
age: str = field(10, "age help")
address: Address = Address()
education: Education = Education()
from aiharness.configuration import XmlConfiguration
config:Config=XmlConfiguration(Config).load(['configuration1.xml','configuration2.xml'])
Generally, we use argparse as following:
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("--name",default='TEST',help='name help')
parser.add_argument("--age",default=18,help='age help')
arguments=parser.parse_args()
And you can got a arguments object.
Here give an example showing how to load a xml configuration and set to argparse arguments and to parse the arguments into a object you defined. And here the Config Class and 'configuration.xml' are same with those of the Configuration example.
Firstly, in fact, the Config Class instead of the codes of 'add_argument' of the argparse.ArgumentParser. Secondly, you can put the configuration into a xml file so that you can change it conveniently.
from aiharness.configuration import Arguments, XmlConfiguration
config: Config = XmlConfiguration(Config).load(['configuration.xml'])
arguments = Arguments(config)
config: Config = arguments.parse()
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.4.32 | 20 Jul 2020 | 4 |
This describes our collected data; it is not a security assessment.
Observed since 21 Oct, 10:51 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:16b6ef736befa1fddfd7b9867dd5a5b6c0898c5705813ab12c1bc3e145200de3