Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoSign in
Socket

flops-utils

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flops-utils - pypi Package Compare versions

Comparing version
0.4.5
to
0.4.6
+20
flops_utils/flops_learner_files_wrapper.py
# Note: This wrapper is used to provide ML repo developers/users with mock FLOps Learner components.
# E.g. The ML repo developer does not have access to any data of the worker nodes yet.
# This data will be fetched by the Learner's data_loading from the Data Manager Sidecar.
# This data_loading is part of the Learner image and should be abstracted away from the ML repo.
# To be able to include the data_loading methods in the ML repo code these mocks are provided.
# These mocks will be replaced with the real implementation during the FLOps image build process.
import sys
from flops_utils.logging import logger
def load_ml_data():
try:
from data_loading import load_data_from_worker_node # type: ignore
return load_data_from_worker_node()
except ImportError:
logger.exception("The data_loading file was not found.")
sys.exit(1)
+4
-4

@@ -5,11 +5,11 @@ from abc import ABC, abstractmethod

class LearnerDataManagerTemplate(ABC):
class DataManagerTemplate(ABC):
@abstractmethod
def get_data(self) -> Tuple[Any, Any]:
"""Gets the necessary data for training and evaluation.
"""Get the necessary data for training and evaluation.
This data has already been prepared/preprocessed.
Examples:
- self.training_data, self.testing_data
which were set in the init like this: tf.keras.datasets.cifar10.load_data()
"""

@@ -22,3 +22,3 @@

def prepare_data(self) -> None:
"""Gets the date from the DataManager and makes it available to the model.
"""Gets the data from the DataManager and makes it available to the model.
Make sure to now prepare the data in the ModelManager init function.

@@ -25,0 +25,0 @@ This will avoid the aggregator from trying and fetch the data too.

Metadata-Version: 2.1
Name: flops_utils
Version: 0.4.5
Version: 0.4.6
Summary: A library containing commong utilities for FLOps

@@ -5,0 +5,0 @@ Author: Alexander Malyuk

[tool.poetry]
name = "flops_utils"
version = "0.4.5"
version = "0.4.6"
description = "A library containing commong utilities for FLOps"

@@ -5,0 +5,0 @@ authors = ["Alexander Malyuk <malyuk.alexander1999@gmail.com>"]