Skip to main content
Version: 0.8.0

Tracking

It helps developers use submarine's internal data caching, data exchange, and task tracking capabilities to more efficiently improve the development and execution of machine learning productivity

  • Allow data scientist to track distributed ML experiment
  • Support store ML parameters and metrics in Submarine-server
  • Support hdfs, S3 and mysql (Currently we only support mysql)

Functional api​

submarine.get_tracking_uri() -> str​

Get the tracking URI. If none has been specified, check the environmental variables. If uri is still none, return the default submarine jdbc url.

Returns

The tracking URI.


submarine.set_tracking_uri(uri) -> None​

set the tracking URI. You can also set the SUBMARINE_TRACKING_URI environment variable to have Submarine find a URI from there. The URI should be database connection string.

ParamTypeDescriptionDefault Value
uriStringSubmarine record data to Mysql server. The database URL is expected in the format <dialect>+<driver>://<username>:<password>@<host>:<port>/<database>.By default it's mysql+pymysql://submarine:password@submarine-database:3306/submarine. More detail : SQLAlchemy docsx

submarine.log_param(key: str, value: str) -> None​

log a single key-value parameter. The key and value are both strings.

ParamTypeDescriptionDefault Value
keyStringParameter name.x
valueStringParameter value.x

submarine.log_metric(key, value, step=0) -> None​

log a single key-value metric. The value must always be a number.

ParamTypeDescriptionDefault Value
keyStringMetric name.x
valueFloatMetric value.x
stepIntegerA single integer step at which to log the specified Metrics.0

submarine.save_model(model_type, model, registered_model_name, input_dim, output_dim) -> None​

Save a model into the minio pod.

ParamTypeDescriptionDefault Value
model_typeStringThe type of model. Only support pytorch and tensorflow.x
modelObjectModel artifact.x
registered_model_nameStringIf it is not None, the model will be registered into the model registry with this name.None
input_dimList<Integer>The input dimension of the model.None
output_dimList<Integer>The output dimension of the model.None