forked from mlcommons/GaNDLF
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
15 additions
and
12 deletions.
There are no files selected for viewing
This file contains 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 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 |
---|---|---|
@@ -1,16 +1,18 @@ | ||
from pydantic import BaseModel,field_validator | ||
from GANDLF.config_manager import version_check | ||
from pydantic import BaseModel, field_validator | ||
from GANDLF.config_manager import version_check | ||
from importlib.metadata import version | ||
|
||
|
||
class Version(BaseModel): | ||
minimum: str | ||
maximum: str | ||
|
||
|
||
class UserDefinedParameters(BaseModel): | ||
version: Version | ||
|
||
@classmethod | ||
@field_validator('version', mode='after') | ||
@field_validator("version", mode="after") | ||
def validate_version(cls, values: Version) -> Version: | ||
if version_check(values.model_dump(), version_to_check=version("GANDLF")): | ||
return values |
This file contains 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 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 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 |
---|---|---|
@@ -1,7 +1,9 @@ | ||
from GANDLF.config_manager import ConfigManager | ||
from pathlib import Path | ||
|
||
if __name__ == "__main__": | ||
testingDir = Path(__file__).parent.absolute().__str__() | ||
parameters = ConfigManager(testingDir+"/config_all_options.yaml",version_check_flag=False) | ||
parameters = ConfigManager( | ||
testingDir + "/config_all_options.yaml", version_check_flag=False | ||
) | ||
print(parameters) | ||
|
24de26a
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.
@check-spelling-bot Report
🔴 Please review
See the 📜action log or 📝 job summary for details.
Unrecognized words (1)
vere
Some files were automatically ignored 🙈
These sample patterns would exclude them:
You should consider excluding directory paths (e.g.
(?:^|/)vendor/
), filenames (e.g.(?:^|/)yarn\.lock$
), or file extensions (e.g.\.gz$
)You should consider adding them to:
File matching is via Perl regular expressions.
To check these files, more of their words need to be in the dictionary than not. You can use
patterns.txt
to exclude portions, add items to the dictionary (e.g. by adding them toallow.txt
), or fix typos.To accept these unrecognized words as correct and update file exclusions, you could run the following commands
... in a clone of the [email protected]:benmalef/GaNDLF.git repository
on the
976-add-pydantic-configuration-v1
branch (ℹ️ how do I use this?):Available 📚 dictionaries could cover words not in the 📘 dictionary
Consider adding them (in
.github/workflows/spellchecker.yml
) injobs:
/spelling:
foruses: check-spelling/check-spelling@main
in itswith
:To stop checking additional dictionaries, add (in
.github/workflows/spellchecker.yml
) foruses: check-spelling/check-spelling@main
in itswith
:Warnings (3)
See the 📜action log or 📝 job summary for details.
See⚠️ Event descriptions for more information.