class GenerateEmbedding

Traits

SerializesModels
Queueable

Properties

Image $image

The image to generate an embedding of.

User $user

The user who initiated the job.

protected bool $deleteWhenMissingModels

Ignore this job if the image or user does not exist any more.

Methods

__construct(Image $image, User $user)

Create a new instance.

void
handle()

Handle the job.

generateEmbedding(string $outputPath)

Generate the embedding.

maybeDownloadCheckpoint(string $from, string $to)

Downloads the model checkpoint if they weren't downloaded yet.

string
python(string $command)

Execute a Python command.

Details

at line 48
__construct(Image $image, User $user)

Create a new instance.

Parameters

Image $image
User $user

at line 59
void handle()

Handle the job.

Return Value

void

at line 86
protected generateEmbedding(string $outputPath)

Generate the embedding.

Parameters

string $outputPath

at line 106
protected maybeDownloadCheckpoint(string $from, string $to)

Downloads the model checkpoint if they weren't downloaded yet.

Parameters

string $from
string $to

at line 128
protected string python(string $command)

Execute a Python command.

Parameters

string $command

Return Value

string

Exceptions

Exception