Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
368115d
Created archived folder and moved all workshop notebooks with 0 views…
jsmul Jun 13, 2024
71c8b22
Moved 10 notebooks with 0 views into archived/notebooks
jsmul Jun 18, 2024
6105782
Moved 13 0 view notebooks to archived
jsmul Jun 18, 2024
61be3ee
Merge branch 'aws:main' into main
jsmul Jun 20, 2024
f900e97
Deleted 17 duplicate notebooks
jsmul Jun 20, 2024
e9da3ca
Deleted 17 duplicate notebooks (#4685)
jsmul Jun 20, 2024
2283df7
Update SMP v2 notebooks to use latest PyTorch 2.3.1, TSM 2.4.0 releas…
viclzhu Jun 24, 2024
a2f465f
Updated README, removed broken links and fixed markdown (#4687)
jsmul Jun 25, 2024
b997b4d
Parsash2 patch 1 (#4690)
parsash2 Jun 27, 2024
d674719
Archived remaining geospatial example notebooks
jsmul Jun 27, 2024
ab57853
Removed geospatial from README.md
jsmul Jun 27, 2024
d33b3b6
New Folder Structure Implementation - Archived remaining geospatial e…
jsmul Jun 27, 2024
5b35f90
Archived remaining workshop notebooks
jsmul Jun 27, 2024
32a97e8
Archived outdated example notebooks between 1-90 views
jsmul Jun 28, 2024
9278731
MLflow setup (#4689)
bobbywlindsey Jul 2, 2024
e5635da
feat: Model monitor json support for Explainability and Bias (#4696)
zicanl-amazon Jul 5, 2024
be54c95
initial commit of Blog content: "using step decorator for bedrock fin…
ashrawat Jul 8, 2024
970d88e
New folder structure (#4694)
zhaoqizqwang Jul 9, 2024
4f6b1f6
Revert "New folder structure (#4694)" (#4701)
zhaoqizqwang Jul 9, 2024
8ed2600
archived 17 notebookswith outdated/redundant funtionality
jsmul Jul 16, 2024
6bfdd6a
adding notebook for forecast to canvas workshop (#4704)
pro-biswa Jul 17, 2024
0f2ada1
Adds notebook for deploying and monitoring llm on sagemaker usin fmev…
brentfriedman725 Jul 18, 2024
56af658
archived 20 notebooks with outdated/redundant functionality
jsmul Jul 18, 2024
4089a47
archived 20 notebooks with outdated/redundant funtionality
jsmul Jul 19, 2024
2b35298
archived 20 notebooks with outdated/redundant funtionality
jsmul Jul 19, 2024
8fe936d
archived 21 notebooks with outdated/redundant funtionality
jsmul Jul 19, 2024
3753f80
archived 19 notebooks with outdated/redundant funtionality
jsmul Jul 19, 2024
30fb0c8
restored pytorch_multi_model_endpoint back from archived
jsmul Jul 19, 2024
d05b48d
Merge branch 'aws:main' into main
jsmul Jul 23, 2024
b79a8a9
Merge pull request #1 from jsmul/duplicate-removal
jsmul Jul 23, 2024
4e56365
Merge pull request #2 from jsmul/archive-geospatial
jsmul Jul 23, 2024
709c67b
Merge pull request #3 from jsmul/archived-workshops
jsmul Jul 23, 2024
195d6dc
Merge pull request #4 from jsmul/batch-archival-06-27
jsmul Jul 23, 2024
78c4dad
Merge pull request #5 from jsmul/batch-archive-15Jul
jsmul Jul 23, 2024
32e3a68
Merge pull request #6 from jsmul/batch-archive-18july-1
jsmul Jul 23, 2024
73a1cca
Merge pull request #7 from jsmul/batch-archive-19july-1
jsmul Jul 23, 2024
c9c753b
Merge pull request #8 from jsmul/batch-archive-19july-2
jsmul Jul 23, 2024
ab08f7a
Merge pull request #9 from jsmul/batch-archive-19july-3
jsmul Jul 23, 2024
c6e25a8
Merge branch 'main' into batch-archive-19july-4
jsmul Jul 23, 2024
19a5ed1
Merge pull request #10 from jsmul/batch-archive-19july-4
jsmul Jul 23, 2024
4fc61ab
removed redundant notebooks folder from archived - all notebooks now …
jsmul Jul 23, 2024
675b818
added new folders for new file structure
jsmul Jul 23, 2024
3e69c17
added gitkeep files to show folders on github
jsmul Jul 23, 2024
592826c
archived one notebook that was missed
jsmul Jul 23, 2024
da71d05
Merge pull request #11 from jsmul/example-26july
jsmul Jul 23, 2024
4d00824
introducing new file structure - part 1
jsmul Jul 24, 2024
11323b4
Update README.md
jsmul Jul 24, 2024
bdf8986
moved unsorted file back to top level to maintain links
jsmul Jul 24, 2024
9a51471
archived recently marked, and removed folder names from file names
jsmul Jul 25, 2024
fe78666
new file structure: renamed and moved all evaluated notebooks as of 2…
jsmul Jul 26, 2024
b2def75
new file structure: organized new files and files that still need to …
jsmul Jul 26, 2024
baab858
Update README.md
jsmul Jul 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import numpy as np
import pandas as pd
from sklearn.model_selection import train_test_split
import os

# Define the input and output paths
input_path = '/opt/ml/processing/input/feature-selection-query-id.csv'
train_output_path = '/opt/ml/processing/output/train/train.csv'
val_output_path = '/opt/ml/processing/output/validation/val.csv'
test_output_path = '/opt/ml/processing/output/test/test.csv'

# Read the input data
df = pd.read_csv(input_path, header=None)

# Split the data into training, validation, and test sets
train, temp = train_test_split(df, test_size=0.3, random_state=42)
val, test = train_test_split(temp, test_size=0.5, random_state=42)

# Save the splits to the output paths
os.makedirs(os.path.dirname(train_output_path), exist_ok=True)
train.to_csv(train_output_path, index=False)

os.makedirs(os.path.dirname(val_output_path), exist_ok=True)
val.to_csv(val_output_path, index=False)

os.makedirs(os.path.dirname(test_output_path), exist_ok=True)
test.to_csv(test_output_path, index=False)

# Print the sizes of the splits
print(f"Training set: {len(train)} samples")
print(f"Validation set: {len(val)} samples")
print(f"Test set: {len(test)} samples")
Loading