Skip to content

Commit

Permalink
ssl-based mlpf first iteration (#158)
Browse files Browse the repository at this point in the history
* add ssl notebook

* add ssl notebook

* Squashed commit of the following:

commit a4d5077
Author: Farouk <farouk.mokhtar@gmail.com>
Date:   Thu Nov 3 15:26:54 2022 +0100

    up

commit 9012e78
Author: Farouk <farouk.mokhtar@gmail.com>
Date:   Thu Nov 3 15:04:17 2022 +0100

    up

commit 2915130
Author: Farouk <farouk.mokhtar@gmail.com>
Date:   Thu Nov 3 14:29:01 2022 +0100

    add ssl-VICreg notebook

* up

* VICReg apples to apples

* major cleanup and reorganization

* ude full dataset for VICReg

* update readme pyg

* add first iteration of ssl

* before merge

* cleanup and ssl organization

* add flake8

* revert changes

* up
Former-commit-id: ee293a2
  • Loading branch information
farakiko authored Jan 12, 2023
1 parent 34d8695 commit dcdd941
Show file tree
Hide file tree
Showing 38 changed files with 6,963 additions and 2,318 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,8 @@ nohup.out

*.pkl
*.pkl.bz2
*.parquet

slurm-*.out

.vscode
8 changes: 8 additions & 0 deletions mlpf/data_clic/postprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,13 @@ def flatten_event(df_tr, df_cl, df_gen, df_pfs, pairs):


def prepare_data_clic(fn):
"""
Processing function that takes as input a raw parquet file and processes it.
Returns
a list of events, each containing three arrays [Xs, ygen, ycand].
"""

data = awkward.from_parquet(fn)

Expand Down Expand Up @@ -308,6 +315,7 @@ def prepare_data_clic(fn):
# print(df_gen.loc[gp])

Xs, ys_gen, ys_cand = flatten_event(df_tr, df_cl, df_gen, df_pfs, pairs)

ret.append([Xs, ys_gen, ys_cand])

return ret
7 changes: 1 addition & 6 deletions mlpf/data_cms/postprocessing2.py
Original file line number Diff line number Diff line change
Expand Up @@ -810,12 +810,7 @@ def parse_args():
import argparse

parser = argparse.ArgumentParser()
parser.add_argument(
"--input",
type=str,
help="Input file from PFAnalysis",
required=True,
)
parser.add_argument("--input", type=str, help="Input file from PFAnalysis", required=True)
parser.add_argument("--outpath", type=str, default="raw", help="output path")
parser.add_argument(
"--save-full-graph",
Expand Down
3 changes: 0 additions & 3 deletions mlpf/lrp/__init__.py

This file was deleted.

280 changes: 0 additions & 280 deletions mlpf/lrp/lrp_mlpf.py

This file was deleted.

Loading

0 comments on commit dcdd941

Please sign in to comment.