Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrates and briefly documents the UBet analysis code for public reference in the LangSec slides. #6552

Merged
merged 28 commits into from
Jun 1, 2023

Conversation

kaoudis
Copy link
Collaborator

@kaoudis kaoudis commented May 15, 2023

❗ caution: depends on #6553 and will not accurately reproduce our results without merging that code first / too.

@kaoudis kaoudis requested review from ESultanik and hbrodin May 15, 2023 19:17
@kaoudis kaoudis self-assigned this May 15, 2023
@kaoudis kaoudis force-pushed the kkaoudis/migrate-ubet-python branch from 0658e67 to 7fd0e28 Compare May 16, 2023 21:28
@kaoudis kaoudis mentioned this pull request May 16, 2023
…parent dockerfile is now different, as also in #6551
Copy link
Collaborator

@hbrodin hbrodin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job adding all this documentation! I've made a couple of notes that we could consider. Also, I'm thinking we might want to synch with a couple of other branches going into main.

examples/analysis/ubet/README.md Outdated Show resolved Hide resolved
examples/analysis/ubet/compress_tdag.py Show resolved Hide resolved
examples/analysis/ubet/eval_nitro.py Outdated Show resolved Hide resolved
examples/analysis/ubet/eval_nitro.py Outdated Show resolved Hide resolved
examples/analysis/ubet/examples/motivation/listing_1.cpp Outdated Show resolved Hide resolved
examples/analysis/ubet/examples/motivation/listing_1.cpp Outdated Show resolved Hide resolved
examples/analysis/ubet/examples/motivation/listing_1.cpp Outdated Show resolved Hide resolved
examples/analysis/ubet/examples/ub.cpp Outdated Show resolved Hide resolved

RUN cp modules/c++/nitf/show_nitf++ nitro_Release

RUN polytracker instrument-targets \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will need to add --cflog once #6553 is merged. Additional flag needed to not change existing behaviour.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe in #6553 we could add --cflog here? Or would you prefer to merge #6553 first, then this, with the flag added?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to add it here as the Dockerfile.nitro does not exist on #6553. Either we do it now, or we add it as a follow-up PR. We could also merge all our changes into a separate branch and then make the final changes there. But, I think merging #6553 first, then just adding the --cflog here and merging makes the most sense to me. Ideally this wouldn't be dependent on #6553 to be merged, in practice it is hard to avoid.


RUN polytracker build cmake --build . -j$((`nproc`+1)) --clean-first --target show_nitf++ --config Debug
RUN cp modules/c++/nitf/show_nitf++ nitro_Debug
RUN polytracker instrument-targets \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will need to add --cflog once #6553 is merged. Additional flag needed to not change existing behaviour.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as above 🙂

Copy link
Collaborator

@hbrodin hbrodin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! We need an additional change for it to synch with the instrumentation branch, but we can follow up with that or add an additional commit depending on order of merge.


RUN pip install cxxfilt

RUN git clone https://github.com/mdaus/nitro.git
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest we pin to the specific version of Nitro that we know works, just in case something upstream breaks our instrumentation later on.

This commit has I chose is from mid-March, but I didn't test it. @kaoudis do you think we need an earlier version?

Suggested change
RUN git clone https://github.com/mdaus/nitro.git
RUN git clone https://github.com/mdaus/nitro.git
WORKDIR /polytracker/the_klondike/nitro
RUN git checkout 342f552768e249e86df702062ff3f60ea1ec813a

Copy link
Collaborator Author

@kaoudis kaoudis May 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think committing a version that matches the version when we were working on this is probably best for now until I/we get a chance to add more analysis stuff here and start working on this again!

Looks like some recent Nitro commits are just merging changes from coda-oss, which may perhaps be used more inside Maxar (Nitro is the only open source use I am currently aware of) and coda-oss does seem to introduce a good chunk of Nitro's variability. I think pinning to b39ccc4c07e84e6c05cecb9ae24143373a3ed8e2 could be better since that would be the one that we were looking at when we did the work. What do you think?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes! Let's pin the version you are suggesting @kaoudis! That's the one we have a working result from.

@kaoudis kaoudis merged commit ab0f6d6 into master Jun 1, 2023
4 of 5 checks passed
@kaoudis kaoudis deleted the kkaoudis/migrate-ubet-python branch June 1, 2023 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants