Cerebras Cluster settings#
Credentials path and management address#
The params credentials_path
and mgmt_address
are configured by default in /opt/cerebras/config
and do not need to be explicitly provided.
For example, /opt/cerebras/config
could look as follows:
{
"clusters": [
{
"name": "system-name",
"server": "1.2.3.4:9000",
"authority": "cluster-server.system-name.example.com",
"certificateAuthority": "/opt/cerebras/certs/tls.crt"
}
],
"contexts": [
{
"cluster": "cluster-name",
"name": "system-name"
}
],
"currentContext": "system-name"
}
Python paths and mount directories#
It is important to pass the paths that are needed by the dataloaders and external Python packages in addition to the path in which the Cerebras Model Zoo resides.
For example, let’s assume the following directory structure:
/path/to/datasets
my_dataset/
/path/to/modelzoo
modelzoo
/path/to/packages
package_x
package_y
Let’s further assume input workers need to access my_dataset
directory to read the data and it needs python modules from packages modelzoo
, package_x
, and package_y
. In order for the workers to access all these info, we need to specify the command as follows:
(venv_cerebras_pt) $ python run.py \
CSX \
--params params.yaml \
--mode {train,eval,eval_all,train_and_eval} \
--mount_dirs /path/to/datasets /path/to/modelzoo /path/to/packages \
--python_paths /path/to/packages /path/to/modelzoo \
Note
If some paths share a common parent folder, only the parent folder needs to be specified for the given argument.
For example, if modelzoo path is /cb/home/user/modelzoo
, and data path is /cb/home/user/data
, you only need to specify --mount_dirs /cb/home
.
To simplify the command line arguments, you can define defaults for both mount_dirs
and python_paths
in a YAML file and export that file to an environment variable as follows:
(venv_cerebras_pt) $ export CEREBRAS_WAFER_SCALE_CLUSTER_DEFAULTS=/path/to/defaults/file.yaml
When this env variable is set in a Cerebras ModelZoo run, there is no need to pass --mount_dirs
and --python_paths
to the commandline unless you wish to add paths in addition to the defaults.