e5b83df675
Using lambdas now to pass in variable amount of arguments from components. This works right now with a few open windows, but saving and possibly loading will be broken right now. They need the lambda treatment next. I also split the JSON validation placeholder to library/common_utilities.py.
15 lines
437 B
Python
15 lines
437 B
Python
def is_valid_config(data):
|
|
# Check if the data is a dictionary
|
|
if not isinstance(data, dict):
|
|
return False
|
|
|
|
# Add checks for expected keys and valid values
|
|
# For example, check if 'use_8bit_adam' is a boolean
|
|
if "use_8bit_adam" in data and not isinstance(data["use_8bit_adam"], bool):
|
|
return False
|
|
|
|
# Add more checks for other keys as needed
|
|
|
|
# If all checks pass, return True
|
|
return True
|