<jupyter_start><jupyter_text>Matrix Calculator With ClustersThis uses Sagemaker to run the model as a Processing Job on a very large server<jupyter_code># from sagemaker import get_execution_role
from sagemaker.processing import ProcessingInput, ProcessingOutput
from sagemaker.sklearn.processing import SKLearnProcessor
# role = get_execution_role()

sklearn_processor = SKLearnProcessor(framework_version = '0.20.0', # Specify Version of Scikit-learn
                                     role = "AmazonSageMaker-ExecutionRole-20211115T123876", # Specify Role Created for Security
                                     instance_type = 'ml.m5.24xlarge', # Specify Instance Type
                                     instance_count = 1)<jupyter_output><empty_output><jupyter_text>This code runs a background job<jupyter_code>sklearn_processor.run(code='processing.py', #This script does all the processing, make changes here
                      inputs=[ProcessingInput(
                          source="songdata.csv",
                          destination='/opt/ml/processing/input')],
                      outputs=[ProcessingOutput(
                          output_name='songlist',
                          source='/opt/ml/processing/output')]
                     )<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.07461538461538461, 'fraction_numerical': 0.016923076923076923, 'mean_word_length': 2.3530927835051547, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '510710', 'license': 'MIT', 'n_tokens_mistral': 355, 'n_tokens_neox': 320, 'n_words': 76, 'path': 'model/RunSagemakerModel.ipynb', 'repo_name': 'DVA-Project-Sp22/dva-project', 'size': '1300'}