Magnetic ordering in DyH2 and DyH3