Commit ecf8e2c1 authored by Rayner Maurício e Silva Machado's avatar Rayner Maurício e Silva Machado
Browse files

Update run_job.py

parent 9d4f34c9
Pipeline #15086 passed with stage
in 2 minutes and 52 seconds
Showing with 10 additions and 10 deletions
+10 -10
......@@ -19,18 +19,18 @@ size = int(sys.argv[2])
dftmax = pd.read_csv('../app/inir_parametrico_inmet/src/TBSm_TOMax_INMET.csv')
dftmax.columns = ['cidades', 'TBSm', 'TOMax']
df = pd.read_csv('../app/inir_parametrico_inmet/sample/sample_parametrico.zip')
df = df.merge(dftmax, 'left', 'cidades').sample(32)
df = df.merge(dftmax, 'left', 'cidades')
# col_epws = ['BRA_SP_Sao.Paulo.837810_INMET.epw', 'BRA_PE_Recife.819580_INMET.epw', 'BRA_CE_Fortaleza-Pinto.Martins.Intl.AP.817580_INMET.epw']
# cond = (df.arquetipos.str.startswith('MH-POS') & df.cidades.isin(col_epws))
# cond = cond | (df.arquetipos.str.startswith('UT-POS') & df.cidades.isin(col_epws))
# df = df.loc[cond].reset_index(drop=True)
col_epws = ['BRA_SP_Sao.Paulo.837810_INMET.epw', 'BRA_PE_Recife.819580_INMET.epw', 'BRA_CE_Fortaleza-Pinto.Martins.Intl.AP.817580_INMET.epw']
cond = (df.arquetipos.str.startswith('MH-POS') & df.cidades.isin(col_epws))
cond = cond | (df.arquetipos.str.startswith('UT-POS') & df.cidades.isin(col_epws))
df = df.loc[cond].reset_index(drop=True)
# indices = df.index.values
# np.random.seed(0)
# np.random.shuffle(indices)
# indices = np.array_split(indices, size)[rank]
# df = df.loc[indices]
indices = df.index.values
np.random.seed(0)
np.random.shuffle(indices)
indices = np.array_split(indices, size)[rank]
df = df.loc[indices]
print('Número de casos:', df.shape[0])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment