Exemplo n.º 1
0
 def _create_ml_backend_params(cls, url):
     if '=http' in url:
         name, url = url.split('=', 1)
     else:
         name = str(uuid4())[:8]
     if not is_url(url):
         raise ValueError('Specified string "' + url + '" doesn\'t look like URL.')
     return {'url': url, 'name': name}
Exemplo n.º 2
0
 def _create_ml_backend_params(cls, url, project_name=None):
     if '=http' in url:
         name, url = url.split('=', 1)
     else:
         project_name = os.path.basename(project_name or '')
         name = project_name + str(uuid4())[:4]
     if not is_url(url):
         raise ValueError('Specified string "' + url + '" doesn\'t look like URL.')
     return {'url': url, 'name': name}
Exemplo n.º 3
0
 def _create_ml_backend_params(cls, url, project_name=None):
     if "=http" in url:
         name, url = url.split("=", 1)
     else:
         project_name = os.path.basename(project_name or "")
         name = project_name + str(uuid4())[:4]
     if not is_url(url):
         raise ValueError('Specified string "' + url +
                          "\" doesn't look like URL.")
     return {"url": url, "name": name}