-
Notifications
You must be signed in to change notification settings - Fork 25.6k
[ML] Write downloaded model parts async #111684
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
Merged
Merged
Changes from 25 commits
Commits
Show all changes
65 commits
Select commit
Hold shift + click to select a range
2e854e4
Write model parts async
davidkyle 125c822
Update docs/changelog/111684.yaml
davidkyle be39082
Pass a listener to import
davidkyle 5310a08
Ref counting WIP
davidkyle 3a57e14
use ref counting listener
davidkyle 56f5e1c
tidying
davidkyle 9f98dbe
add tests
davidkyle e434499
Merge branch 'main' into background-download-write
elasticmachine 9d9a0e6
Add download threadpool
davidkyle 669909b
less blocking
davidkyle fcc66b4
tidy up
davidkyle 1921812
more tests
davidkyle 63bdff6
Merge branch 'main' into background-download-write
elasticmachine 84aec83
remove unused
davidkyle c4ea146
fix the tests
davidkyle 413a3ab
5 in flight requests
davidkyle 70ffe07
use another threadpool for writes
davidkyle 573d5af
Revert "use another threadpool for writes"
davidkyle 658b903
use range request
davidkyle 98d8020
Merge branch 'main' into background-download-write
davidkyle 1d9f5b5
Use multiple connections
davidkyle d718a92
Merge branch 'main' into background-download-write
elasticmachine 0395c76
Tidy comments
davidkyle d37cd3a
short threads
davidkyle 6e88b09
Merge branch 'main' into background-download-write
elasticmachine 73f0f6b
Enable markSupported in SlicedInputStream (#112563)
kingherc 830c26f
Make two SubReaderWrapper implementations singletons (#112596)
original-brownbear 02a9750
Two speedups to IndexNameExpressionResolver (#112486)
original-brownbear 7f66489
Fix failing LangMustacheClientYamlTestSuiteIT yamlRestTestV7CompatTes…
cbuescher ae94a40
Fix trappy timeouts in downsample action (#112734)
DaveCTurner 06a361a
Mute org.elasticsearch.smoketest.DocsClientYamlTestSuiteIT test {yaml…
elasticsearchmachine 802ee00
Introduce repository integrity verification API (#112348)
DaveCTurner 75c0fb9
JSON parse failures should be 4xx codes (#112703)
benwtrent 07329d7
Handle null exception message in `TestCluster#wipe` (#112741)
DaveCTurner eabea6f
Add TaskManager to pluginServices (#112687)
parkertimmins 051f504
Introduce data stream options and failure store configuration classes…
gmarouli a148619
Support widening of numeric types in union-types (#112610)
craigtaverner b9b62db
add CDR related data streams to kibana_system priviliges (#112655)
maxcold 1a05488
Bump Elasticsearch version to 9.0.0 (#112570)
mark-vieira ca2b144
ESQL: Compute support for filtering ungrouped aggs (#112717)
nik9000 bceeced
Bump Elasticsearch to a minimum of JDK 21 (#112252)
ChrisHegarty a211d80
Mute org.elasticsearch.repositories.blobstore.testkit.integrity.Repos…
elasticsearchmachine cef6f0b
[DOCS] Augment installation warnings (#112756)
lcawl 196728e
(Doc+) CAT Nodes default columns (#112715)
stefnestor c4932f2
(Doc+) Terminating Exit Codes (#112530)
stefnestor 2b426f7
Fix verifyVersions task (#112765)
mark-vieira 7b17077
(Doc+) Inference Pipeline ignores Mapping Analyzers (#112522)
stefnestor 18a48c7
Estimate segment field usages (#112760)
dnhatn e0044a5
Use a dedicated test executor in MockTransportService (#112748)
ywangd 2046b29
Mute org.elasticsearch.repositories.blobstore.testkit.integrity.Repos…
elasticsearchmachine 9f5b528
Mute org.elasticsearch.script.StatsSummaryTests testEqualsAndHashCode…
elasticsearchmachine 6fdb78c
Do not throw in task enqueued by CancellableRunner (#112780)
ywangd ca30b69
[Test] Account for auto-repairing for shard gen file (#112778)
ywangd 1bbb739
Introduce test utils for ingest pipelines (#112733)
DaveCTurner 6ef94ac
Deduplicate BucketOrder when deserializing (#112707)
iverase 3fadf53
Block use of current version feature in yaml tests (#112737)
thecoop b801949
ci(bump automation): bump ubi9 for ironbank (#112298)
v1v c3c4aa5
Two empty mappings now are created equally (#107936)
piergm af1ba75
Cleanup shutdown module bwc in v9 (#112793)
DaveCTurner a14f529
Update last few references in yaml tests from ROOT locale to ENGLISH …
thecoop 7aa98ef
Remove adaptive allocations feature flag (#112798)
jan-elastic 352dd89
address comments
davidkyle a2c3c5e
Merge branch 'main' into background-download-write
elasticmachine d0fbe17
fix recovery from failure
davidkyle 81ce3f1
Merge branch 'main' into background-download-write
elasticmachine File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| pr: 111684 | ||
| summary: Write downloaded model parts async | ||
| area: Machine Learning | ||
| type: enhancement | ||
| issues: [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
319 changes: 245 additions & 74 deletions
319
...e-loader/src/main/java/org/elasticsearch/xpack/ml/packageloader/action/ModelImporter.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -17,6 +17,7 @@ | |||||
| import org.elasticsearch.common.io.Streams; | ||||||
| import org.elasticsearch.common.unit.ByteSizeUnit; | ||||||
| import org.elasticsearch.common.unit.ByteSizeValue; | ||||||
| import org.elasticsearch.core.Nullable; | ||||||
| import org.elasticsearch.core.SuppressForbidden; | ||||||
| import org.elasticsearch.rest.RestStatus; | ||||||
| import org.elasticsearch.xcontent.XContentParser; | ||||||
|
|
@@ -34,16 +35,20 @@ | |||||
| import java.security.AccessController; | ||||||
| import java.security.MessageDigest; | ||||||
| import java.security.PrivilegedAction; | ||||||
| import java.util.ArrayList; | ||||||
| import java.util.HashMap; | ||||||
| import java.util.List; | ||||||
| import java.util.Locale; | ||||||
| import java.util.Map; | ||||||
| import java.util.concurrent.atomic.AtomicInteger; | ||||||
| import java.util.concurrent.atomic.AtomicLong; | ||||||
| import java.util.stream.Collectors; | ||||||
|
|
||||||
| import static java.net.HttpURLConnection.HTTP_MOVED_PERM; | ||||||
| import static java.net.HttpURLConnection.HTTP_MOVED_TEMP; | ||||||
| import static java.net.HttpURLConnection.HTTP_NOT_FOUND; | ||||||
| import static java.net.HttpURLConnection.HTTP_OK; | ||||||
| import static java.net.HttpURLConnection.HTTP_PARTIAL; | ||||||
| import static java.net.HttpURLConnection.HTTP_SEE_OTHER; | ||||||
|
|
||||||
| /** | ||||||
|
|
@@ -61,6 +66,73 @@ final class ModelLoaderUtils { | |||||
|
|
||||||
| record VocabularyParts(List<String> vocab, List<String> merges, List<Double> scores) {} | ||||||
|
|
||||||
| // Range in bytes | ||||||
| record RequestRange(long rangeStart, long rangeEnd, int startPart, int numParts) { | ||||||
| public String bytesRange() { | ||||||
| return "bytes=" + rangeStart + "-" + rangeEnd; | ||||||
| } | ||||||
| } | ||||||
|
|
||||||
| static class HttStreamChunker { | ||||||
|
||||||
| static class HttStreamChunker { | |
| static class HttpStreamChunker { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.