-
Notifications
You must be signed in to change notification settings - Fork 30
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
Implement #334: Integrate cross-project experiment into pipeline #346
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Provide option --with-xp
for ex2 and ex3. If chosen, provide example projects as training data.
|
||
class CrossProjectPrepareTask: | ||
MAX_SUBTYPES_SAMPLE_SIZE = 25 | ||
MAX_PROJECT_SAMPLE_SIZE = 50 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move these two constants to config parameters. Use same names.
@@ -238,6 +249,32 @@ def __add_run_ex3_subprocess(available_detectors: List[str], available_datasets: | |||
__setup_run_arguments(experiment_parser, available_detectors) | |||
|
|||
|
|||
def __add_run_cross_project_create_index(available_datasets: List[str], subparsers) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implicitly run create index with prepare.
__setup_filter_arguments(parser, available_datasets) | ||
|
||
|
||
def __add_run_cross_project_prepare(subparsers) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Provide as top-level task ./mubench checkout-xp
.
e447a83
to
4cd544b
Compare
24009e2
to
bd16a52
Compare
Try collecting results from AsterskTasks for passing prepared xp data on to subsequent tasks. If this does not work (easily), we persist indexes version-wise and load these after preparation. |
Turns out we really didn't need anything more since we can write one index per version. Woops. Well, now that it's implemented we might as well keep it. It isn't that complicated and seems to be a useful feature. Essentially, we can now split something up into arbitrarily small tasks and just accumulate the results. At this point, I'm wondering if Anyway, we can now run ex2 and ex3 |
@salsolatragus I just remembered that the solution I've implemented now is exactly what you suggested. There's definitely a lot of space for improvements, but it should work for now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only 2 minors!
return { | ||
key_detector_mode: DetectAllFindingsTask.__DETECTOR_MODE, | ||
key_target_src_paths: version_compile.original_sources_paths, | ||
key_target_classes_paths: version_compile.original_classes_paths, | ||
key_dependency_classpath: version_compile.get_full_classpath() | ||
key_dependency_classpath: version_compile.get_full_classpath(), | ||
key_training_src_path: xp_sources_paths |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if there is no xp paths.
@@ -40,7 +47,7 @@ def _get_findings_path(self, detector: Detector, version: ProjectVersion, misuse | |||
def _get_detector_arguments(version_compile: VersionCompile, misuse_compile: MisuseCompile): | |||
return { | |||
key_detector_mode: DetectProvidedCorrectUsagesTask.__DETECTOR_MODE, | |||
key_training_src_path: misuse_compile.correct_usage_sources_path, | |||
key_training_src_path: [misuse_compile.correct_usage_sources_path], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert this.
This should be ready now. |
8f1f1a5
to
edd7d88
Compare
Implement #334: Integrate cross-project experiment into pipeline
@salsolatragus I thought you may want to check the current state. The tasks are now integrated into the pipeline and should work the same way as before (plus pipeline features like the default config). I've set them up to be called separately, but that is easy to reconfigure.