-
Notifications
You must be signed in to change notification settings - Fork 6
Web content embeddings [LAB-18] #105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
…tor search params [LAB-11]
…uccessful import [LAB-13]
…rd search [LAB-11]
…d of a copy [LAB-13]
…ing since the classes already define a connection [LAB-13]
…red console trait [LAB-13]
…)` method [LAB-11]
…earch-in-es Add vector search to general keyword searches [LAB-11]
…te-embeddings-on-import Regenerate embeddings on artwork import [LAB-13]
…e for `image` [LAB-13]
…boost-behavior-in-search Adjust boost behavior in search [LAB-16]
…ey-fallbacks Fix api error for unmapped keys
…ost-route-for-visually-similar-2 Create endpoint for posting images and searching nearest image neighbor [LAB-19]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a couple bits that are a little confusing.
$this->info("Saved text embeddings", OutputInterface::VERBOSITY_VERBOSE); | ||
} catch (\Exception $e) { | ||
throw new Exception("Failed to save text embeddings: " . $e->getMessage()); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This try-catch inside a try-catch seems redundant.
} | ||
}); | ||
|
||
usleep($this->sleepFor * 10000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the ImportsData
trait, it says that $sleepFor
is "Seconds to sleep between requests" but here we're only sleeping for 10 milliseconds (10,000 microseconds = 10 milliseconds). For clarity, maybe we should use the Laravel Sleep
helper, for example:
use Illuminate\Support\Sleep;
protected $sleepFor = 1 / 100; // 0.01 seconds or 10 milliseconds
Sleep::for($sleepFor)->seconds();
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For reference: https://laravel.com/docs/10.x/helpers#sleep
ebc0fc1
to
ae06694
Compare
|
No description provided.