Last active
September 6, 2022 17:07
-
-
Save joshreini1/468711c75a89ae8e85cd7ab17651b7af to your computer and use it in GitHub Desktop.
Set up TruEra workspace, split data and add data collection
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import truera | |
#set up TruEra workspace | |
from truera.client.truera_workspace import TrueraWorkspace | |
from truera.client.truera_authentication import BasicAuthentication | |
auth = BasicAuthentication(USERNAME, PASSWORD) | |
tru = TrueraWorkspace(CONNECTION_STRING, auth, verify_cert = False) | |
tru.set_environment("remote") | |
tru.set_project("airbnb_sf_price", score_type="regression") | |
#create data collection or schema | |
tru.add_data_collection(data_collection_name = "sf_data_collection_v1", | |
pre_to_post_feature_map = feature_map_data, | |
provide_transform_with_model=True) | |
#add data splits to collection | |
tru.add_data_split("train", pre_data = X_train, label_data=y_train, split_type="train") | |
tru.add_data_split("test", pre_data = X_test, label_data=y_test, split_type="test") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment