def normalize_mnist( X_train: np.ndarray, X_test: np.ndarray ) -> Output(X_train_normed=np.ndarray, X_test_normed=np.ndarray): """Normalize the values for all the images so they are between 0 and 1""" X_train_normed = X_train / 255.0 X_test_normed = X_test / 255.0 return X_train_normed, X_test_normed
def importer() -> Output(X_train=np.ndarray, y_train=np.ndarray, X_test=np.ndarray, y_test=np.ndarray): """Download the MNIST data store it as numpy arrays.""" (X_train, y_train), (X_test, y_test) = tf.keras.datasets.mnist.load_data() return X_train, y_train, X_test, y_test
def importer_mnist() -> Output( X_train=np.ndarray, y_train=np.ndarray, X_test=np.ndarray, y_test=np.ndarray ): """Download the MNIST data store it as an artifact""" (X_train, y_train), ( X_test, y_test, ) = tf.keras.datasets.mnist.load_data() return X_train, y_train, X_test, y_test
def importer() -> Output(train_df=pd.DataFrame, test_df=pd.DataFrame): """Download the MNIST data store it as numpy arrays.""" (X_train, y_train), ( X_test, y_test, ) = tf.keras.datasets.boston_housing.load_data() train_df = convert_np_to_pandas(X_train, y_train) test_df = convert_np_to_pandas(X_test, y_test) return train_df, test_df
def dynamic_importer( config: ImporterConfig, ) -> Output(X_train=np.ndarray, y_train=np.ndarray, X_test=np.ndarray, y_test=np.ndarray): """Downloads the latest data from a mock API.""" X_train, y_train = get_X_y_from_api(n_days=config.n_days, is_train=True) X_test, y_test = get_X_y_from_api(n_days=config.n_days, is_train=False) return X_train, y_train, X_test, y_test
def some_step(shared_name: int) -> Output(shared_name=int): return shared_name
def some_step() -> Output(some_output=int, some_other_output=str): pass
def some_step() -> Output(some_output=int): pass