Skip to content

Commit

Permalink
Sync with master
Browse files Browse the repository at this point in the history
  • Loading branch information
onuratakan committed May 26, 2024
1 parent dde58ab commit a291338
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions upsonic/remote/on_prem.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def decrypt(self):
return decrypt


def __init__(self, api_url, access_key, engine="cloudpickle,dill", enable_usage_analyses=True, enable_local_files=True, enable_elastic_dependency=False, cache_dir=None, pass_python_version_check=False, byref=True, recurse=True, protocol=pickle.DEFAULT_PROTOCOL, source=True, builtin=True, tester=False):
def __init__(self, api_url, access_key, engine="cloudpickle,dill", enable_usage_analyses=True, enable_local_files=True, enable_auto_requirements=False, enable_elastic_dependency=False, cache_dir=None, pass_python_version_check=False, byref=True, recurse=True, protocol=pickle.DEFAULT_PROTOCOL, source=True, builtin=True, tester=False):
import requests
from requests.auth import HTTPBasicAuth

Expand All @@ -167,6 +167,7 @@ def __init__(self, api_url, access_key, engine="cloudpickle,dill", enable_usage_
self.protocol = protocol
self.source = source
self.builtin = builtin
self.enable_auto_requirements = enable_auto_requirements
self.enable_elastic_dependency = enable_elastic_dependency
self.enable_usage_analyses = enable_usage_analyses
self.enable_local_files = enable_local_files
Expand Down Expand Up @@ -874,18 +875,20 @@ def get(
traceback.print_exc()
the_requirements_path = None

try:
the_requirements = self.extract_the_requirements(key)

self.install_the_requirements(the_requirements)
if self.tester:
self._log(f"the_requirements {the_requirements}")
if self.enable_elastic_dependency:
the_requirements_path = self.set_the_library_specific_locations(the_requirements)
except:
if self.tester:
self._log(f"Error on requirements while dumping {key}")
traceback.print_exc()
if self.enable_auto_requirements:
try:
the_requirements = self.extract_the_requirements(key)

self.install_the_requirements(the_requirements)
if self.tester:
self._log(f"the_requirements {the_requirements}")
if self.enable_elastic_dependency:
the_requirements_path = self.set_the_library_specific_locations(the_requirements)
except:
if self.tester:
self._log(f"Error on requirements while dumping {key}")
traceback.print_exc()

if response is None:
if version != None:
Expand Down

0 comments on commit a291338

Please sign in to comment.