Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return f'''
query ($query: [String!]!) {{
queryModelDetails(query: $query) {{
...on Regression {{
{' '.join(reg)}
}}
...on Classification {{
{' '.join(cls)}
}}
}}
}}
'''
class GetModelUrls(BaseQuery):
queryable = [
'id',
'etag',
'url',
]
def __init__(self, variables, *, api_key: str = 'anonymous.user.key',
endpoint: str = 'http://xenon.ism.ac.jp/api'):
"""
Access to XenonPy.MDL library.
Parameters
----------
api_key
Not implement yet.
"""
api_key
Not implement yet.
"""
super().__init__(variables=variables, api_key=api_key, endpoint=endpoint)
def gql(self, *query_vars: str):
return f'''
query ($name: String!) {{
listModelsWithDescriptor(name: $name) {{
{' '.join(query_vars)}
}}
}}
'''
class UploadModel(BaseQuery):
queryable = [
'id',
'etag',
'path'
]
def __init__(self, variables, *, api_key: str = 'anonymous.user.key',
endpoint: str = 'http://xenon.ism.ac.jp/api'):
"""
Access to XenonPy.MDL library.
Parameters
----------
api_key
Not implement yet.
"""
api_key
Not implement yet.
"""
super().__init__(variables=variables, api_key=api_key, endpoint=endpoint)
def gql(self, *query_vars: str):
return f'''
query ($name: String!) {{
listModelsWithProperty(name: $name) {{
{' '.join(query_vars)}
}}
}}
'''
class ListModelsWithModelset(BaseQuery):
queryable = [
'id',
'transferred',
'succeed',
'isRegression',
'deprecated',
'modelset',
'method',
'property',
'descriptor',
'lang'
]
def __init__(self, variables, *, api_key: str = 'anonymous.user.key',
endpoint: str = 'http://xenon.ism.ac.jp/api'):
"""
return f'''
query ($ids: [Int!]!) {{
getModelDetails(ids: $ids) {{
...on Regression {{
{' '.join(reg)}
}}
...on Classification {{
{' '.join(cls)}
}}
}}
}}
'''
pass
class GetModelDetail(BaseQuery):
common = [
'id',
'transferred',
'succeed',
'isRegression',
'deprecated',
'modelset',
'method',
'property',
'descriptor',
'lang',
]
classification = [
'accuracy',
api_key
Not implement yet.
"""
super().__init__(variables=variables, api_key=api_key, endpoint=endpoint)
def gql(self, *query_vars: str):
return f'''
query ($name: String!) {{
listModelsWithMethod(name: $name) {{
{' '.join(query_vars)}
}}
}}
'''
class ListModelsWithDescriptor(BaseQuery):
queryable = [
'id',
'transferred',
'succeed',
'isRegression',
'deprecated',
'modelset',
'method',
'property',
'descriptor',
'lang'
]
def __init__(self, variables, *, api_key: str = 'anonymous.user.key',
endpoint: str = 'http://xenon.ism.ac.jp/api'):
"""
from .modelset import QueryModelsets, QueryModelsetsWith, UpdateModelset, CreateModelset, ListModelsets, \
GetModelsetDetail
from .property import QueryPropertiesWith, QueryProperties, UpdateProperty, CreateProperty, ListProperties, \
GetPropertyDetail
__all__ = ['MDL', 'GetVersion', 'QueryModelsetsWith', 'QueryModelsets', 'QueryModelDetailsWith', 'QueryModelDetails',
'UpdateModelset', 'UploadModel', 'GetModelsetDetail', 'GetModelDetail', 'GetModelDetails', 'GetModelUrls',
'GetModelUrl', 'GetTrainingInfo', 'GetSupplementary', 'GetTrainingEnv', 'ListModelsets',
'ListModelsWithDescriptor', 'ListModelsWithMethod', 'ListModelsWithModelset', 'ListModelsWithProperty',
'QueryPropertiesWith', 'QueryProperties', 'GetPropertyDetail', 'ListProperties', 'CreateProperty',
'CreateModelset', 'UpdateProperty', 'QueryDescriptorsWith', 'QueryDescriptors', 'QueryMethodsWith',
'QueryMethods', 'UpdateDescriptor', 'UpdateMethod', 'ListDescriptors', 'ListMethods', 'GetMethodDetail',
'GetDescriptorDetail', 'CreateDescriptor', 'CreateMethod']
class GetVersion(BaseQuery):
queryable = []
def __init__(self, *, api_key: str = 'anonymous.user.key',
endpoint: str = 'http://xenon.ism.ac.jp/api'):
"""
Access to XenonPy.MDL library.
Parameters
----------
api_key
Not implement yet.
"""
super().__init__(variables={}, api_key=api_key, endpoint=endpoint)
self._return_json = True
def gql(self, *query_vars: str):
----------
api_key
Not implement yet.
"""
super().__init__(variables=variables, api_key=api_key, endpoint=endpoint)
self._return_json = True
def gql(self, *query_vars: str):
return f'''
query ($id: Int!) {{
getTrainingEnv(id: $id)
}}
'''
class GetSupplementary(BaseQuery):
queryable = []
def __init__(self, variables, *, api_key: str = 'anonymous.user.key',
endpoint: str = 'http://xenon.ism.ac.jp/api'):
"""
Access to XenonPy.MDL library.
Parameters
----------
api_key
Not implement yet.
"""
super().__init__(variables=variables, api_key=api_key, endpoint=endpoint)
self._return_json = True
def gql(self, *query_vars: str):
"""
super().__init__(variables=variables, api_key=api_key, endpoint=endpoint)
@staticmethod
def _post(ret, return_json):
return pd.DataFrame(ret)
def gql(self, *query_vars: str):
return f'''
query ($id: Int!) {{
getTrainingInfo(id: $id)
}}
'''
class GetTrainingEnv(BaseQuery):
queryable = []
def __init__(self, variables, *, api_key: str = 'anonymous.user.key',
endpoint: str = 'http://xenon.ism.ac.jp/api'):
"""
Access to XenonPy.MDL library.
Parameters
----------
api_key
Not implement yet.
"""
super().__init__(variables=variables, api_key=api_key, endpoint=endpoint)
self._return_json = True
def gql(self, *query_vars: str):
api_key
Not implement yet.
"""
super().__init__(variables=variables, api_key=api_key, endpoint=endpoint)
def gql(self, *query_vars: str):
return f'''
query ($ids: [Int!]!) {{
getModelUrls(ids: $ids) {{
{' '.join(query_vars)}
}}
}}
'''
class GetModelUrl(BaseQuery):
queryable = [
'id',
'etag',
'url',
]
def __init__(self, variables, *, api_key: str = 'anonymous.user.key',
endpoint: str = 'http://xenon.ism.ac.jp/api'):
"""
Access to XenonPy.MDL library.
Parameters
----------
api_key
Not implement yet.
"""
return f'''
query ($id: Int!) {{
getModelDetail(id: $id) {{
...on Regression {{
{' '.join(reg)}
}}
...on Classification {{
{' '.join(cls)}
}}
}}
}}
'''
pass
class GetTrainingInfo(BaseQuery):
queryable = []
def __init__(self, variables, *, api_key: str = 'anonymous.user.key',
endpoint: str = 'http://xenon.ism.ac.jp/api'):
"""
Access to XenonPy.MDL library.
Parameters
----------
api_key
Not implement yet.
"""
super().__init__(variables=variables, api_key=api_key, endpoint=endpoint)
@staticmethod
def _post(ret, return_json):