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

Swap to adam_core's Propagator, Orbits, and Observers #126

Merged
merged 5 commits into from
Nov 7, 2023

Conversation

moeyensj
Copy link
Owner

@moeyensj moeyensj commented Nov 2, 2023

Replaces:

  • Backend class with adam_core's Propagator class
  • Orbits with adam_core's Orbits
  • Observers with adam_core's Observers
  • coordinate transformations with adam_core's transformations

Removes:

  • Old implementation of range and shift
  • Data pre-processing function that will not be necessary with the new typed structure of Observations

All unit tests pass, but most importantly:
pytest -k ivezic -m integration passes! This tests the entire pipeline.

The benchmark shows a slowdown from 1.2695 to 1.4256 seconds. This is more than likely due to the conversion from adam_core types to dataframes still used by a large part of the THOR pipeline. I'll change those types out in a follow up PR.

@moeyensj moeyensj marked this pull request as ready for review November 2, 2023 05:17
Copy link
Collaborator

@akoumjian akoumjian left a comment

Choose a reason for hiding this comment

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

Just a quick read-through. So nice to clean this up!

num_jobs=1,
chunk_size=1,
)
ephemeris = prop._generate_ephemeris(orbits, observers)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why do we use the private method here?

Copy link
Owner Author

Choose a reason for hiding this comment

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

No good reason, we were calling generate_ephemeris (original function) with num_jobs=1 which would have called the private function in series. I'll go through and replace the private calls throughout IOD, OD, and the arc extension code.

@@ -178,8 +184,8 @@ def iod(
observation_selection_method="combinations",
iterate=False,
light_time=True,
backend="PYOORB",
backend_kwargs={},
propagator: Literal["PYOORB"] = "PYOORB",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's think about how to make this open enough that people can install third-party packages and use other propagators.

Copy link
Owner Author

Choose a reason for hiding this comment

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

Yes, good idea. In range and transform we pass the actual class, not a string. Maybe we pass the class all the way through to the worker functions and then initialize it in there?

propagator: Type["Propagator"] = PYOORB,
propagator_kwargs: dict = {},

Then inside worker functions:

prop = propagator(**propagator_kwargs)

Copy link
Owner Author

Choose a reason for hiding this comment

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

I'll clean all of this up once I have the quivr types built out and can work on the parallelization again.

@moeyensj moeyensj force-pushed the v2.0-adam-core-propagator branch from f5760a7 to 567ecdf Compare November 2, 2023 13:42
@akoumjian
Copy link
Collaborator

akoumjian commented Nov 2, 2023 via email

@moeyensj moeyensj force-pushed the v2.0-integration-benchmark branch from 9a590aa to 916a31b Compare November 2, 2023 14:10
@moeyensj moeyensj force-pushed the v2.0-adam-core-propagator branch 2 times, most recently from f12f787 to b2b837f Compare November 2, 2023 14:44
@moeyensj moeyensj force-pushed the v2.0-adam-core-propagator branch 2 times, most recently from ecdbd27 to dd85a73 Compare November 2, 2023 14:47
Base automatically changed from v2.0-integration-benchmark to main November 2, 2023 15:13
@moeyensj moeyensj force-pushed the v2.0-adam-core-propagator branch from dd85a73 to 88e6162 Compare November 3, 2023 19:08
@moeyensj moeyensj merged commit ebd5696 into main Nov 7, 2023
0 of 3 checks passed
@moeyensj moeyensj deleted the v2.0-adam-core-propagator branch November 7, 2023 16:40
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.

2 participants