Upload Your Placement Rules

To successfully complete this tutorial we will need to upload the placement rules that our simulation will reference. In the section of this documentation titled "Simulation Structure," we review all the various components of your simulation in detail.

Upload placement rules with python

Lexset maintains a python package that is designed to help you manage your simulations and integrate synthetic data into your existing data pipeline.

Install the lexsetAPI python package with pip.

pip install lexsetAPI==1.2.5

Then you will locate the local folder where your placement rules are stored.

placementRulePath = "./placement_rules/"
placementRule = "livingroom_coreweave.yaml"

Next, you will upload the placement rules to the Lexset cloud.

lexset.addRules(<YOUR USER ID>,placementRule,placementRulePath)

This is what your python script should look like.

Note: Your user ID is available on your account page. See "Setup Your Account" for more information.

import lexsetAPI as lexset

placementRulePath = "./placement_rules/"
placementRule = "livingroom_coreweave.yaml"

lexset.addRules(<YOUR USER ID>,placementRule,placementRulePath)

If successful the function will print the file path on our cloud for you to use in your pipeline configuration.

{"filepaths":["/general/lexset/Seahaven3/Users/3/PlacementRules/livingroom_coreweave.yaml"]}

Try to repeat this for each of the placement rules.

Last updated