-
Notifications
You must be signed in to change notification settings - Fork 11
add full config #144
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
add full config #144
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
81cd874
add full config
Samoed 41b4ef7
Update optimizer_config.schema.json
github-actions[bot] 280f350
add missing config
Samoed bb8c996
Merge remote-tracking branch 'origin/add_full_config_validation' into…
Samoed dca0501
Update optimizer_config.schema.json
github-actions[bot] 122a4f5
update config
Samoed 148d9ec
Update optimizer_config.schema.json
github-actions[bot] 61aff7f
fix
Samoed 865fb75
try fix
Samoed d8c91f1
try fix
Samoed c93ad4a
attempt (#150)
voorhs 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
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
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
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
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
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 |
|---|---|---|
|
|
@@ -6,7 +6,8 @@ | |
|
|
||
| from pydantic import BaseModel, Field, PositiveInt, RootModel | ||
|
|
||
| from autointent.custom_types import NodeType | ||
| from autointent.configs import DataConfig, LoggingConfig, VectorIndexConfig | ||
| from autointent.custom_types import NodeType, SamplerType | ||
| from autointent.modules.abc import BaseModule | ||
| from autointent.nodes._optimization._node_optimizer import ParamSpaceFloat, ParamSpaceInt | ||
| from autointent.nodes.info import DecisionNodeInfo, EmbeddingNodeInfo, RegexNodeInfo, ScoringNodeInfo | ||
|
|
@@ -160,7 +161,7 @@ class RegexNodeValidator(BaseModel): | |
| SearchSpaceTypes: TypeAlias = EmbeddingNodeValidator | ScoringNodeValidator | DecisionNodeValidator | RegexNodeValidator | ||
|
|
||
|
|
||
| class OptimizationConfig(RootModel[list[SearchSpaceTypes]]): | ||
| class OptimizationSearchSpaceConfig(RootModel[list[SearchSpaceTypes]]): | ||
| """Optimizer configuration.""" | ||
|
|
||
| def __iter__( | ||
|
|
@@ -178,3 +179,21 @@ def __getitem__(self, item: int) -> SearchSpaceTypes: | |
| :return: Item | ||
| """ | ||
| return self.root[item] | ||
|
|
||
|
|
||
| class TaskConfig(BaseModel): | ||
| """Configuration for the task to optimize.""" | ||
|
|
||
| search_space: OptimizationSearchSpaceConfig | ||
| """Path to the search space configuration file. If None, the default search space will be used""" | ||
| sampler: SamplerType = "brute" | ||
|
|
||
|
|
||
| class OptimizationConfig(BaseModel): | ||
| """Configuration for the optimization process.""" | ||
|
|
||
| data_config: DataConfig = DataConfig() | ||
| task_config: TaskConfig | ||
| logging_config: LoggingConfig = LoggingConfig() | ||
| vector_index_config: VectorIndexConfig = VectorIndexConfig() | ||
| seed: PositiveInt = 42 | ||
|
Comment on lines
+184
to
+199
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. это конфиги и они должны быть в
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Могу сюда все конфиги тогда перенести |
||
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.