diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..0503989 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,16 @@ +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks +repos: +- repo: https://github.com/charliermarsh/ruff-pre-commit + rev: 'v0.0.267' + hooks: + - id: ruff + args: [ --fix, --exit-non-zero-on-fix ] +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v3.2.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-ast + - id: check-yaml + - id: check-added-large-files diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..cee7b74 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,6 @@ +{ + "[python]": { + "editor.defaultFormatter": "ms-python.black-formatter" + }, + "python.formatting.provider": "none" +} diff --git a/deepview_profile/__main__.py b/deepview_profile/__main__.py index 8b6e4e1..a3e2c3d 100644 --- a/deepview_profile/__main__.py +++ b/deepview_profile/__main__.py @@ -1,5 +1,4 @@ import argparse -import enum import sys import deepview_profile diff --git a/deepview_profile/analysis/request_manager.py b/deepview_profile/analysis/request_manager.py index dc8b16f..951a2a9 100644 --- a/deepview_profile/analysis/request_manager.py +++ b/deepview_profile/analysis/request_manager.py @@ -4,7 +4,6 @@ from concurrent.futures import ThreadPoolExecutor from deepview_profile.analysis.runner import analyze_project -from deepview_profile.config import Config from deepview_profile.exceptions import AnalysisError from deepview_profile.nvml import NVML import deepview_profile.protocol_gen.innpv_pb2 as pm @@ -135,7 +134,7 @@ def _handle_analysis_request(self, analysis_request, context): except AnalysisError as ex: self._enqueue_response(self._send_analysis_error, ex, context) - except: + except Exception: logger.exception( 'Exception occurred when handling analysis request.') self._enqueue_response( @@ -164,7 +163,7 @@ def _send_breakdown_response(self, breakdown, context): # Called from the main executor. Do not call directly! try: self._message_sender.send_breakdown_response(breakdown, context) - except: + except Exception: logger.exception( 'Exception occurred when sending a breakdown response.') @@ -172,7 +171,7 @@ def _send_analysis_error(self, exception, context): # Called from the main executor. Do not call directly! try: self._message_sender.send_analysis_error(exception, context) - except: + except Exception: logger.exception( 'Exception occurred when sending an analysis error.') @@ -180,7 +179,7 @@ def _send_throughput_response(self, throughput, context): # Called from the main executor. Do not call directly! try: self._message_sender.send_throughput_response(throughput, context) - except: + except Exception: logger.exception( 'Exception occurred when sending a throughput response.') @@ -188,7 +187,7 @@ def _send_habitat_response(self, habitat_resp, context): # Called from the main executor. Do not call directly! try: self._message_sender.send_habitat_response(habitat_resp, context) - except: + except Exception: logger.exception( 'Exception occurred when sending a DeepView.Predict response.') @@ -196,6 +195,6 @@ def _send_energy_response(self, energy_resp, context): # Called from the main executor. Do not call directly! try: self._message_sender.send_energy_response(energy_resp, context) - except: + except Exception: logger.exception( - 'Exception occurred when sending an energy response.') \ No newline at end of file + 'Exception occurred when sending an energy response.') diff --git a/deepview_profile/analysis/session.py b/deepview_profile/analysis/session.py index 3e92150..2526cc4 100644 --- a/deepview_profile/analysis/session.py +++ b/deepview_profile/analysis/session.py @@ -43,10 +43,11 @@ # Habitat variables Context = collections.namedtuple( - 'Context', - ['origin_device', 'profiler', 'percentile'], + "Context", + ["origin_device", "profiler", "percentile"], ) + class AnalysisSession: def __init__( self, @@ -57,7 +58,7 @@ def __init__( input_provider, iteration_provider, batch_size, - entry_point_static_analyzer + entry_point_static_analyzer, ): self._project_root = project_root self._entry_point = entry_point @@ -71,7 +72,9 @@ def __init__( self._memory_usage_percentage = None self._batch_size_iteration_run_time_ms = None self._batch_size_peak_usage_bytes = None - self._energy_table_interface = EnergyTableInterface(DatabaseInterface().connection) + self._energy_table_interface = EnergyTableInterface( + DatabaseInterface().connection + ) @classmethod def new_from(cls, project_root, entry_point): @@ -92,21 +95,21 @@ def new_from(cls, project_root, entry_point): raise AnalysisError( "The project entry point file is missing a model provider " "function. Please add a model provider function named " - "\"{}\".".format(MODEL_PROVIDER_NAME) + '"{}".'.format(MODEL_PROVIDER_NAME) ).with_file_context(entry_point) if INPUT_PROVIDER_NAME not in scope: raise AnalysisError( "The project entry point file is missing an input provider " "function. Please add an input provider function named " - "\"{}\".".format(INPUT_PROVIDER_NAME) + '"{}".'.format(INPUT_PROVIDER_NAME) ).with_file_context(entry_point) if ITERATION_PROVIDER_NAME not in scope: raise AnalysisError( "The project entry point file is missing an iteration " "provider function. Please add an iteration provider function " - "named \"{}\".".format(ITERATION_PROVIDER_NAME) + 'named "{}".'.format(ITERATION_PROVIDER_NAME) ).with_file_context(entry_point) batch_size = _validate_providers_signatures( @@ -116,13 +119,15 @@ def new_from(cls, project_root, entry_point): entry_point, ) - model_provider, input_provider, iteration_provider = ( - _wrap_providers_with_validators( - scope[MODEL_PROVIDER_NAME], - scope[INPUT_PROVIDER_NAME], - scope[ITERATION_PROVIDER_NAME], - entry_point, - ) + ( + model_provider, + input_provider, + iteration_provider, + ) = _wrap_providers_with_validators( + scope[MODEL_PROVIDER_NAME], + scope[INPUT_PROVIDER_NAME], + scope[ITERATION_PROVIDER_NAME], + entry_point, ) return cls( @@ -138,7 +143,7 @@ def new_from(cls, project_root, entry_point): def energy_compute(self) -> pm.EnergyResponse: energy_measurer = EnergyMeasurer() - + model = self._model_provider() inputs = self._input_provider() iteration = self._iteration_provider(model) @@ -150,7 +155,7 @@ def energy_compute(self) -> pm.EnergyResponse: for _ in range(iterations): iteration(*inputs) energy_measurer.end_measurement() - resp.total_consumption = energy_measurer.total_energy()/float(iterations) + resp.total_consumption = energy_measurer.total_energy() / float(iterations) resp.batch_size = self._batch_size components = [] @@ -159,7 +164,9 @@ def energy_compute(self) -> pm.EnergyResponse: if energy_measurer.cpu_energy() is not None: cpu_component = pm.EnergyConsumptionComponent() cpu_component.component_type = pm.ENERGY_CPU_DRAM - cpu_component.consumption_joules = energy_measurer.cpu_energy()/float(iterations) + cpu_component.consumption_joules = energy_measurer.cpu_energy() / float( + iterations + ) components.append(cpu_component) components_joules.append(cpu_component.consumption_joules) else: @@ -168,18 +175,24 @@ def energy_compute(self) -> pm.EnergyResponse: cpu_component.consumption_joules = 0.0 components.append(cpu_component) components_joules.append(cpu_component.consumption_joules) - + gpu_component = pm.EnergyConsumptionComponent() gpu_component.component_type = pm.ENERGY_NVIDIA - gpu_component.consumption_joules = energy_measurer.gpu_energy()/float(iterations) + gpu_component.consumption_joules = energy_measurer.gpu_energy() / float( + iterations + ) components.append(gpu_component) components_joules.append(gpu_component.consumption_joules) - + resp.components.extend(components) - + # get last 10 runs if they exist path_to_entry_point = os.path.join(self._project_root, self._entry_point) - past_runs = self._energy_table_interface.get_latest_n_entries_of_entry_point(10, path_to_entry_point) + past_runs = ( + self._energy_table_interface.get_latest_n_entries_of_entry_point( + 10, path_to_entry_point + ) + ) resp.past_measurements.extend(_convert_to_energy_responses(past_runs)) # add current run to database @@ -190,13 +203,13 @@ def energy_compute(self) -> pm.EnergyResponse: message = str(ex) logger.error(message) resp.analysis_error.error_message = message - except: + except Exception: logger.error("There was an error obtaining energy measurements") - resp.analysis_error.error_message = "There was an error obtaining energy measurements" + resp.analysis_error.error_message = ( + "There was an error obtaining energy measurements" + ) finally: return resp - - def habitat_compute_threshold(self, runnable, context): tracker = habitat.OperationTracker(context.origin_device) @@ -214,10 +227,9 @@ def habitat_compute_threshold(self, runnable, context): return np.percentile(run_times, context.percentile) - def habitat_predict(self): - resp = pm.HabitatResponse() - if not habitat_found: + resp = pm.HabitatResponse() + if not habitat_found: logger.debug("Skipping deepview predictions, returning empty response.") return resp @@ -234,27 +246,34 @@ def habitat_predict(self): habitat.Device.RTX3090, habitat.Device.A40, habitat.Device.A4000, - habitat.Device.RTX4000 + habitat.Device.RTX4000, ] # Detect source GPU pynvml.nvmlInit() if pynvml.nvmlDeviceGetCount() == 0: - raise Exception("NVML failed to find a GPU. PLease ensure that you have a NVIDIA GPU installed and that the drivers are functioning correctly.") + raise Exception("NVML failed to find a GPU. Please ensure that you \ + have a NVIDIA GPU installed and that the drivers are functioning \ + correctly.") # TODO: Consider profiling on not only the first detected GPU nvml_handle = pynvml.nvmlDeviceGetHandleByIndex(0) source_device_name = pynvml.nvmlDeviceGetName(nvml_handle).decode("utf-8") split_source_device_name = re.split(r"-|\s|_|\\|/", source_device_name) - source_device = None if logging.root.level > logging.DEBUG else habitat.Device.T4 + source_device = ( + None if logging.root.level > logging.DEBUG else habitat.Device.T4 + ) for device in DEVICES: if device.name in split_source_device_name: source_device = device pynvml.nvmlShutdown() if not source_device: - logger.debug("Skipping DeepView predictions, source not in list of supported GPUs.") + logger.debug( + "Skipping DeepView predictions,\ + source not in list of supported GPUs." + ) src = pm.HabitatDevicePrediction() - src.device_name = 'unavailable' + src.device_name = "unavailable" src.runtime_ms = -1 resp.predictions.append(src) return resp @@ -272,13 +291,11 @@ def runnable(): profiler = RunTimeProfiler() context = Context( - origin_device=source_device, - profiler=profiler, - percentile=99.5 + origin_device=source_device, profiler=profiler, percentile=99.5 ) threshold = self.habitat_compute_threshold(runnable, context) - + tracker = habitat.OperationTracker( device=context.origin_device, metrics=[ @@ -289,15 +306,14 @@ def runnable(): metrics_threshold_ms=threshold, ) - with tracker.track(): iteration(*inputs) - + print("deepview_predict: tracing on origin device") trace = tracker.get_tracked_trace() src = pm.HabitatDevicePrediction() - src.device_name = 'source' + src.device_name = "source" src.runtime_ms = trace.run_time_ms resp.predictions.append(src) @@ -315,16 +331,13 @@ def runnable(): message = str(ex) logger.error(message) resp.analysis_error.error_message = message - except: + except Exception: logger.error("There was an error running DeepView Predict") - resp.analysis_error.error_message = "There was an error running DeepView Predict" + resp.analysis_error.error_message = ( + "There was an error running DeepView Predict" + ) finally: return resp - - - - - def measure_breakdown(self, nvml): # 1. Measure the breakdown entries @@ -340,9 +353,11 @@ def measure_breakdown(self, nvml): if self._profiler is None: self._initialize_iteration_profiler() - (self._batch_size_iteration_run_time_ms, - self._batch_size_peak_usage_bytes, - _) = self._profiler.measure_run_time_ms(self._batch_size) + ( + self._batch_size_iteration_run_time_ms, + self._batch_size_peak_usage_bytes, + _, + ) = self._profiler.measure_run_time_ms(self._batch_size) # 3. Serialize the measured data bm = pm.BreakdownResponse() @@ -354,9 +369,7 @@ def measure_breakdown(self, nvml): breakdown.weights.serialize_to_protobuf(bm.weight_tree) # 4. Bookkeeping for the throughput measurements - self._memory_usage_percentage = ( - bm.peak_usage_bytes / bm.memory_capacity_bytes - ) + self._memory_usage_percentage = bm.peak_usage_bytes / bm.memory_capacity_bytes return bm @@ -381,9 +394,7 @@ def measure_throughput(self): # 2. Begin filling in the throughput response logger.debug("sampling results", samples) - measured_throughput = ( - samples[0].batch_size / samples[0].run_time_ms * 1000 - ) + measured_throughput = samples[0].batch_size / samples[0].run_time_ms * 1000 throughput = pm.ThroughputResponse() throughput.samples_per_second = measured_throughput throughput.predicted_max_samples_per_second = math.nan @@ -396,7 +407,8 @@ def measure_throughput(self): throughput.batch_size_context.line_number = batch_info[0] throughput.can_manipulate_batch_size = batch_info[1] throughput.batch_size_context.file_path.components.extend( - self._entry_point.split(os.sep)) + self._entry_point.split(os.sep) + ) # 4. If we do not have enough throughput samples, we cannot build any # prediction models so just return the message as-is @@ -425,33 +437,30 @@ def measure_throughput(self): throughput.peak_usage_bytes.bias = peak_usage_model[1] predicted_max_throughput = 1000.0 / run_time_model[0] - + # Our prediction can be inaccurate due to sampling error or incorrect # assumptions. In these cases, we ignore our prediction. At the very # minimum, a good linear model has a positive slope and bias. - #if (run_time_model[0] < 1e-3 or run_time_model[1] < 1e-3 or - if (run_time_model[0] < 1e-3 or - measured_throughput > predicted_max_throughput): + # if (run_time_model[0] < 1e-3 or run_time_model[1] < 1e-3 or + if run_time_model[0] < 1e-3 or measured_throughput > predicted_max_throughput: return throughput throughput.predicted_max_samples_per_second = predicted_max_throughput throughput.run_time_ms.slope = run_time_model[0] throughput.run_time_ms.bias = run_time_model[1] - + return throughput def measure_peak_usage_bytes(self): self._prepare_for_memory_profiling() # Run one iteration to initialize the gradients - with user_code_environment( - self._path_to_entry_point_dir, self._project_root): + with user_code_environment(self._path_to_entry_point_dir, self._project_root): model = self._model_provider() iteration = self._iteration_provider(model) iteration(*self._input_provider(batch_size=self._batch_size)) torch.cuda.reset_max_memory_allocated() - with user_code_environment( - self._path_to_entry_point_dir, self._project_root): + with user_code_environment(self._path_to_entry_point_dir, self._project_root): # NOTE: It's important to run at least 2 iterations here. It turns # out that >= 2 iterations is the number of iterations needed # to get a stable measurement of the total memory @@ -495,12 +504,11 @@ def _get_tracker_instance(self): iteration_provider=self._iteration_provider, input_provider=self._input_provider, project_root=self._project_root, - user_code_path=self._path_to_entry_point_dir + user_code_path=self._path_to_entry_point_dir, ) -def _run_entry_point( - path_to_entry_point, path_to_entry_point_dir, project_root): +def _run_entry_point(path_to_entry_point, path_to_entry_point_dir, project_root): with open(path_to_entry_point) as file: code_str = file.read() with exceptions_as_analysis_errors(project_root): @@ -525,9 +533,11 @@ def _validate_providers_signatures( ).with_file_context(entry_point) input_sig = inspect.signature(input_provider) - if (len(input_sig.parameters) != 1 or - BATCH_SIZE_ARG not in input_sig.parameters or - type(input_sig.parameters[BATCH_SIZE_ARG].default) is not int): + if ( + len(input_sig.parameters) != 1 + or BATCH_SIZE_ARG not in input_sig.parameters + or type(input_sig.parameters[BATCH_SIZE_ARG].default) is not int + ): raise AnalysisError( "The input provider function must have exactly one '{}' " "parameter with an integral default " @@ -576,9 +586,9 @@ def input_provider_wrapped(batch_size=None): ).with_file_context(entry_point) try: - input_iter = iter(inputs) + iter(inputs) return inputs - except TypeError as ex: + except TypeError: raise AnalysisError( "The input provider function must return an iterable that " "contains the inputs for the model." @@ -609,7 +619,8 @@ def _fit_linear_model(x, y): # Linear model: y = slope * x + bias return slope, bias -def _convert_to_energy_responses(entries: list)-> List[pm.EnergyResponse]: + +def _convert_to_energy_responses(entries: list) -> List[pm.EnergyResponse]: energy_response_list = [] for entry in entries: if EnergyTableInterface.is_valid_entry_with_timestamp(entry): @@ -617,15 +628,17 @@ def _convert_to_energy_responses(entries: list)-> List[pm.EnergyResponse]: cpu_component = pm.EnergyConsumptionComponent() cpu_component.component_type = pm.ENERGY_CPU_DRAM cpu_component.consumption_joules = entry[1] - + gpu_component = pm.EnergyConsumptionComponent() gpu_component.component_type = pm.ENERGY_NVIDIA gpu_component.consumption_joules = entry[2] - - energy_response.total_consumption = gpu_component.consumption_joules+cpu_component.consumption_joules + + energy_response.total_consumption = ( + gpu_component.consumption_joules + cpu_component.consumption_joules + ) energy_response.components.extend([cpu_component, gpu_component]) energy_response.batch_size = entry[3] energy_response_list.append(energy_response) - + return energy_response_list diff --git a/deepview_profile/commands/interactive.py b/deepview_profile/commands/interactive.py index c11ce9c..9c9efa1 100644 --- a/deepview_profile/commands/interactive.py +++ b/deepview_profile/commands/interactive.py @@ -1,6 +1,5 @@ import logging import signal -import subprocess import threading from deepview_profile.initialization import ( @@ -48,7 +47,6 @@ def register_command(subparsers): parser.set_defaults(func=main) def actual_main(args): - from deepview_profile.config import Config from deepview_profile.server import SkylineServer should_shutdown = threading.Event() diff --git a/deepview_profile/commands/measurements.py b/deepview_profile/commands/measurements.py index 578e073..1aaa844 100644 --- a/deepview_profile/commands/measurements.py +++ b/deepview_profile/commands/measurements.py @@ -60,7 +60,6 @@ def make_measurements(session, batch_size): def actual_main(args): from deepview_profile.analysis.session import AnalysisSession - from deepview_profile.config import Config from deepview_profile.exceptions import AnalysisError if os.path.exists(args.output): diff --git a/deepview_profile/commands/memory.py b/deepview_profile/commands/memory.py index ba1f69d..55f631a 100644 --- a/deepview_profile/commands/memory.py +++ b/deepview_profile/commands/memory.py @@ -37,7 +37,6 @@ def register_command(subparsers): def actual_main(args): from deepview_profile.analysis.session import AnalysisSession - from deepview_profile.config import Config from deepview_profile.exceptions import AnalysisError if os.path.exists(args.output): diff --git a/deepview_profile/commands/prediction_models.py b/deepview_profile/commands/prediction_models.py index 58b7719..340331c 100644 --- a/deepview_profile/commands/prediction_models.py +++ b/deepview_profile/commands/prediction_models.py @@ -55,7 +55,6 @@ def get_model(session, batch_size): def actual_main(args): from deepview_profile.analysis.session import AnalysisSession - from deepview_profile.config import Config from deepview_profile.exceptions import AnalysisError if os.path.exists(args.output): diff --git a/deepview_profile/commands/time.py b/deepview_profile/commands/time.py index 0fc2c22..ef66580 100644 --- a/deepview_profile/commands/time.py +++ b/deepview_profile/commands/time.py @@ -38,7 +38,6 @@ def register_command(subparsers): def actual_main(args): from deepview_profile.analysis.session import AnalysisSession - from deepview_profile.config import Config from deepview_profile.exceptions import AnalysisError if os.path.exists(args.output): diff --git a/deepview_profile/db/database.py b/deepview_profile/db/database.py index 61a13d2..f168a16 100644 --- a/deepview_profile/db/database.py +++ b/deepview_profile/db/database.py @@ -1,4 +1,4 @@ -import datetime +import datetime import os import sqlite3 @@ -7,7 +7,9 @@ class DatabaseInterface: def __init__(self, database_name=DB_PATH) -> None: - self.connection = sqlite3.connect(database_name, detect_types=sqlite3.PARSE_DECLTYPES|sqlite3.PARSE_COLNAMES) + self.connection = sqlite3.connect( + database_name, detect_types=sqlite3.PARSE_DECLTYPES|sqlite3.PARSE_COLNAMES + ) self.create_energy_table() def create_energy_table(self) -> None: @@ -46,9 +48,9 @@ def is_valid_entry_with_timestamp(entry: list) -> bool: def add_entry(self, entry: list) -> bool: ''' - Validates an entry and then adds that entry into the Energy table. Note that current timestamp is added - by this function. Returns False if the entry is not a valid format, or if the insertion failed. Else - returns True + Validates an entry and then adds that entry into the Energy table. Note that + current timestamp is added by this function. Returns False if the entry is + not a valid format, or if the insertion failed. Else returns True ''' if self.is_valid_entry(entry): try: @@ -69,5 +71,8 @@ def get_latest_n_entries_of_entry_point(self, n: int, entry_point: str) -> list: ''' params = [entry_point, n] cursor = self.database_connection.cursor() - results = cursor.execute("SELECT * FROM ENERGY WHERE entry_point=? ORDER BY ts DESC LIMIT ?;", params).fetchall() - return results \ No newline at end of file + results = cursor.execute( + "SELECT * FROM ENERGY WHERE entry_point=? ORDER BY ts DESC LIMIT ?;", + params + ).fetchall() + return results diff --git a/deepview_profile/energy/measurer.py b/deepview_profile/energy/measurer.py index f52a2ff..efd3223 100644 --- a/deepview_profile/energy/measurer.py +++ b/deepview_profile/energy/measurer.py @@ -19,13 +19,15 @@ def measurer_init(self): energy = self.sensor.energy() self.last_cpu = np.array(energy[0::2]) self.last_dram = np.array(energy[1::2]) - except Exception as e: - print("Warning. Failed to get CPU energy. You need to set the right permissions for pyRAPL") + except Exception: + print("Warning. Failed to get CPU energy. \ + You need to set the right permissions for pyRAPL") print("eg. $ sudo chmod -R a+r /sys/class/powercap/intel-rapl") def measurer_measure(self): # Get energy consumed so far (since last CPU reset) - if self.sensor is None: return + if self.sensor is None: + return energy = self.sensor.energy() cpu = np.array(energy[0::2]) @@ -33,8 +35,8 @@ def measurer_measure(self): # Compare against last measurement to determine energy since last measure diff_cpu = cpu - self.last_cpu - diff_dram = dram - self.last_dram - + dram - self.last_dram + # 1J = 10^6 uJ # The cpu used this much since the last measurement # We have mW = 1000*J/s = 1000*(uJ/10^6)/s @@ -49,7 +51,8 @@ def measurer_deallocate(self): pass def total_energy(self): - if len(self.power) == 0: return None + if len(self.power) == 0: + return None # J = W * s, 1W = 1000 mW energy = self.interval * sum(self.power) / 1000.0 @@ -123,6 +126,6 @@ def total_energy(self): def cpu_energy(self): return self.measurers["cpu"].total_energy() - + def gpu_energy(self): return self.measurers["gpu"].total_energy() diff --git a/deepview_profile/evaluate.py b/deepview_profile/evaluate.py index c7d7518..dd061c1 100644 --- a/deepview_profile/evaluate.py +++ b/deepview_profile/evaluate.py @@ -1,5 +1,4 @@ import argparse -import enum import sys import deepview_profile.commands.measurements diff --git a/deepview_profile/initialization.py b/deepview_profile/initialization.py index 004e0bd..444fd7f 100644 --- a/deepview_profile/initialization.py +++ b/deepview_profile/initialization.py @@ -1,5 +1,4 @@ import logging -import os import sys logger = logging.getLogger(__name__) @@ -42,11 +41,11 @@ def _validate_dependencies(): # NOTE: If you make a change here, make sure to update the INSTALL_REQUIRES # list in setup.py as well. try: - import yaml # pyyaml on PyPI - import pynvml # nvidia-ml-py3 on PyPI - import google.protobuf # protobuf on PyPI - import numpy - import torch + import yaml # pyyaml on PyPI # noqa: F401 + import pynvml # nvidia-ml-py3 on PyPI # noqa: F401 + import google.protobuf # protobuf on PyPI # noqa: F401 + import numpy # noqa: F401 + import torch # noqa: F401 return True except ImportError as ex: logger.error( diff --git a/deepview_profile/io/connection.py b/deepview_profile/io/connection.py index f6b7008..e09af70 100644 --- a/deepview_profile/io/connection.py +++ b/deepview_profile/io/connection.py @@ -91,9 +91,9 @@ def _socket_read(self): buffer = buffer[message_length:] message_length = -1 - except: + except Exception: logger.exception("Connection unexpectedly stopping...") - + @property def project_root(self): return self._project_root @@ -101,7 +101,7 @@ def project_root(self): @property def entry_point(self): return self._entry_point - + def set_project_paths(self, project_root, entry_point): self._project_root = project_root self._entry_point = entry_point diff --git a/deepview_profile/io/connection_acceptor.py b/deepview_profile/io/connection_acceptor.py index 5fac0ea..e54184d 100644 --- a/deepview_profile/io/connection_acceptor.py +++ b/deepview_profile/io/connection_acceptor.py @@ -1,7 +1,6 @@ -import os +import logging import select import socket -import logging from threading import Thread from deepview_profile.io.sentinel import Sentinel @@ -78,6 +77,6 @@ def _accept_connections(self): host, port = address logger.debug("Accepted a connection to (%s:%d).", host, port) self._handler_function(socket, address) - except: + except Exception: logging.exception( "DeepView has unexpectedly stopped accepting connections.") diff --git a/deepview_profile/models/analysis.py b/deepview_profile/models/analysis.py index b3d9806..d1f0ef2 100644 --- a/deepview_profile/models/analysis.py +++ b/deepview_profile/models/analysis.py @@ -1,4 +1,3 @@ -from deepview_profile.models.source_map import Position class OperationInfo: diff --git a/deepview_profile/profiler/iteration.py b/deepview_profile/profiler/iteration.py index 831cc11..08e832a 100644 --- a/deepview_profile/profiler/iteration.py +++ b/deepview_profile/profiler/iteration.py @@ -97,7 +97,8 @@ def measure(iterations): while repetitions <= max_repetitions: doubled = repetitions * 2 greater = measure(doubled) / doubled - logger.debug("Iters: %d, Measured: %f (range: %f)", doubled, greater, max(lesser, greater) / min(lesser, greater)) + logger.debug("Iters: %d, Measured: %f (range: %f)",\ + doubled, greater, max(lesser, greater) / min(lesser, greater)) # Stop when the difference between the measurements is less than 5% if (max(lesser, greater) / min(lesser, greater)) < 1.05: @@ -221,6 +222,6 @@ def _select_batch_size(self, lower, upper, is_increasing): # models whose initial batch size is much smaller than the maximum possible. tiers = [100, 20, 10, 5] for t in tiers: - if diff >= t: return base + mult * t - + if diff >= t: + return base + mult * t return base + mult diff --git a/deepview_profile/protocol/message_handler.py b/deepview_profile/protocol/message_handler.py index 14f096d..ba7ce3e 100644 --- a/deepview_profile/protocol/message_handler.py +++ b/deepview_profile/protocol/message_handler.py @@ -2,7 +2,7 @@ import logging import os -from deepview_profile.exceptions import AnalysisError, NoConnectionError +from deepview_profile.exceptions import NoConnectionError import deepview_profile.protocol_gen.innpv_pb2 as pm @@ -80,9 +80,9 @@ def _handle_initialize_request(self, message, context): ) return - + if not _validate_paths(message.project_root, message.entry_point): - # Change this to the error related to + # Change this to the error related to self._message_sender.send_protocol_error( pm.ProtocolError.ErrorCode.UNSUPPORTED_PROTOCOL_VERSION, context, @@ -95,7 +95,8 @@ def _handle_initialize_request(self, message, context): logger.info("Connection addr:(%s:%d)", *context.address) logger.info("Project Root: %s", message.project_root) logger.info("Entry Point: %s", message.entry_point) - self._connection_manager.get_connection(context.address).set_project_paths(message.project_root, message.entry_point) + self._connection_manager.get_connection(context.address)\ + .set_project_paths(message.project_root, message.entry_point) context.state.initialized = True self._message_sender.send_initialize_response(context) @@ -150,9 +151,8 @@ def handle_message(self, raw_data, address): 'connected.', *address, ) - except: + except Exception: logger.exception( 'Processing message from (%s:%d) resulted in an exception.', *address, ) - diff --git a/deepview_profile/protocol/message_sender.py b/deepview_profile/protocol/message_sender.py index 318eab8..77afb84 100644 --- a/deepview_profile/protocol/message_sender.py +++ b/deepview_profile/protocol/message_sender.py @@ -2,9 +2,7 @@ import logging import pynvml import platform -from random import random -from deepview_profile.config import Config from deepview_profile.exceptions import NoConnectionError import deepview_profile.protocol_gen.innpv_pb2 as pm @@ -64,7 +62,7 @@ def send_throughput_response(self, throughput, context): def send_habitat_response(self, habitat_resp, context): self._send_message(habitat_resp, 'habitat', context) - + def send_energy_response(self, energy_resp, context): self._send_message(energy_resp, 'energy', context) diff --git a/deepview_profile/skyline.py b/deepview_profile/skyline.py index fb2fa70..94e5c90 100644 --- a/deepview_profile/skyline.py +++ b/deepview_profile/skyline.py @@ -1,8 +1,6 @@ import argparse -import enum import sys -import toml import deepview_profile import deepview_profile.commands.interactive diff --git a/deepview_profile/tests/test_lru_cache.py b/deepview_profile/tests/test_lru_cache.py index 0b31897..5acf625 100644 --- a/deepview_profile/tests/test_lru_cache.py +++ b/deepview_profile/tests/test_lru_cache.py @@ -118,7 +118,7 @@ def test_list_add_several(self): def test_list_move_three(self): n1 = self.list.add_to_front(1, 1) n2 = self.list.add_to_front(2, 2) - n3 = self.list.add_to_front(3, 3) + self.list.add_to_front(3, 3) self.list.move_to_front(n1) self.assertEqual(self.list_to_array(), [(1, 1), (3, 3), (2, 2)]) @@ -140,7 +140,7 @@ def test_list_move_three(self): def test_list_move_two(self): n1 = self.list.add_to_front(1, 1) - n2 = self.list.add_to_front(2, 2) + self.list.add_to_front(2, 2) self.assertEqual(self.list_to_array(), [(2, 2), (1, 1)]) self.list.move_to_front(n1) @@ -170,7 +170,7 @@ def test_list_remove_back_one(self): def test_list_remove_back_two(self): n1 = self.list.add_to_front(1, 1) - n2 = self.list.add_to_front(2, 2) + self.list.add_to_front(2, 2) self.assertEqual(self.list.size, 2) self.assertEqual(self.list_to_array(), [(2, 2), (1, 1)]) removed = self.list.remove_back() @@ -181,8 +181,8 @@ def test_list_remove_back_two(self): def test_list_remove_back_three(self): n1 = self.list.add_to_front(1, 1) - n2 = self.list.add_to_front(2, 2) - n3 = self.list.add_to_front(3, 3) + self.list.add_to_front(2, 2) + self.list.add_to_front(3, 3) self.assertEqual(self.list.size, 3) self.assertEqual(self.list_to_array(), [(3, 3), (2, 2), (1, 1)]) removed = self.list.remove_back() diff --git a/deepview_profile/tracking/memory/activations.py b/deepview_profile/tracking/memory/activations.py index 46dd5ed..08c1473 100644 --- a/deepview_profile/tracking/memory/activations.py +++ b/deepview_profile/tracking/memory/activations.py @@ -179,7 +179,7 @@ def _extract_gradient_functions_in_topological_order(model_output): topological ordering of their gradient functions. """ if isinstance(model_output, tuple) or isinstance(model_output, list): - tensors = _flatten_and_filter_tensors(tensor_iterable) + tensors = _flatten_and_filter_tensors(model_output) elif (isinstance(model_output, torch.Tensor) and model_output.grad_fn is not None): tensors = [model_output] diff --git a/deepview_profile/tracking/memory/report.py b/deepview_profile/tracking/memory/report.py index fa99223..cdaef5f 100644 --- a/deepview_profile/tracking/memory/report.py +++ b/deepview_profile/tracking/memory/report.py @@ -1,6 +1,5 @@ import collections import enum -import os from deepview_profile.tracking.base import ReportBase, ReportBuilderBase import deepview_profile.tracking.memory.report_queries as queries diff --git a/deepview_profile/tracking/memory/weights.py b/deepview_profile/tracking/memory/weights.py index 94e9512..ef3323c 100644 --- a/deepview_profile/tracking/memory/weights.py +++ b/deepview_profile/tracking/memory/weights.py @@ -1,5 +1,4 @@ import torch -import inspect import weakref from deepview_profile.tracking.base import TrackerBase diff --git a/deepview_profile/tracking/time/operation.py b/deepview_profile/tracking/time/operation.py index 9bf54dc..6d90c24 100644 --- a/deepview_profile/tracking/time/operation.py +++ b/deepview_profile/tracking/time/operation.py @@ -1,6 +1,5 @@ import collections -import torch from deepview_profile.tracking.call_stack import CallStack from deepview_profile.tracking.base import TrackerBase diff --git a/deepview_profile/tracking/time/report.py b/deepview_profile/tracking/time/report.py index 22363e4..13db70a 100644 --- a/deepview_profile/tracking/time/report.py +++ b/deepview_profile/tracking/time/report.py @@ -1,5 +1,4 @@ import collections -import os from deepview_profile.tracking.base import ReportBase, ReportBuilderBase import deepview_profile.tracking.time.report_queries as queries diff --git a/deepview_profile/tracking/utils.py b/deepview_profile/tracking/utils.py index 584ffeb..24efa40 100644 --- a/deepview_profile/tracking/utils.py +++ b/deepview_profile/tracking/utils.py @@ -1,6 +1,5 @@ import re -import torch DUNDER_REGEX = re.compile('__(?P.+)__') diff --git a/deepview_profile/user_code_utils.py b/deepview_profile/user_code_utils.py index 245d351..0e06f5f 100644 --- a/deepview_profile/user_code_utils.py +++ b/deepview_profile/user_code_utils.py @@ -1,5 +1,4 @@ import contextlib -import os import sys from deepview_profile.exceptions import exceptions_as_analysis_errors diff --git a/examples/densenet/densenet.py b/examples/densenet/densenet.py index 4abb257..5db3214 100644 --- a/examples/densenet/densenet.py +++ b/examples/densenet/densenet.py @@ -1,11 +1,9 @@ -import re import torch import torch.nn as nn import torch.nn.functional as F import torch.utils.checkpoint as cp from collections import OrderedDict from torch import Tensor -from torch.jit.annotations import List class _DenseLayer(nn.Module): diff --git a/examples/densenet/entry_point.py b/examples/densenet/entry_point.py index b4f480d..bfe34fe 100644 --- a/examples/densenet/entry_point.py +++ b/examples/densenet/entry_point.py @@ -1,5 +1,4 @@ import torch -import torch.nn as nn import densenet diff --git a/examples/gnmt/entry_point.py b/examples/gnmt/entry_point.py index 59ce534..eb6ccc6 100644 --- a/examples/gnmt/entry_point.py +++ b/examples/gnmt/entry_point.py @@ -4,10 +4,8 @@ import torch import torch.nn as nn import torch.optim -import torch.distributed as dist import seq2seq.data.config as config -import seq2seq.utils as utils from seq2seq.models.gnmt import GNMT from seq2seq.train.fp_optimizers import Fp32Optimizer from seq2seq.train.lr_scheduler import WarmupMultiStepLR diff --git a/examples/gnmt/seq2seq/data/sampler.py b/examples/gnmt/seq2seq/data/sampler.py index 204b560..b807b1f 100644 --- a/examples/gnmt/seq2seq/data/sampler.py +++ b/examples/gnmt/seq2seq/data/sampler.py @@ -5,7 +5,6 @@ from seq2seq.utils import get_rank from seq2seq.utils import get_world_size -from seq2seq.utils import gnmt_print class DistributedSampler(Sampler): diff --git a/examples/gnmt/seq2seq/data/tokenizer.py b/examples/gnmt/seq2seq/data/tokenizer.py index b2d9549..5020ed5 100644 --- a/examples/gnmt/seq2seq/data/tokenizer.py +++ b/examples/gnmt/seq2seq/data/tokenizer.py @@ -56,7 +56,7 @@ def pad_vocabulary(self, vocab, pad): assert len(vocab) % pad == 0 def get_state(self): - logging.info(f'Saving state of the tokenizer') + logging.info('Saving state of the tokenizer') state = { 'separator': self.separator, 'vocab_size': self.vocab_size, @@ -66,7 +66,7 @@ def get_state(self): return state def set_state(self, state): - logging.info(f'Restoring state of the tokenizer') + logging.info('Restoring state of the tokenizer') self.separator = state['separator'] self.vocab_size = state['vocab_size'] self.tok2idx = state['tok2idx'] diff --git a/examples/gnmt/seq2seq/inference/beam_search.py b/examples/gnmt/seq2seq/inference/beam_search.py index 11338b1..b9ff6a9 100644 --- a/examples/gnmt/seq2seq/inference/beam_search.py +++ b/examples/gnmt/seq2seq/inference/beam_search.py @@ -2,7 +2,6 @@ from seq2seq.data.config import BOS from seq2seq.data.config import EOS -from seq2seq.utils import gnmt_print class SequenceGenerator: diff --git a/examples/gnmt/seq2seq/inference/inference.py b/examples/gnmt/seq2seq/inference/inference.py index 5ec3a4b..01bac3f 100644 --- a/examples/gnmt/seq2seq/inference/inference.py +++ b/examples/gnmt/seq2seq/inference/inference.py @@ -113,7 +113,7 @@ def run(self, calc_bleu=True, epoch=None, iteration=None, eval_path=None, os.remove(detok_eval_path) rank = get_rank() - logging.info(f'Running evaluation on test set') + logging.info('Running evaluation on test set') self.model.eval() torch.cuda.empty_cache() @@ -131,12 +131,12 @@ def run(self, calc_bleu=True, epoch=None, iteration=None, eval_path=None, logging.info(f'BLEU on test dataset: {test_bleu[0]:.2f}') if self.target_bleu and test_bleu[0] >= self.target_bleu: - logging.info(f'Target accuracy reached') + logging.info('Target accuracy reached') break_training[0] = 1 barrier() torch.cuda.empty_cache() - logging.info(f'Finished evaluation on test set') + logging.info('Finished evaluation on test set') if self.distributed: dist.broadcast(break_training, 0) @@ -220,7 +220,7 @@ def evaluate(self, epoch, iteration, summary): if i % self.print_freq == 0: log = [] - log += f'TEST ' + log += 'TEST ' if epoch is not None: log += f'[{epoch}]' if iteration is not None: @@ -241,7 +241,7 @@ def evaluate(self, epoch, iteration, summary): if summary and get_rank() == 0: time_per_sentence = (batch_time.avg / global_batch_size) log = [] - log += f'TEST SUMMARY:\n' + log += 'TEST SUMMARY:\n' log += f'Lines translated: {len(self.loader.dataset)}\t' log += f'Avg total tokens/s: {tot_tok_per_sec.avg:.0f}\n' log += f'Avg time per batch: {batch_time.avg:.3f} s\t' diff --git a/examples/gnmt/seq2seq/models/gnmt.py b/examples/gnmt/seq2seq/models/gnmt.py index 4832f72..c71e283 100644 --- a/examples/gnmt/seq2seq/models/gnmt.py +++ b/examples/gnmt/seq2seq/models/gnmt.py @@ -4,7 +4,6 @@ from seq2seq.models.decoder import ResidualRecurrentDecoder from seq2seq.models.encoder import ResidualRecurrentEncoder from seq2seq.models.seq2seq_base import Seq2Seq -from seq2seq.utils import gnmt_print class GNMT(Seq2Seq): diff --git a/examples/gnmt/seq2seq/train/lr_scheduler.py b/examples/gnmt/seq2seq/train/lr_scheduler.py index de1d459..e7246e1 100644 --- a/examples/gnmt/seq2seq/train/lr_scheduler.py +++ b/examples/gnmt/seq2seq/train/lr_scheduler.py @@ -3,7 +3,6 @@ import torch -from seq2seq.utils import gnmt_print def perhaps_convert_float(param, total): @@ -64,8 +63,8 @@ def __init__(self, optimizer, iterations, warmup_steps=0, self.decay_steps = decay_steps if self.warmup_steps > self.remain_steps: - logging.warn(f'warmup_steps should not be larger than ' - f'remain_steps, setting warmup_steps=remain_steps') + logging.warn('warmup_steps should not be larger than ' + 'remain_steps, setting warmup_steps=remain_steps') self.warmup_steps = self.remain_steps super(WarmupMultiStepLR, self).__init__(optimizer, last_epoch) diff --git a/examples/gnmt/seq2seq/train/trainer.py b/examples/gnmt/seq2seq/train/trainer.py index e3c2a5f..bb3ec4a 100644 --- a/examples/gnmt/seq2seq/train/trainer.py +++ b/examples/gnmt/seq2seq/train/trainer.py @@ -13,7 +13,6 @@ from seq2seq.train.fp_optimizers import Fp32Optimizer from seq2seq.train.lr_scheduler import WarmupMultiStepLR from seq2seq.utils import AverageMeter -from seq2seq.utils import gnmt_print from seq2seq.utils import sync_workers diff --git a/examples/legacy/testnet2.py b/examples/legacy/testnet2.py index 5562589..28610b0 100644 --- a/examples/legacy/testnet2.py +++ b/examples/legacy/testnet2.py @@ -1,4 +1,3 @@ -import torch import torch.nn as nn diff --git a/examples/legacy/vgg11.py b/examples/legacy/vgg11.py index 5344300..96c18ba 100644 --- a/examples/legacy/vgg11.py +++ b/examples/legacy/vgg11.py @@ -1,4 +1,3 @@ -import torch import torch.nn as nn diff --git a/examples/resnet/entry_point.py b/examples/resnet/entry_point.py index 7a3d16a..e21d1bd 100644 --- a/examples/resnet/entry_point.py +++ b/examples/resnet/entry_point.py @@ -1,5 +1,4 @@ import torch -import torch.nn as nn import resnet diff --git a/examples/resnet/entry_point_resnext.py b/examples/resnet/entry_point_resnext.py index 4f69bb0..68c5fb2 100644 --- a/examples/resnet/entry_point_resnext.py +++ b/examples/resnet/entry_point_resnext.py @@ -1,5 +1,4 @@ import torch -import torch.nn as nn import resnet diff --git a/examples/testnet/testnet1.py b/examples/testnet/testnet1.py index d99917f..4ed3a68 100644 --- a/examples/testnet/testnet1.py +++ b/examples/testnet/testnet1.py @@ -1,4 +1,3 @@ -import torch import torch.nn as nn diff --git a/examples/transformer/transformer/Beam.py b/examples/transformer/transformer/Beam.py index 127b14f..6a52a1f 100644 --- a/examples/transformer/transformer/Beam.py +++ b/examples/transformer/transformer/Beam.py @@ -6,7 +6,6 @@ """ import torch -import numpy as np import transformer.Constants as Constants class Beam(): diff --git a/examples/vgg/entry_point.py b/examples/vgg/entry_point.py index 3214b1b..1c7f8b8 100644 --- a/examples/vgg/entry_point.py +++ b/examples/vgg/entry_point.py @@ -1,5 +1,4 @@ import torch -import torch.nn as nn import vgg diff --git a/poetry.lock b/poetry.lock index 9181f6b..c7c7f1e 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,3 +1,130 @@ +# This file is automatically @generated by Poetry 1.4.2 and should not be changed by hand. + +[[package]] +name = "cfgv" +version = "3.3.1" +description = "Validate configuration and produce human readable error messages." +category = "dev" +optional = false +python-versions = ">=3.6.1" +files = [ + {file = "cfgv-3.3.1-py2.py3-none-any.whl", hash = "sha256:c6a0883f3917a037485059700b9e75da2464e6c27051014ad85ba6aaa5884426"}, + {file = "cfgv-3.3.1.tar.gz", hash = "sha256:f5a830efb9ce7a445376bb66ec94c638a9787422f96264c98edc6bdeed8ab736"}, +] + +[[package]] +name = "colorama" +version = "0.4.6" +description = "Cross-platform colored terminal text." +category = "main" +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" +files = [ + {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, + {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, +] + +[[package]] +name = "deepview-predict" +version = "0.1.0" +description = "Cross-GPU performance predictions for PyTorch neural network training." +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "deepview_predict-0.1.0-py310-none-any.whl", hash = "sha256:be6ee2cc3e2e34ef2931299a5f04741317ee5e5201d1bc2c54818d2a25705f51"}, + {file = "deepview_predict-0.1.0-py37-none-any.whl", hash = "sha256:6f448f233c112097c1c19d893cae5c7db47a7ed5e3b1ca201cd1c36d631a7fde"}, + {file = "deepview_predict-0.1.0-py38-none-any.whl", hash = "sha256:50793705b1c538b6715e9ecd1febfd08b3ad8535c7224579c3868e4487d3341e"}, + {file = "deepview_predict-0.1.0-py39-none-any.whl", hash = "sha256:803f07ceabe120e2a6fcb4fd3452cbcb9e1e8ddb058ad6f688434c55ec40e2f8"}, +] + +[package.dependencies] +nvidia-cuda-cupti-cu11 = "11.7.101" +nvidia-cuda-runtime-cu11 = "11.7.99" +pandas = ">=1.1.2" +pyyaml = "*" +torch = ">=1.4.0" +tqdm = ">=4.49.0" + +[[package]] +name = "distlib" +version = "0.3.6" +description = "Distribution utilities" +category = "dev" +optional = false +python-versions = "*" +files = [ + {file = "distlib-0.3.6-py2.py3-none-any.whl", hash = "sha256:f35c4b692542ca110de7ef0bea44d73981caeb34ca0b9b6b2e6d7790dda8f80e"}, + {file = "distlib-0.3.6.tar.gz", hash = "sha256:14bad2d9b04d3a36127ac97f30b12a19268f211063d8f8ee4f47108896e11b46"}, +] + +[[package]] +name = "filelock" +version = "3.12.0" +description = "A platform independent file lock." +category = "dev" +optional = false +python-versions = ">=3.7" +files = [ + {file = "filelock-3.12.0-py3-none-any.whl", hash = "sha256:ad98852315c2ab702aeb628412cbf7e95b7ce8c3bf9565670b4eaecf1db370a9"}, + {file = "filelock-3.12.0.tar.gz", hash = "sha256:fc03ae43288c013d2ea83c8597001b1129db351aad9c57fe2409327916b8e718"}, +] + +[package.extras] +docs = ["furo (>=2023.3.27)", "sphinx (>=6.1.3)", "sphinx-autodoc-typehints (>=1.23,!=1.23.4)"] +testing = ["covdefaults (>=2.3)", "coverage (>=7.2.3)", "diff-cover (>=7.5)", "pytest (>=7.3.1)", "pytest-cov (>=4)", "pytest-mock (>=3.10)", "pytest-timeout (>=2.1)"] + +[[package]] +name = "identify" +version = "2.5.24" +description = "File identification library for Python" +category = "dev" +optional = false +python-versions = ">=3.7" +files = [ + {file = "identify-2.5.24-py2.py3-none-any.whl", hash = "sha256:986dbfb38b1140e763e413e6feb44cd731faf72d1909543178aa79b0e258265d"}, + {file = "identify-2.5.24.tar.gz", hash = "sha256:0aac67d5b4812498056d28a9a512a483f5085cc28640b02b258a59dac34301d4"}, +] + +[package.extras] +license = ["ukkonen"] + +[[package]] +name = "importlib-metadata" +version = "6.6.0" +description = "Read metadata from Python packages" +category = "dev" +optional = false +python-versions = ">=3.7" +files = [ + {file = "importlib_metadata-6.6.0-py3-none-any.whl", hash = "sha256:43dd286a2cd8995d5eaef7fee2066340423b818ed3fd70adf0bad5f1fac53fed"}, + {file = "importlib_metadata-6.6.0.tar.gz", hash = "sha256:92501cdf9cc66ebd3e612f1b4f0c0765dfa42f0fa38ffb319b6bd84dd675d705"}, +] + +[package.dependencies] +typing-extensions = {version = ">=3.6.4", markers = "python_version < \"3.8\""} +zipp = ">=0.5" + +[package.extras] +docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +perf = ["ipython"] +testing = ["flake8 (<5)", "flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pyfakefs", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)", "pytest-perf (>=0.9.2)"] + +[[package]] +name = "nodeenv" +version = "1.8.0" +description = "Node.js virtual environment builder" +category = "dev" +optional = false +python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*" +files = [ + {file = "nodeenv-1.8.0-py2.py3-none-any.whl", hash = "sha256:df865724bb3c3adc86b3876fa209771517b0cfe596beff01a92700e0e8be4cec"}, + {file = "nodeenv-1.8.0.tar.gz", hash = "sha256:d51e0c37e64fbf47d017feac3145cdbb58836d7eee8c6f6d3b6880c5456227d2"}, +] + +[package.dependencies] +setuptools = "*" + [[package]] name = "numpy" version = "1.21.1" @@ -5,6 +132,36 @@ description = "NumPy is the fundamental package for array computing with Python. category = "main" optional = false python-versions = ">=3.7" +files = [ + {file = "numpy-1.21.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:38e8648f9449a549a7dfe8d8755a5979b45b3538520d1e735637ef28e8c2dc50"}, + {file = "numpy-1.21.1-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:fd7d7409fa643a91d0a05c7554dd68aa9c9bb16e186f6ccfe40d6e003156e33a"}, + {file = "numpy-1.21.1-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:a75b4498b1e93d8b700282dc8e655b8bd559c0904b3910b144646dbbbc03e062"}, + {file = "numpy-1.21.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1412aa0aec3e00bc23fbb8664d76552b4efde98fb71f60737c83efbac24112f1"}, + {file = "numpy-1.21.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:e46ceaff65609b5399163de5893d8f2a82d3c77d5e56d976c8b5fb01faa6b671"}, + {file = "numpy-1.21.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:c6a2324085dd52f96498419ba95b5777e40b6bcbc20088fddb9e8cbb58885e8e"}, + {file = "numpy-1.21.1-cp37-cp37m-win32.whl", hash = "sha256:73101b2a1fef16602696d133db402a7e7586654682244344b8329cdcbbb82172"}, + {file = "numpy-1.21.1-cp37-cp37m-win_amd64.whl", hash = "sha256:7a708a79c9a9d26904d1cca8d383bf869edf6f8e7650d85dbc77b041e8c5a0f8"}, + {file = "numpy-1.21.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:95b995d0c413f5d0428b3f880e8fe1660ff9396dcd1f9eedbc311f37b5652e16"}, + {file = "numpy-1.21.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:635e6bd31c9fb3d475c8f44a089569070d10a9ef18ed13738b03049280281267"}, + {file = "numpy-1.21.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:4a3d5fb89bfe21be2ef47c0614b9c9c707b7362386c9a3ff1feae63e0267ccb6"}, + {file = "numpy-1.21.1-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:8a326af80e86d0e9ce92bcc1e65c8ff88297de4fa14ee936cb2293d414c9ec63"}, + {file = "numpy-1.21.1-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:791492091744b0fe390a6ce85cc1bf5149968ac7d5f0477288f78c89b385d9af"}, + {file = "numpy-1.21.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0318c465786c1f63ac05d7c4dbcecd4d2d7e13f0959b01b534ea1e92202235c5"}, + {file = "numpy-1.21.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:9a513bd9c1551894ee3d31369f9b07460ef223694098cf27d399513415855b68"}, + {file = "numpy-1.21.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:91c6f5fc58df1e0a3cc0c3a717bb3308ff850abdaa6d2d802573ee2b11f674a8"}, + {file = "numpy-1.21.1-cp38-cp38-win32.whl", hash = "sha256:978010b68e17150db8765355d1ccdd450f9fc916824e8c4e35ee620590e234cd"}, + {file = "numpy-1.21.1-cp38-cp38-win_amd64.whl", hash = "sha256:9749a40a5b22333467f02fe11edc98f022133ee1bfa8ab99bda5e5437b831214"}, + {file = "numpy-1.21.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:d7a4aeac3b94af92a9373d6e77b37691b86411f9745190d2c351f410ab3a791f"}, + {file = "numpy-1.21.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:d9e7912a56108aba9b31df688a4c4f5cb0d9d3787386b87d504762b6754fbb1b"}, + {file = "numpy-1.21.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:25b40b98ebdd272bc3020935427a4530b7d60dfbe1ab9381a39147834e985eac"}, + {file = "numpy-1.21.1-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:8a92c5aea763d14ba9d6475803fc7904bda7decc2a0a68153f587ad82941fec1"}, + {file = "numpy-1.21.1-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:05a0f648eb28bae4bcb204e6fd14603de2908de982e761a2fc78efe0f19e96e1"}, + {file = "numpy-1.21.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f01f28075a92eede918b965e86e8f0ba7b7797a95aa8d35e1cc8821f5fc3ad6a"}, + {file = "numpy-1.21.1-cp39-cp39-win32.whl", hash = "sha256:88c0b89ad1cc24a5efbb99ff9ab5db0f9a86e9cc50240177a571fbe9c2860ac2"}, + {file = "numpy-1.21.1-cp39-cp39-win_amd64.whl", hash = "sha256:01721eefe70544d548425a07c80be8377096a54118070b8a62476866d5208e33"}, + {file = "numpy-1.21.1-pp37-pypy37_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:2d4d1de6e6fb3d28781c73fbde702ac97f03d79e4ffd6598b880b2d95d62ead4"}, + {file = "numpy-1.21.1.zip", hash = "sha256:dff4af63638afcc57a3dfb9e4b26d434a7a602d225b42d746ea7fe2edf1342fd"}, +] [[package]] name = "nvidia-cublas-cu11" @@ -13,6 +170,30 @@ description = "CUBLAS native runtime libraries" category = "main" optional = false python-versions = ">=3" +files = [ + {file = "nvidia_cublas_cu11-11.10.3.66-py3-none-manylinux1_x86_64.whl", hash = "sha256:d32e4d75f94ddfb93ea0a5dda08389bcc65d8916a25cb9f37ac89edaeed3bded"}, + {file = "nvidia_cublas_cu11-11.10.3.66-py3-none-win_amd64.whl", hash = "sha256:8ac17ba6ade3ed56ab898a036f9ae0756f1e81052a317bf98f8c6d18dc3ae49e"}, +] + +[package.dependencies] +setuptools = "*" +wheel = "*" + +[[package]] +name = "nvidia-cuda-cupti-cu11" +version = "11.7.101" +description = "CUDA profiling tools runtime libs." +category = "main" +optional = false +python-versions = ">=3" +files = [ + {file = "nvidia_cuda_cupti_cu11-11.7.101-py3-none-manylinux1_x86_64.whl", hash = "sha256:e0cfd9854e1f2edaa36ca20d21cd0bdd5dcfca4e3b9e130a082e05b33b6c5895"}, + {file = "nvidia_cuda_cupti_cu11-11.7.101-py3-none-win_amd64.whl", hash = "sha256:7cc5b8f91ae5e1389c3c0ad8866b3b016a175e827ea8f162a672990a402ab2b0"}, +] + +[package.dependencies] +setuptools = "*" +wheel = "*" [[package]] name = "nvidia-cuda-nvrtc-cu11" @@ -21,6 +202,15 @@ description = "NVRTC native runtime libraries" category = "main" optional = false python-versions = ">=3" +files = [ + {file = "nvidia_cuda_nvrtc_cu11-11.7.99-2-py3-none-manylinux1_x86_64.whl", hash = "sha256:9f1562822ea264b7e34ed5930567e89242d266448e936b85bc97a3370feabb03"}, + {file = "nvidia_cuda_nvrtc_cu11-11.7.99-py3-none-manylinux1_x86_64.whl", hash = "sha256:f7d9610d9b7c331fa0da2d1b2858a4a8315e6d49765091d28711c8946e7425e7"}, + {file = "nvidia_cuda_nvrtc_cu11-11.7.99-py3-none-win_amd64.whl", hash = "sha256:f2effeb1309bdd1b3854fc9b17eaf997808f8b25968ce0c7070945c4265d64a3"}, +] + +[package.dependencies] +setuptools = "*" +wheel = "*" [[package]] name = "nvidia-cuda-runtime-cu11" @@ -29,6 +219,14 @@ description = "CUDA Runtime native Libraries" category = "main" optional = false python-versions = ">=3" +files = [ + {file = "nvidia_cuda_runtime_cu11-11.7.99-py3-none-manylinux1_x86_64.whl", hash = "sha256:cc768314ae58d2641f07eac350f40f99dcb35719c4faff4bc458a7cd2b119e31"}, + {file = "nvidia_cuda_runtime_cu11-11.7.99-py3-none-win_amd64.whl", hash = "sha256:bc77fa59a7679310df9d5c70ab13c4e34c64ae2124dd1efd7e5474b71be125c7"}, +] + +[package.dependencies] +setuptools = "*" +wheel = "*" [[package]] name = "nvidia-cudnn-cu11" @@ -37,6 +235,14 @@ description = "cuDNN runtime libraries" category = "main" optional = false python-versions = ">=3" +files = [ + {file = "nvidia_cudnn_cu11-8.5.0.96-2-py3-none-manylinux1_x86_64.whl", hash = "sha256:402f40adfc6f418f9dae9ab402e773cfed9beae52333f6d86ae3107a1b9527e7"}, + {file = "nvidia_cudnn_cu11-8.5.0.96-py3-none-manylinux1_x86_64.whl", hash = "sha256:71f8111eb830879ff2836db3cccf03bbd735df9b0d17cd93761732ac50a8a108"}, +] + +[package.dependencies] +setuptools = "*" +wheel = "*" [[package]] name = "nvidia-ml-py3" @@ -45,6 +251,90 @@ description = "Python Bindings for the NVIDIA Management Library" category = "main" optional = false python-versions = "*" +files = [ + {file = "nvidia-ml-py3-7.352.0.tar.gz", hash = "sha256:390f02919ee9d73fe63a98c73101061a6b37fa694a793abf56673320f1f51277"}, +] + +[[package]] +name = "pandas" +version = "1.1.5" +description = "Powerful data structures for data analysis, time series, and statistics" +category = "main" +optional = false +python-versions = ">=3.6.1" +files = [ + {file = "pandas-1.1.5-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:bf23a3b54d128b50f4f9d4675b3c1857a688cc6731a32f931837d72effb2698d"}, + {file = "pandas-1.1.5-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:5a780260afc88268a9d3ac3511d8f494fdcf637eece62fb9eb656a63d53eb7ca"}, + {file = "pandas-1.1.5-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:b61080750d19a0122469ab59b087380721d6b72a4e7d962e4d7e63e0c4504814"}, + {file = "pandas-1.1.5-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:0de3ddb414d30798cbf56e642d82cac30a80223ad6fe484d66c0ce01a84d6f2f"}, + {file = "pandas-1.1.5-cp36-cp36m-win32.whl", hash = "sha256:70865f96bb38fec46f7ebd66d4b5cfd0aa6b842073f298d621385ae3898d28b5"}, + {file = "pandas-1.1.5-cp36-cp36m-win_amd64.whl", hash = "sha256:19a2148a1d02791352e9fa637899a78e371a3516ac6da5c4edc718f60cbae648"}, + {file = "pandas-1.1.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:26fa92d3ac743a149a31b21d6f4337b0594b6302ea5575b37af9ca9611e8981a"}, + {file = "pandas-1.1.5-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:c16d59c15d946111d2716856dd5479221c9e4f2f5c7bc2d617f39d870031e086"}, + {file = "pandas-1.1.5-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:3be7a7a0ca71a2640e81d9276f526bca63505850add10206d0da2e8a0a325dae"}, + {file = "pandas-1.1.5-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:573fba5b05bf2c69271a32e52399c8de599e4a15ab7cec47d3b9c904125ab788"}, + {file = "pandas-1.1.5-cp37-cp37m-win32.whl", hash = "sha256:21b5a2b033380adbdd36b3116faaf9a4663e375325831dac1b519a44f9e439bb"}, + {file = "pandas-1.1.5-cp37-cp37m-win_amd64.whl", hash = "sha256:24c7f8d4aee71bfa6401faeba367dd654f696a77151a8a28bc2013f7ced4af98"}, + {file = "pandas-1.1.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:2860a97cbb25444ffc0088b457da0a79dc79f9c601238a3e0644312fcc14bf11"}, + {file = "pandas-1.1.5-cp38-cp38-manylinux1_i686.whl", hash = "sha256:5008374ebb990dad9ed48b0f5d0038124c73748f5384cc8c46904dace27082d9"}, + {file = "pandas-1.1.5-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:2c2f7c670ea4e60318e4b7e474d56447cf0c7d83b3c2a5405a0dbb2600b9c48e"}, + {file = "pandas-1.1.5-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:0a643bae4283a37732ddfcecab3f62dd082996021b980f580903f4e8e01b3c5b"}, + {file = "pandas-1.1.5-cp38-cp38-win32.whl", hash = "sha256:5447ea7af4005b0daf695a316a423b96374c9c73ffbd4533209c5ddc369e644b"}, + {file = "pandas-1.1.5-cp38-cp38-win_amd64.whl", hash = "sha256:4c62e94d5d49db116bef1bd5c2486723a292d79409fc9abd51adf9e05329101d"}, + {file = "pandas-1.1.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:731568be71fba1e13cae212c362f3d2ca8932e83cb1b85e3f1b4dd77d019254a"}, + {file = "pandas-1.1.5-cp39-cp39-manylinux1_i686.whl", hash = "sha256:c61c043aafb69329d0f961b19faa30b1dab709dd34c9388143fc55680059e55a"}, + {file = "pandas-1.1.5-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:2b1c6cd28a0dfda75c7b5957363333f01d370936e4c6276b7b8e696dd500582a"}, + {file = "pandas-1.1.5-cp39-cp39-win32.whl", hash = "sha256:c94ff2780a1fd89f190390130d6d36173ca59fcfb3fe0ff596f9a56518191ccb"}, + {file = "pandas-1.1.5-cp39-cp39-win_amd64.whl", hash = "sha256:edda9bacc3843dfbeebaf7a701763e68e741b08fccb889c003b0a52f0ee95782"}, + {file = "pandas-1.1.5.tar.gz", hash = "sha256:f10fc41ee3c75a474d3bdf68d396f10782d013d7f67db99c0efbfd0acb99701b"}, +] + +[package.dependencies] +numpy = ">=1.15.4" +python-dateutil = ">=2.7.3" +pytz = ">=2017.2" + +[package.extras] +test = ["hypothesis (>=3.58)", "pytest (>=4.0.2)", "pytest-xdist"] + +[[package]] +name = "platformdirs" +version = "3.5.1" +description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." +category = "dev" +optional = false +python-versions = ">=3.7" +files = [ + {file = "platformdirs-3.5.1-py3-none-any.whl", hash = "sha256:e2378146f1964972c03c085bb5662ae80b2b8c06226c54b2ff4aa9483e8a13a5"}, + {file = "platformdirs-3.5.1.tar.gz", hash = "sha256:412dae91f52a6f84830f39a8078cecd0e866cb72294a5c66808e74d5e88d251f"}, +] + +[package.dependencies] +typing-extensions = {version = ">=4.5", markers = "python_version < \"3.8\""} + +[package.extras] +docs = ["furo (>=2023.3.27)", "proselint (>=0.13)", "sphinx (>=6.2.1)", "sphinx-autodoc-typehints (>=1.23,!=1.23.4)"] +test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.3.1)", "pytest-cov (>=4)", "pytest-mock (>=3.10)"] + +[[package]] +name = "pre-commit" +version = "2.21.0" +description = "A framework for managing and maintaining multi-language pre-commit hooks." +category = "dev" +optional = false +python-versions = ">=3.7" +files = [ + {file = "pre_commit-2.21.0-py2.py3-none-any.whl", hash = "sha256:e2f91727039fc39a92f58a588a25b87f936de6567eed4f0e673e0507edc75bad"}, + {file = "pre_commit-2.21.0.tar.gz", hash = "sha256:31ef31af7e474a8d8995027fefdfcf509b5c913ff31f2015b4ec4beb26a6f658"}, +] + +[package.dependencies] +cfgv = ">=2.0.0" +identify = ">=1.0.0" +importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} +nodeenv = ">=0.11.1" +pyyaml = ">=5.1" +virtualenv = ">=20.10.0" [[package]] name = "protobuf" @@ -53,6 +343,29 @@ description = "Protocol Buffers" category = "main" optional = false python-versions = ">=3.5" +files = [ + {file = "protobuf-3.18.3-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:370a6b885e94adda021d4cbe43accdfbf6a02af651a0be337a28906a3fa77f3d"}, + {file = "protobuf-3.18.3-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6741d7d1cfcbdd6cf610f38b7976cf8c0b41022203555298925e4061b6616608"}, + {file = "protobuf-3.18.3-cp36-cp36m-win32.whl", hash = "sha256:3149c373e9b7ce296bb24d42a3eb677d620185b5dff2c390b2cf57baf79afdc1"}, + {file = "protobuf-3.18.3-cp36-cp36m-win_amd64.whl", hash = "sha256:850da2072d98c6e576b7eb29734cdde6fd9f5d157e43d7818d79f4b373ef5d51"}, + {file = "protobuf-3.18.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:0c44e01f74109decea196b5b313b08edb5316df77313995594a6981e95674259"}, + {file = "protobuf-3.18.3-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:85d1fb5ff1d638a0045bbe4f01a8f287023aa4f2b29011445b1be0edc74a2103"}, + {file = "protobuf-3.18.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cde2a73b03049b904dbc5d0f500b97e11abb4109dbe2940e6a1595e2eef4e8a9"}, + {file = "protobuf-3.18.3-cp37-cp37m-win32.whl", hash = "sha256:b03966ca4d1aa7850f5bf0d841c22a8eeb6ce091f77e585ffeb8b95a6b0a96c4"}, + {file = "protobuf-3.18.3-cp37-cp37m-win_amd64.whl", hash = "sha256:d52a687e2c74c40f45abd6906f833d4e40f0f8cfa4226a80e4695fedafe6c57e"}, + {file = "protobuf-3.18.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:700787cb56b4cb7b8ed5f7d197b9d8f30080f257f3c7431eec1fdd8060660929"}, + {file = "protobuf-3.18.3-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:e9bffd52d6ee039a1cafb72475b2900c6fd0f0dca667fb7a09af0a3e119e78cb"}, + {file = "protobuf-3.18.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8117b52c2531e4033f7d02b9be5a78564da41a8b02c255e1b731ad4bd75e7dc0"}, + {file = "protobuf-3.18.3-cp38-cp38-win32.whl", hash = "sha256:15cdecb0d192ab5f17cdc21a9c0ae7b5c6c4451e42c8a888a4f3344c190e369c"}, + {file = "protobuf-3.18.3-cp38-cp38-win_amd64.whl", hash = "sha256:e68ad00695547d9397dd14abd3efba23cb31cef67228f4512d41396971889812"}, + {file = "protobuf-3.18.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:474247630834f93214fafce49d2ee6ff4c036c8c5382b88432b7eae6f08f131b"}, + {file = "protobuf-3.18.3-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:a7f91a4e5bf3cc58b2830c9cb01b04ac5e211c288048e9296cd407ec0455fb89"}, + {file = "protobuf-3.18.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6380aae2683d0d1b41199e591c8ba06f867e8a778d44309af87073c1b34a9f3a"}, + {file = "protobuf-3.18.3-cp39-cp39-win32.whl", hash = "sha256:98d414513ec44bb3ba77ebdeffcbbe6ebbf3630c767d37a285890c2414fdd4e2"}, + {file = "protobuf-3.18.3-cp39-cp39-win_amd64.whl", hash = "sha256:93bca9aaeee8008e15696c2a6b5e56b992da03f9d237ff54310e397d635f8305"}, + {file = "protobuf-3.18.3-py2.py3-none-any.whl", hash = "sha256:abbcb8ecd19cfb729b9b71f9a453e37c0c1c017be4bff47804ff25150685386d"}, + {file = "protobuf-3.18.3.tar.gz", hash = "sha256:196a153e487c0e20d62259872bbf2e1c4fa18e2ce97e20984fcbf9d8b151058d"}, +] [[package]] name = "pyrapl" @@ -61,12 +374,43 @@ description = "" category = "main" optional = false python-versions = ">=3.7" +files = [ + {file = "pyRAPL-0.2.3.1-py2.py3-none-any.whl", hash = "sha256:508c832f7f80fd32e9fdd1194630483c68fdde40bf540537b47502d37295ec76"}, + {file = "pyRAPL-0.2.3.1.tar.gz", hash = "sha256:c92e7e0644ceee2e55a312d515fc35de8941abd8d810095383e02183afa29b77"}, +] [package.extras] docs = ["sphinx (>=1.8.1)", "sphinx-autodoc-typehints (>=1.6.0)"] mongodb = ["pymongo (>=3.9.0)"] pandas = ["pandas (>=0.25.1)"] +[[package]] +name = "python-dateutil" +version = "2.8.2" +description = "Extensions to the standard Python datetime module" +category = "main" +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" +files = [ + {file = "python-dateutil-2.8.2.tar.gz", hash = "sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86"}, + {file = "python_dateutil-2.8.2-py2.py3-none-any.whl", hash = "sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9"}, +] + +[package.dependencies] +six = ">=1.5" + +[[package]] +name = "pytz" +version = "2023.3" +description = "World timezone definitions, modern and historical" +category = "main" +optional = false +python-versions = "*" +files = [ + {file = "pytz-2023.3-py2.py3-none-any.whl", hash = "sha256:a151b3abb88eda1d4e34a9814df37de2a80e301e68ba0fd856fb9b46bfbbbffb"}, + {file = "pytz-2023.3.tar.gz", hash = "sha256:1d8ce29db189191fb55338ee6d0387d82ab59f3d00eac103412d64e0ebd0c588"}, +] + [[package]] name = "pyyaml" version = "6.0" @@ -74,6 +418,104 @@ description = "YAML parser and emitter for Python" category = "main" optional = false python-versions = ">=3.6" +files = [ + {file = "PyYAML-6.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d4db7c7aef085872ef65a8fd7d6d09a14ae91f691dec3e87ee5ee0539d516f53"}, + {file = "PyYAML-6.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9df7ed3b3d2e0ecfe09e14741b857df43adb5a3ddadc919a2d94fbdf78fea53c"}, + {file = "PyYAML-6.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:77f396e6ef4c73fdc33a9157446466f1cff553d979bd00ecb64385760c6babdc"}, + {file = "PyYAML-6.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a80a78046a72361de73f8f395f1f1e49f956c6be882eed58505a15f3e430962b"}, + {file = "PyYAML-6.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:f84fbc98b019fef2ee9a1cb3ce93e3187a6df0b2538a651bfb890254ba9f90b5"}, + {file = "PyYAML-6.0-cp310-cp310-win32.whl", hash = "sha256:2cd5df3de48857ed0544b34e2d40e9fac445930039f3cfe4bcc592a1f836d513"}, + {file = "PyYAML-6.0-cp310-cp310-win_amd64.whl", hash = "sha256:daf496c58a8c52083df09b80c860005194014c3698698d1a57cbcfa182142a3a"}, + {file = "PyYAML-6.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:d4b0ba9512519522b118090257be113b9468d804b19d63c71dbcf4a48fa32358"}, + {file = "PyYAML-6.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:81957921f441d50af23654aa6c5e5eaf9b06aba7f0a19c18a538dc7ef291c5a1"}, + {file = "PyYAML-6.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:afa17f5bc4d1b10afd4466fd3a44dc0e245382deca5b3c353d8b757f9e3ecb8d"}, + {file = "PyYAML-6.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:dbad0e9d368bb989f4515da330b88a057617d16b6a8245084f1b05400f24609f"}, + {file = "PyYAML-6.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:432557aa2c09802be39460360ddffd48156e30721f5e8d917f01d31694216782"}, + {file = "PyYAML-6.0-cp311-cp311-win32.whl", hash = "sha256:bfaef573a63ba8923503d27530362590ff4f576c626d86a9fed95822a8255fd7"}, + {file = "PyYAML-6.0-cp311-cp311-win_amd64.whl", hash = "sha256:01b45c0191e6d66c470b6cf1b9531a771a83c1c4208272ead47a3ae4f2f603bf"}, + {file = "PyYAML-6.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:897b80890765f037df3403d22bab41627ca8811ae55e9a722fd0392850ec4d86"}, + {file = "PyYAML-6.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:50602afada6d6cbfad699b0c7bb50d5ccffa7e46a3d738092afddc1f9758427f"}, + {file = "PyYAML-6.0-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:48c346915c114f5fdb3ead70312bd042a953a8ce5c7106d5bfb1a5254e47da92"}, + {file = "PyYAML-6.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:98c4d36e99714e55cfbaaee6dd5badbc9a1ec339ebfc3b1f52e293aee6bb71a4"}, + {file = "PyYAML-6.0-cp36-cp36m-win32.whl", hash = "sha256:0283c35a6a9fbf047493e3a0ce8d79ef5030852c51e9d911a27badfde0605293"}, + {file = "PyYAML-6.0-cp36-cp36m-win_amd64.whl", hash = "sha256:07751360502caac1c067a8132d150cf3d61339af5691fe9e87803040dbc5db57"}, + {file = "PyYAML-6.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:819b3830a1543db06c4d4b865e70ded25be52a2e0631ccd2f6a47a2822f2fd7c"}, + {file = "PyYAML-6.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:473f9edb243cb1935ab5a084eb238d842fb8f404ed2193a915d1784b5a6b5fc0"}, + {file = "PyYAML-6.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0ce82d761c532fe4ec3f87fc45688bdd3a4c1dc5e0b4a19814b9009a29baefd4"}, + {file = "PyYAML-6.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:231710d57adfd809ef5d34183b8ed1eeae3f76459c18fb4a0b373ad56bedcdd9"}, + {file = "PyYAML-6.0-cp37-cp37m-win32.whl", hash = "sha256:c5687b8d43cf58545ade1fe3e055f70eac7a5a1a0bf42824308d868289a95737"}, + {file = "PyYAML-6.0-cp37-cp37m-win_amd64.whl", hash = "sha256:d15a181d1ecd0d4270dc32edb46f7cb7733c7c508857278d3d378d14d606db2d"}, + {file = "PyYAML-6.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:0b4624f379dab24d3725ffde76559cff63d9ec94e1736b556dacdfebe5ab6d4b"}, + {file = "PyYAML-6.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:213c60cd50106436cc818accf5baa1aba61c0189ff610f64f4a3e8c6726218ba"}, + {file = "PyYAML-6.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9fa600030013c4de8165339db93d182b9431076eb98eb40ee068700c9c813e34"}, + {file = "PyYAML-6.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:277a0ef2981ca40581a47093e9e2d13b3f1fbbeffae064c1d21bfceba2030287"}, + {file = "PyYAML-6.0-cp38-cp38-win32.whl", hash = "sha256:d4eccecf9adf6fbcc6861a38015c2a64f38b9d94838ac1810a9023a0609e1b78"}, + {file = "PyYAML-6.0-cp38-cp38-win_amd64.whl", hash = "sha256:1e4747bc279b4f613a09eb64bba2ba602d8a6664c6ce6396a4d0cd413a50ce07"}, + {file = "PyYAML-6.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:055d937d65826939cb044fc8c9b08889e8c743fdc6a32b33e2390f66013e449b"}, + {file = "PyYAML-6.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e61ceaab6f49fb8bdfaa0f92c4b57bcfbea54c09277b1b4f7ac376bfb7a7c174"}, + {file = "PyYAML-6.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d67d839ede4ed1b28a4e8909735fc992a923cdb84e618544973d7dfc71540803"}, + {file = "PyYAML-6.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cba8c411ef271aa037d7357a2bc8f9ee8b58b9965831d9e51baf703280dc73d3"}, + {file = "PyYAML-6.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:40527857252b61eacd1d9af500c3337ba8deb8fc298940291486c465c8b46ec0"}, + {file = "PyYAML-6.0-cp39-cp39-win32.whl", hash = "sha256:b5b9eccad747aabaaffbc6064800670f0c297e52c12754eb1d976c57e4f74dcb"}, + {file = "PyYAML-6.0-cp39-cp39-win_amd64.whl", hash = "sha256:b3d267842bf12586ba6c734f89d1f5b871df0273157918b0ccefa29deb05c21c"}, + {file = "PyYAML-6.0.tar.gz", hash = "sha256:68fb519c14306fec9720a2a5b45bc9f0c8d1b9c72adf45c37baedfcd949c35a2"}, +] + +[[package]] +name = "ruff" +version = "0.0.267" +description = "An extremely fast Python linter, written in Rust." +category = "dev" +optional = false +python-versions = ">=3.7" +files = [ + {file = "ruff-0.0.267-py3-none-macosx_10_7_x86_64.whl", hash = "sha256:4adbbbe314d8fcc539a245065bad89446a3cef2e0c9cf70bf7bb9ed6fe31856d"}, + {file = "ruff-0.0.267-py3-none-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:67254ae34c38cba109fdc52e4a70887de1f850fb3971e5eeef343db67305d1c1"}, + {file = "ruff-0.0.267-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bbe104f21a429b77eb5ac276bd5352fd8c0e1fbb580b4c772f77ee8c76825654"}, + {file = "ruff-0.0.267-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:db33deef2a5e1cf528ca51cc59dd764122a48a19a6c776283b223d147041153f"}, + {file = "ruff-0.0.267-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9adf1307fa9d840d1acaa477eb04f9702032a483214c409fca9dc46f5f157fe3"}, + {file = "ruff-0.0.267-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:0afca3633c8e2b6c0a48ad0061180b641b3b404d68d7e6736aab301c8024c424"}, + {file = "ruff-0.0.267-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2972241065b1c911bce3db808837ed10f4f6f8a8e15520a4242d291083605ab6"}, + {file = "ruff-0.0.267-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f731d81cb939e757b0335b0090f18ca2e9ff8bcc8e6a1cf909245958949b6e11"}, + {file = "ruff-0.0.267-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:20c594eb56c19063ef5a57f89340e64c6550e169d6a29408a45130a8c3068adc"}, + {file = "ruff-0.0.267-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:45d61a2b01bdf61581a2ee039503a08aa603dc74a6bbe6fb5d1ce3052f5370e5"}, + {file = "ruff-0.0.267-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:2107cec3699ca4d7bd41543dc1d475c97ae3a21ea9212238b5c2088fa8ee7722"}, + {file = "ruff-0.0.267-py3-none-musllinux_1_2_i686.whl", hash = "sha256:786de30723c71fc46b80a173c3313fc0dbe73c96bd9da8dd1212cbc2f84cdfb2"}, + {file = "ruff-0.0.267-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:5a898953949e37c109dd242cfcf9841e065319995ebb7cdfd213b446094a942f"}, + {file = "ruff-0.0.267-py3-none-win32.whl", hash = "sha256:d12ab329474c46b96d962e2bdb92e3ad2144981fe41b89c7770f370646c0101f"}, + {file = "ruff-0.0.267-py3-none-win_amd64.whl", hash = "sha256:d09aecc9f5845586ba90911d815f9772c5a6dcf2e34be58c6017ecb124534ac4"}, + {file = "ruff-0.0.267-py3-none-win_arm64.whl", hash = "sha256:7df7eb5f8d791566ba97cc0b144981b9c080a5b861abaf4bb35a26c8a77b83e9"}, + {file = "ruff-0.0.267.tar.gz", hash = "sha256:632cec7bbaf3c06fcf0a72a1dd029b7d8b7f424ba95a574aaa135f5d20a00af7"}, +] + +[[package]] +name = "setuptools" +version = "67.7.2" +description = "Easily download, build, install, upgrade, and uninstall Python packages" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "setuptools-67.7.2-py3-none-any.whl", hash = "sha256:23aaf86b85ca52ceb801d32703f12d77517b2556af839621c641fca11287952b"}, + {file = "setuptools-67.7.2.tar.gz", hash = "sha256:f104fa03692a2602fa0fec6c6a9e63b6c8a968de13e17c026957dd1f53d80990"}, +] + +[package.extras] +docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-hoverxref (<2)", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (==0.8.3)", "sphinx-reredirects", "sphinxcontrib-towncrier"] +testing = ["build[virtualenv]", "filelock (>=3.4.0)", "flake8 (<5)", "flake8-2020", "ini2toml[lite] (>=0.9)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pip (>=19.1)", "pip-run (>=8.8)", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)", "pytest-perf", "pytest-timeout", "pytest-xdist", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] +testing-integration = ["build[virtualenv]", "filelock (>=3.4.0)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pytest", "pytest-enabler", "pytest-xdist", "tomli", "virtualenv (>=13.0.0)", "wheel"] + +[[package]] +name = "six" +version = "1.16.0" +description = "Python 2 and 3 compatibility utilities" +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" +files = [ + {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, + {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, +] [[package]] name = "toml" @@ -82,6 +524,10 @@ description = "Python Library for Tom's Obvious, Minimal Language" category = "main" optional = false python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" +files = [ + {file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"}, + {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, +] [[package]] name = "torch" @@ -90,6 +536,29 @@ description = "Tensors and Dynamic neural networks in Python with strong GPU acc category = "main" optional = false python-versions = ">=3.7.0" +files = [ + {file = "torch-1.13.1-cp310-cp310-manylinux1_x86_64.whl", hash = "sha256:fd12043868a34a8da7d490bf6db66991108b00ffbeecb034228bfcbbd4197143"}, + {file = "torch-1.13.1-cp310-cp310-manylinux2014_aarch64.whl", hash = "sha256:d9fe785d375f2e26a5d5eba5de91f89e6a3be5d11efb497e76705fdf93fa3c2e"}, + {file = "torch-1.13.1-cp310-cp310-win_amd64.whl", hash = "sha256:98124598cdff4c287dbf50f53fb455f0c1e3a88022b39648102957f3445e9b76"}, + {file = "torch-1.13.1-cp310-none-macosx_10_9_x86_64.whl", hash = "sha256:393a6273c832e047581063fb74335ff50b4c566217019cc6ace318cd79eb0566"}, + {file = "torch-1.13.1-cp310-none-macosx_11_0_arm64.whl", hash = "sha256:0122806b111b949d21fa1a5f9764d1fd2fcc4a47cb7f8ff914204fd4fc752ed5"}, + {file = "torch-1.13.1-cp311-cp311-manylinux1_x86_64.whl", hash = "sha256:22128502fd8f5b25ac1cd849ecb64a418382ae81dd4ce2b5cebaa09ab15b0d9b"}, + {file = "torch-1.13.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:76024be052b659ac1304ab8475ab03ea0a12124c3e7626282c9c86798ac7bc11"}, + {file = "torch-1.13.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:ea8dda84d796094eb8709df0fcd6b56dc20b58fdd6bc4e8d7109930dafc8e419"}, + {file = "torch-1.13.1-cp37-cp37m-win_amd64.whl", hash = "sha256:2ee7b81e9c457252bddd7d3da66fb1f619a5d12c24d7074de91c4ddafb832c93"}, + {file = "torch-1.13.1-cp37-none-macosx_10_9_x86_64.whl", hash = "sha256:0d9b8061048cfb78e675b9d2ea8503bfe30db43d583599ae8626b1263a0c1380"}, + {file = "torch-1.13.1-cp37-none-macosx_11_0_arm64.whl", hash = "sha256:f402ca80b66e9fbd661ed4287d7553f7f3899d9ab54bf5c67faada1555abde28"}, + {file = "torch-1.13.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:727dbf00e2cf858052364c0e2a496684b9cb5aa01dc8a8bc8bbb7c54502bdcdd"}, + {file = "torch-1.13.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:df8434b0695e9ceb8cc70650afc1310d8ba949e6db2a0525ddd9c3b2b181e5fe"}, + {file = "torch-1.13.1-cp38-cp38-win_amd64.whl", hash = "sha256:5e1e722a41f52a3f26f0c4fcec227e02c6c42f7c094f32e49d4beef7d1e213ea"}, + {file = "torch-1.13.1-cp38-none-macosx_10_9_x86_64.whl", hash = "sha256:33e67eea526e0bbb9151263e65417a9ef2d8fa53cbe628e87310060c9dcfa312"}, + {file = "torch-1.13.1-cp38-none-macosx_11_0_arm64.whl", hash = "sha256:eeeb204d30fd40af6a2d80879b46a7efbe3cf43cdbeb8838dd4f3d126cc90b2b"}, + {file = "torch-1.13.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:50ff5e76d70074f6653d191fe4f6a42fdbe0cf942fbe2a3af0b75eaa414ac038"}, + {file = "torch-1.13.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:2c3581a3fd81eb1f0f22997cddffea569fea53bafa372b2c0471db373b26aafc"}, + {file = "torch-1.13.1-cp39-cp39-win_amd64.whl", hash = "sha256:0aa46f0ac95050c604bcf9ef71da9f1172e5037fdf2ebe051962d47b123848e7"}, + {file = "torch-1.13.1-cp39-none-macosx_10_9_x86_64.whl", hash = "sha256:6930791efa8757cb6974af73d4996b6b50c592882a324b8fb0589c6a9ba2ddaf"}, + {file = "torch-1.13.1-cp39-none-macosx_11_0_arm64.whl", hash = "sha256:e0df902a7c7dd6c795698532ee5970ce898672625635d885eade9976e5a04949"}, +] [package.dependencies] nvidia-cublas-cu11 = {version = "11.10.3.66", markers = "platform_system == \"Linux\""} @@ -101,6 +570,27 @@ typing-extensions = "*" [package.extras] opt-einsum = ["opt-einsum (>=3.3)"] +[[package]] +name = "tqdm" +version = "4.65.0" +description = "Fast, Extensible Progress Meter" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "tqdm-4.65.0-py3-none-any.whl", hash = "sha256:c4f53a17fe37e132815abceec022631be8ffe1b9381c2e6e30aa70edc99e9671"}, + {file = "tqdm-4.65.0.tar.gz", hash = "sha256:1871fb68a86b8fb3b59ca4cdd3dcccbc7e6d613eeed31f4c332531977b89beb5"}, +] + +[package.dependencies] +colorama = {version = "*", markers = "platform_system == \"Windows\""} + +[package.extras] +dev = ["py-make (>=0.1.0)", "twine", "wheel"] +notebook = ["ipywidgets (>=6)"] +slack = ["slack-sdk"] +telegram = ["requests"] + [[package]] name = "typing-extensions" version = "4.5.0" @@ -108,22 +598,65 @@ description = "Backported and Experimental Type Hints for Python 3.7+" category = "main" optional = false python-versions = ">=3.7" +files = [ + {file = "typing_extensions-4.5.0-py3-none-any.whl", hash = "sha256:fb33085c39dd998ac16d1431ebc293a8b3eedd00fd4a32de0ff79002c19511b4"}, + {file = "typing_extensions-4.5.0.tar.gz", hash = "sha256:5cb5f4a79139d699607b3ef622a1dedafa84e115ab0024e0d9c044a9479ca7cb"}, +] + +[[package]] +name = "virtualenv" +version = "20.23.0" +description = "Virtual Python Environment builder" +category = "dev" +optional = false +python-versions = ">=3.7" +files = [ + {file = "virtualenv-20.23.0-py3-none-any.whl", hash = "sha256:6abec7670e5802a528357fdc75b26b9f57d5d92f29c5462ba0fbe45feacc685e"}, + {file = "virtualenv-20.23.0.tar.gz", hash = "sha256:a85caa554ced0c0afbd0d638e7e2d7b5f92d23478d05d17a76daeac8f279f924"}, +] + +[package.dependencies] +distlib = ">=0.3.6,<1" +filelock = ">=3.11,<4" +importlib-metadata = {version = ">=6.4.1", markers = "python_version < \"3.8\""} +platformdirs = ">=3.2,<4" + +[package.extras] +docs = ["furo (>=2023.3.27)", "proselint (>=0.13)", "sphinx (>=6.1.3)", "sphinx-argparse (>=0.4)", "sphinxcontrib-towncrier (>=0.2.1a0)", "towncrier (>=22.12)"] +test = ["covdefaults (>=2.3)", "coverage (>=7.2.3)", "coverage-enable-subprocess (>=1)", "flaky (>=3.7)", "packaging (>=23.1)", "pytest (>=7.3.1)", "pytest-env (>=0.8.1)", "pytest-freezegun (>=0.4.2)", "pytest-mock (>=3.10)", "pytest-randomly (>=3.12)", "pytest-timeout (>=2.1)", "setuptools (>=67.7.1)", "time-machine (>=2.9)"] + +[[package]] +name = "wheel" +version = "0.40.0" +description = "A built-package format for Python" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "wheel-0.40.0-py3-none-any.whl", hash = "sha256:d236b20e7cb522daf2390fa84c55eea81c5c30190f90f29ae2ca1ad8355bf247"}, + {file = "wheel-0.40.0.tar.gz", hash = "sha256:cd1196f3faee2b31968d626e1731c94f99cbdb67cf5a46e4f5656cbee7738873"}, +] + +[package.extras] +test = ["pytest (>=6.0.0)"] + +[[package]] +name = "zipp" +version = "3.15.0" +description = "Backport of pathlib-compatible object wrapper for zip files" +category = "dev" +optional = false +python-versions = ">=3.7" +files = [ + {file = "zipp-3.15.0-py3-none-any.whl", hash = "sha256:48904fc76a60e542af151aded95726c1a5c34ed43ab4134b597665c86d7ad556"}, + {file = "zipp-3.15.0.tar.gz", hash = "sha256:112929ad649da941c23de50f356a2b5570c954b65150642bccdd66bf194d224b"}, +] + +[package.extras] +docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)"] [metadata] -lock-version = "1.1" +lock-version = "2.0" python-versions = "^3.7" -content-hash = "9ef847cc37187c3ac9c9d15c14106fcf4a6e3a8e37f76f01dede2a55f8246db9" - -[metadata.files] -numpy = [] -nvidia-cublas-cu11 = [] -nvidia-cuda-nvrtc-cu11 = [] -nvidia-cuda-runtime-cu11 = [] -nvidia-cudnn-cu11 = [] -nvidia-ml-py3 = [] -protobuf = [] -pyrapl = [] -pyyaml = [] -toml = [] -torch = [] -typing-extensions = [] +content-hash = "36965fd0e199aa0f54dcaa642274c1af727cbb9d2cfda7d171123ea80137e943" diff --git a/pyproject.toml b/pyproject.toml index 9ebf294..b2f1837 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -36,6 +36,13 @@ deepview-predict = "*" [tool.poetry.dev-dependencies] +[tool.poetry.group.dev.dependencies] +ruff = "^0.0.267" +pre-commit = "2.21.0" + [build-system] requires = ["poetry-core>=1.0.0"] build-backend = "poetry.core.masonry.api" + +[tool.ruff] +extend-exclude = ["examples", "deepview_profile/protocol_gen/"] diff --git a/test/test_database.py b/test/test_database.py index f1e63ef..d2c81be 100644 --- a/test/test_database.py +++ b/test/test_database.py @@ -2,6 +2,7 @@ import random import deepview_profile.db.database as database + class MockDatabaseInterface(database.DatabaseInterface): def __del__(self): if os.path.exists("test.sqlite"): @@ -10,30 +11,39 @@ def __del__(self): class TestSkylineDatabase: test_database: MockDatabaseInterface = MockDatabaseInterface("test.sqlite") - energy_table_interface: database.EnergyTableInterface = database.EnergyTableInterface(test_database.connection) + energy_table_interface: database.EnergyTableInterface = ( + database.EnergyTableInterface(test_database.connection) + ) # Test if energy table is created def test_energy_table_is_created(self): - query_result = self.test_database.connection.execute("SELECT name from sqlite_schema WHERE type='table' and name ='ENERGY';") + query_result = self.test_database.connection.execute( + "SELECT name from sqlite_schema WHERE type='table' and name ='ENERGY';" + ) query_result_list = query_result.fetchall() - assert(len(query_result_list) > 0) + assert len(query_result_list) > 0 # try adding invalid entry and test if it is added def test_invalid_entry_too_short(self): - assert(self.energy_table_interface.is_valid_entry([]) == False) - + assert self.energy_table_interface.is_valid_entry([]) is False + def test_invalid_entry_too_long(self): - assert(self.energy_table_interface.is_valid_entry([1,2,3,4,5]) == False) + assert self.energy_table_interface.is_valid_entry([1, 2, 3, 4, 5]) is False def test_invalid_entry_wrong_types(self): - assert(self.energy_table_interface.is_valid_entry([None, None, None, None, None]) == False) + assert ( + self.energy_table_interface.is_valid_entry([None, None, None, None, None]) + is False + ) def test_adding_valid_entry(self): params = ["entry_point", random.random(), random.random(), random.randint()] self.energy_table_interface.add_entry(params) - query_result = self.test_database.connection.execute("SELECT * FROM ENERGY;").fetchone() + query_result = self.test_database.connection.execute( + "SELECT * FROM ENERGY;" + ).fetchone() # params is passed in by reference so it have the timestamp in it - assert(query_result == tuple(params)) + assert query_result == tuple(params) # add 10 valid entries and get top 3 def test_get_latest_n_entries_of_entry_point(self): @@ -41,13 +51,22 @@ def test_get_latest_n_entries_of_entry_point(self): params = ["entry_point", random.random(), random.random(), random.randint()] self.energy_table_interface.add_entry(params) for _ in range(20): - params = ["other_entry_point", random.random(), random.random(), random.randint()] + params = [ + "other_entry_point", + random.random(), + random.random(), + random.randint(), + ] self.energy_table_interface.add_entry(params) entries = [] for _ in range(3): params = ["entry_point", random.random(), random.random(), random.randint()] entries.insert(0, params) self.energy_table_interface.add_entry(params) - latest_n_entries = self.energy_table_interface.get_latest_n_entries_of_entry_point(3, "entry_point") + latest_n_entries = ( + self.energy_table_interface.get_latest_n_entries_of_entry_point( + 3, "entry_point" + ) + ) entries = [tuple(entry) for entry in entries] - assert(entries == latest_n_entries) + assert entries == latest_n_entries diff --git a/test/test_driver.py b/test/test_driver.py index b67fb0d..6d5351b 100644 --- a/test/test_driver.py +++ b/test/test_driver.py @@ -1,6 +1,7 @@ import pytest -from utils import * +import json +from utils import SkylineSession, BackendContext with open("config.json", "r") as fp: config = json.load(fp) @@ -8,7 +9,7 @@ tests = list() for entry_point in config["entry_points"]: tests.append((config["skyline_bin"], entry_point)) - + @pytest.mark.parametrize("skyline_bin,entry_point", tests) def test_entry_point(skyline_bin, entry_point): print(f"Testing {entry_point}") @@ -16,14 +17,15 @@ def test_entry_point(skyline_bin, entry_point): context.spawn_process() sess = SkylineSession() - while context.state == 0: pass + while context.state == 0: + pass sess.connect("localhost", 60120) sess.send_initialize_request() sess.send_analysis_request() - while len(sess.received_messages) < 4: pass + while len(sess.received_messages) < 4: + pass sess.cleanup() context.terminate() assert(len(sess.received_messages) == 4) - diff --git a/test/utils.py b/test/utils.py index 55ebc69..1991f11 100644 --- a/test/utils.py +++ b/test/utils.py @@ -6,12 +6,15 @@ from deepview_profile.protocol_gen import innpv_pb2 + def stream_monitor(stream, callback=None): try: - for line in stream: callback(line) - except OSError as e: + for line in stream: + callback(line) + except OSError: print(f"Closing listener for stream {stream}") + def socket_monitor(socket, callback=None): try: while True: @@ -19,9 +22,10 @@ def socket_monitor(socket, callback=None): msg = socket.recv(msg_len) print(f"Received message of length {msg_len}") callback(msg) - except OSError as e: + except OSError: print(f"Closing listener for socket {socket}") + class BackendContext: def __init__(self, skyline_bin, entry_point): self.process = None @@ -45,10 +49,19 @@ def spawn_process(self): launch_command = [self.skyline_bin, "interactive", entry_filename] # Launch backend + listener threads for stdout and stderr - self.process = subprocess.Popen(launch_command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=working_dir) - self.stdout_thread = threading.Thread(target=stream_monitor, args=(self.process.stdout, self.on_message_stdout)) + self.process = subprocess.Popen( + launch_command, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + cwd=working_dir, + ) + self.stdout_thread = threading.Thread( + target=stream_monitor, args=(self.process.stdout, self.on_message_stdout) + ) self.stdout_thread.start() - self.stderr_thread = threading.Thread(target=stream_monitor, args=(self.process.stderr, self.on_message_stderr)) + self.stderr_thread = threading.Thread( + target=stream_monitor, args=(self.process.stderr, self.on_message_stderr) + ) self.stderr_thread.start() def join(self): @@ -58,8 +71,8 @@ def terminate(self): self.process.terminate() self.stdout_thread.join() self.stderr_thread.join() - - + + class SkylineSession: def __init__(self): self.seq_num = 0 @@ -69,7 +82,9 @@ def connect(self, addr, port): self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) self.socket.connect((addr, port)) - self.listener_thread = threading.Thread(target=socket_monitor, args=(self.socket, self.handle_message)) + self.listener_thread = threading.Thread( + target=socket_monitor, args=(self.socket, self.handle_message) + ) self.listener_thread.start() def send_message(self, message): @@ -97,7 +112,7 @@ def send_analysis_request(self): request = innpv_pb2.AnalysisRequest() request.mock_response = False self.send_message(request) - + def handle_message(self, message): from_server = innpv_pb2.FromServer() from_server.ParseFromString(message) @@ -111,5 +126,3 @@ def cleanup(self): # Closing the socket should cause the listener thread to die self.socket.close() self.listener_thread.join() - -