ultralytics 8.0.70
minor fixes and improvements (#1892)
Co-authored-by: feicccccccc <49809204+feicccccccc@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Laughing-q <1185102784@qq.com>
This commit is contained in:
@ -18,7 +18,7 @@ def login(api_key=''):
|
||||
from ultralytics import hub
|
||||
hub.login('API_KEY')
|
||||
"""
|
||||
Auth(api_key)
|
||||
Auth(api_key, verbose=True)
|
||||
|
||||
|
||||
def logout():
|
||||
@ -82,7 +82,7 @@ def export_model(model_id='', format='torchscript'):
|
||||
|
||||
def get_export(model_id='', format='torchscript'):
|
||||
# Get an exported model dictionary with download URL
|
||||
assert format in export_fmts_hub, f"Unsupported export format '{format}', valid formats are {export_fmts_hub}"
|
||||
assert format in export_fmts_hub(), f"Unsupported export format '{format}', valid formats are {export_fmts_hub()}"
|
||||
r = requests.post('https://api.ultralytics.com/get-export',
|
||||
json={
|
||||
'apiKey': Auth().api_key,
|
||||
|
@ -11,7 +11,7 @@ API_KEY_URL = 'https://hub.ultralytics.com/settings?tab=api+keys'
|
||||
class Auth:
|
||||
id_token = api_key = model_key = False
|
||||
|
||||
def __init__(self, api_key='', verbose=True):
|
||||
def __init__(self, api_key='', verbose=False):
|
||||
"""
|
||||
Initialize the Auth class with an optional API key.
|
||||
|
||||
|
@ -58,7 +58,7 @@ class HUBTrainingSession:
|
||||
raise ValueError(f'Invalid HUBTrainingSession input: {url}')
|
||||
|
||||
# Authorize
|
||||
auth = Auth(key, verbose=False)
|
||||
auth = Auth(key)
|
||||
self.agent_id = None # identifies which instance is communicating with server
|
||||
self.model_id = model_id
|
||||
self.model_url = f'https://hub.ultralytics.com/models/{model_id}'
|
||||
|
Reference in New Issue
Block a user