Skip to content

Instantly share code, notes, and snippets.

@minghao51
Created October 17, 2024 06:11
Show Gist options
  • Save minghao51/46a12b91004ca5f6bc653e2f2a97a7b2 to your computer and use it in GitHub Desktop.
Save minghao51/46a12b91004ca5f6bc653e2f2a97a7b2 to your computer and use it in GitHub Desktop.
convert class to dict
class Config:
# MODE
PROD = True
IS_SANDBOX_ENV = True
TRAINING = False # Prepare data for training/inference if True/False. No Training or Inference executed. Use DO_TRAIN or DO_SERVE.
DO_TRAIN = False # Run model training if True
DO_SERVE = True # Run model predict if True
GENERATE_DATA = True # generate, features, targets if True
PRINT_CHECKS = True
IS_DATA_ENCRYPTED = False
# DIRECTORIES
PROJECT_NAME = 'MY_AG_Lapse'
CDP_SCV_HIVEDB = 'my_datascience_v'
PROJECT_HIVEDB = 'my_feature_store'
COMMON_DIR = 'abfss://[email protected]/FWD/IN/AgencyLapse/Common' # for L1 to L31 data only (common data)
INPUT_DIR = f'abfss://[email protected]/FWD/IN/AgencyLapse/LapseModel/Intermediate' # Project specific data
OUTPUT_DIR = INPUT_DIR
MAPPING_DIR = 'abfss://[email protected]/MY/FWD/Lapse/mapping'
EXPT_PATH = f'/Users/[email protected]/MY/Agent Channel/Experiments/{PROJECT_NAME}'
# config in dictionary format
CONFIGS = {k:v for k,v in Config.__dict__.items() if k[0:2] != '__'}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment