scripts/coxph_preprocessing.py [198:227]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    preprocessor_output_path = os.path.join(
        "/opt/ml/processing/transformer", "preprocessor.joblib"
    )
    joblib.dump(preprocessor, preprocessor_output_path)

    train_features_output_path = os.path.join(
        "/opt/ml/processing/train", "train_features.csv"
    )

    test_features_output_path = os.path.join(
        "/opt/ml/processing/test", "test_features.csv"
    )

    logger.info(f"Saving training data to {train_features_output_path}")

    pd.DataFrame(train_features, columns=feature_names).to_csv(
        train_features_output_path, header=True, index=False
    )

    logger.info(f"Saving test data to {test_features_output_path}")
    pd.DataFrame(test_features, columns=feature_names).to_csv(
        test_features_output_path, header=True, index=False
    )


if __name__ == "__main__":
    parser = argparse.ArgumentParser()
    parser.add_argument("--database", type=str, required=True)
    parser.add_argument("--region", type=str, required=True)
    parser.add_argument("--table", type=str, required=True)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



scripts/preprocessing.py [211:240]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    preprocessor_output_path = os.path.join(
        "/opt/ml/processing/transformer", "preprocessor.joblib"
    )
    joblib.dump(preprocessor, preprocessor_output_path)

    train_features_output_path = os.path.join(
        "/opt/ml/processing/train", "train_features.csv"
    )

    test_features_output_path = os.path.join(
        "/opt/ml/processing/test", "test_features.csv"
    )

    logger.info(f"Saving training data to {train_features_output_path}")

    pd.DataFrame(train_features, columns=feature_names).to_csv(
        train_features_output_path, header=True, index=False
    )

    logger.info(f"Saving test data to {test_features_output_path}")
    pd.DataFrame(test_features, columns=feature_names).to_csv(
        test_features_output_path, header=True, index=False
    )


if __name__ == "__main__":
    parser = argparse.ArgumentParser()
    parser.add_argument("--database", type=str, required=True)
    parser.add_argument("--region", type=str, required=True)
    parser.add_argument("--table", type=str, required=True)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



