Skip to content

Commit

Permalink
Made auto_requirements default disabled (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
onuratakan authored May 26, 2024
1 parent 3440010 commit 621bfd2
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions upsonic/remote/on_prem.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,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 @@ -176,6 +176,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 @@ -876,20 +877,24 @@ def get(
except:
if self.tester:
traceback.print_exc()



the_requirements_path = None

try:
the_requirements = self.extract_the_requirements(key)
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()
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 621bfd2

Please sign in to comment.