The invention provides novel azaindolylpyridone and diazaindolylpyridone compounds of formula (I), pharmaceutical compositions containing such compounds, and methods for using such compounds in treatment of diseases including cancer, type II diabetes, inflammatory diseases, autoimmune diseases, neurodegenerative disorders, cardiovascular disorders and viral infections; wherein R2, R3 and X are as defined in the specification.