Documentation
This is the documentation of the Grasshopper components in ARA.
The documentation of AIXD: AI-eXtended Design tookit can be found here.
DataBool
Defines a boolean variable (True or False).
Inputs
name (str) – Name of the variable.
dim (int) – Dimension of the variable.
Outputs
dataobject – Data object.
DataCategorical
Defines a categorical variable (for example, represening labels or classes).
Inputs
name (str) – Name of the variable.
dim (int) – Dimension of the variable.
options [List of (str)] – Options: list of possible categories, as strings.
Outputs
dataobject – Data object.
DataInt
Defines an integer-valued variable.
Inputs
name (str) – Name of the variable.
dim (int) – Dimension of the variable.
domain (interval) – Domain of the variable as an interval.
Outputs
dataobject – Data object.
DataObjectsNames
Generates panels with list of names of data objects for all existing data blocks.
Inputs
get_names (bool) – Set to True to run.
DataReal
Defines a real-valued variable.
Inputs
name (str) – Name of the variable.
dim (int) – Dimension of the variable.
domain (interval) – Domain of the variable as an interval.
Outputs
dataobject – Data object.
DatasetCreate
Creates a dataset object. This defines the structure of the dataset. It does not cointain any data.
Inputs
design_parameters [List of (none)] – Design parameters: list of data objects.
performance_attributes [List of (none)] – Performance attributes: list of data objects.
create (bool) – Set to True to create a dataset object. If a dataset already exists in the project path, nothing will happen. To create a new dataset, change the project path or dataset name or delete the existing dataset.
Outputs
msg – Message or error.
DatasetGenerator
Provides instructions on how to generate random samples for the dataset by harnessing the parametric model found in the current Grasshopper file. See Tutorial for more information on how to prepare the inputs and outputs of the parametric model.
Outputs
instructions – Information on how to run the dataset_generator script.
DatasetLoad
Loads an existing dataset from the file system, from the location specified in the project setup. It loads the dataset object and the data into the app.
Inputs
load (bool) – Set to True to load the dataset.
Outputs
msg –
DatasetOneSample
Retrieves one sample from the dataset (at a given or random index) and instantiates it in the parametric model. Requires a dataset to be loaded.
Inputs
item (int) – Index of the sample in the dataset, optional. If not provided, a random index will be selected.
get (bool) – Set to True to retrieve a sample.
Outputs
sample_summary – Summary of the retrieved sample.
DatasetSummary
Provides a summary of the dataset. Requires a dataset to be loaded.
Inputs
get (bool) – Set to True to get the summary of the dataset.
Outputs
summary – Summary of the dataset.
Generator
Runs a generation campaing to create new designs using the trained model. Requires a dataset and a trained model to be loaded.
Inputs
requested_values [List of (str)] – List of requested values, each formatted as a string with the following format: ‘variable_name:value’.
n_designs (int) – Number of designs to generate.
generate (bool) – Set to True to start the generation process.
clear (bool) – Forget the previously generated designs.
pick_previous (bool) – Iterate backward through the list of generated designs, instantiate the previous sample.
pick_next (bool) – Iterate forward through the list of generated designs, instantiate the next sample.
Outputs
sample_summary – Selected sample.
ModelDimensions
Retrieves dimensions of the model’s input and output layers. Requires that a model has been set up or loaded.
Inputs
get (bool) – Set to True to retrieve input and output dimensions of the model.
Outputs
summary – Summary of the model’s input and output dimensions.
ModelLoad
Loads an existing, pre-traind neural network model from a checkpoint. Requires a dataset to be loaded.
Inputs
model_type (str) – Type of the autoencoder model. Options are: ‘CAE’ (conditional Autoencoder) and ‘CVAE’ (conditional Variational Autoencoder). Default: ‘CAE’.
checkpoint_name (str) – Name of the checkpoint file to load the model from, without the file extension. The file’s extension must be .ckpt
checkpoint_path (str) – Path to the directory containing the checkpoint file.
load (bool) – Set to True to load the model.
Outputs
msg – Confirmation of the model loading, or an error message.
ModelSetup
Sets up an autoencoder model of the specified type with the given parameters. Requires a dataset to be loaded.
Inputs
model_type (str) – Type of the autoencoder model. Options are: ‘CAE’ (conditional Autoencoder) and ‘CVAE’ (conditional Variational Autoencoder). Default: ‘CAE’.
features [List of (str)] – List of variable names to be used as input to the model.
targets [List of (str)] – List of variable names to be used as output from the model.
latent_dim (int) – Dimension of the latent space.
hidden_layers [List of (int)] – Width of each hidden layer (list of int).
batch_size (int) – Size of the training batches
set (bool) – Set to True to set up the model.
Outputs
quick_summary – Quick summary of the model.
model_dims – Input and output dimensions of the model.
ModelSummary
Provides a summary of the autoencoder model’s architecture. Requires that a model has been set up or loaded.
Inputs
max_depth (int) – Sets the depth of the summary. The larger the depth, the more detailed the summary.
get (bool) – Retrieves the model information.
Outputs
summary – Model summary.
ModelTrain
Runs a training campaign. Requires that a model has been set up (to train from scratch) or loaded (to continue training).
Inputs
epochs (int) – Number of training epochs.
wb (str) – Weights&Biases: username or team name. If not set, W&B will not be used.
run (bool) – Set to True to start training.
Outputs
best_ckpt – Filename of the best performing checkpoint.
path – Path to all checkpoints.
PlotContours
Plots the distribution contours for each pair of variables from the data in the dataset. Launches an interactive plot in a browser. Requires a dataset to be loaded.
Inputs
variables [List of (str)] – List of names of the variables to be plotted.
plot (bool) – Set to True to (re-)create the plot.
PlotContoursRequest
Plots the predicted values of the requested designs against the distribution contours for each pair of the corresponding variables. Launches an interactive plot in a browser. Requires that a request has been made and designs have been generated.
Inputs
plot (bool) – Set to True to (re-)create the plot.
PlotCorrelations
Plots correlation matrix for the given variables from the data in the dataset. Launches an interactive plot in a browser. Requires a dataset to be loaded.
Inputs
variables [List of (str)] – List of names of the variables to be plotted.
plot (bool) – Set to True to (re-)create the plot.
PlotDistribution
Plots the distribution of the given variables from the data in the dataset. Launches an interactive plot in a browser. Requires a dataset to be loaded.
Inputs
variables [List of (str)] – List of names of the variables to be plotted.
plot (bool) – Set to True to (re-)create the plot.
ProjectSetup
Sets up the project in the folder given by project_root/project_name.
Inputs
set (bool) –
project_root (str) – Path to the project root folder. If none is given, the default is the parent folder of this Grasshopper file.
project_name (str) – Any name for the project. It will be used to create a folder with the same name in the project root folder. All files will be later saved here.
Outputs
msg – Messages and errors.
path – Effective path to the project.
Reset
Resets the current project running in this Grasshopper file.
Inputs
reset (bool) – Set to True to reset.
Server
Starts and stops the app server.
Inputs
start (bool) – Starts the server.
stop (bool) – Stops the server.
show_window (bool) – If True, the server window will be shown. If False, the server window will be hidden. Default: True.
Outputs
msg – Messages or errors.
ShowFolder
Reveals the folder in the file explorer.
Inputs
path (str) – Path to the (local) folder.
open (bool) – Set to True to open the folder in the file explorer.