Python API#

This section includes the API documentation from the Finetuner codebase, as extracted from the docstrings in the code.

finetuner.__init__ - Finetuner#

finetuner.login

Login to Jina AI Cloud to use cloud-based fine-tuning.

finetuner.describe_models

Print model information, such as name, task, output dimension, architecture and description as a table.

finetuner.fit

Create a Finetuner Run, calling this function will submit a fine-tuning job to the Jina AI Cloud.

finetuner.list_callbacks

List available callbacks.

finetuner.get_run

Get a Run by its name and (optional) Experiment name.

finetuner.get_experiment

Get an Experiment given a name.

finetuner.get_token

Get user token from the Jina AI Cloud, login() is required.

finetuner.build_model

Builds a pre-trained model given a name.

finetuner.get_model

Re-build the model based on the model inference session with ONNX.

finetuner.encode

Preprocess, collate and encode the list or :class:`DocumentArray

finetuner.list_runs

List all created Run inside a given Experiment.

finetuner.delete_run

Delete a Run given a run_name and

finetuner.delete_runs

Delete all Run given an optional experiment_name.

finetuner.create_experiment

Create an Experiment.

finetuner.list_experiments

List all Experiment.

finetuner.delete_experiment

Delete an Experiment given a name.

finetuner.delete_experiments

Delete all Experiment.

finetuner.run.Run - Run#

finetuner.run.Run.name

Get the name of the Run.

finetuner.run.Run.config

Get the config of the Run.

finetuner.run.Run.status

Get Run status.

finetuner.run.Run.logs

Check the Run logs.

finetuner.run.Run.stream_logs

Stream the Run logs lively.

finetuner.run.Run.save_artifact

Save artifact if the Run is finished.

finetuner.run.Run.artifact_id

Get artifact id of the Run.

finetuner.experiment.Experiment - Experiment#

finetuner.experiment.Experiment.name

Get the name of the Experiment.

finetuner.experiment.Experiment.create_run

Create a Run inside the Experiment.

finetuner.experiment.Experiment.get_run

Get a Run given a name.

finetuner.experiment.Experiment.list_runs

List all Run.

finetuner.experiment.Experiment.delete_run

Delete a Run by its name.

finetuner.experiment.Experiment.delete_runs

Delete all Run inside the Experiment.