kaggle-utils / main.py
hahunavth
update source
2a8b18d
raw
history blame
673 Bytes
from google_sheet import conf_repo
import json
from kaggle_service import KernelRerunService, NbJob
from logger import sheet_logger
# if __name__ == "__main__":
configs = []
try:
for i in range(2, 1000):
rs = conf_repo.read(i)
if not rs:
break
cfg = json.loads(rs['config'])
configs.append(cfg)
print(cfg)
except Exception as e:
sheet_logger.log(log="Get config failed!!")
service = KernelRerunService()
for config in configs:
service.add_job(NbJob.from_dict(config))
try:
service.validate_all()
service.status_all()
service.run_all()
except Exception as e:
sheet_logger.log(log=str(e))