Spaces:
Configuration error
Configuration error
File size: 699 Bytes
7b39dbf |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
Entity file is used to create custom return types from mlProject.utils.common import read_yaml, create_directories read_yaml is written in such a way that key value pairs can be accessed using a '.' d={'a':'value1', 'b':'value2'} d['a'] d.a # helps us access value using '.' instead of d['a'] from box import ConfigBox d=ConfigBox({'a':'value1', 'b':'value2'}) d.a from ensure import ensure_annotations @ensure_annotations def get_product(x:int, y:int)->int: return x*y # Without ensure_annotations, this will not through any error and will give wierd output get_product(2,"3") from mlProject.utils.common import read_yaml from mlProject.constants import * read_yaml(CONFIG_FILE_PATH) |