Skip to content
This repository has been archived by the owner on Sep 24, 2024. It is now read-only.

RD2024-45: Setup test structure for ITs #13

Merged
merged 6 commits into from
Jan 25, 2024
Merged

Conversation

sfriedowitz
Copy link
Contributor

@sfriedowitz sfriedowitz commented Jan 25, 2024

Sets up the basic pattern for unit/ITs in the repo.

  • Separates the unit and integration folders under tests, so we easily run each suite independently
  • Adds a conftest.py to integration that includes setup of a basic Ray cluster for testing. I leave docstring comments on things we probably want to iterate on here in the future
  • Adds some basic testing for the IT environment and the simple job entrypoint.

I have not yet gone through extensively testing the production finetuning/eval jobs. I want to do this in a separate PR to avoid it being overwhelming.

@sfriedowitz sfriedowitz marked this pull request as ready for review January 25, 2024 18:37
from flamingo.jobs.simple import SimpleJobConfig


@ray.remote
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm Ray-ifying this entrypoint so we actually have something to test in the ITs

Copy link
Member

@veekaybee veekaybee left a comment

Choose a reason for hiding this comment

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

Couple minor things

@@ -0,0 +1,60 @@
"""
Flamingo integration test suite.
Copy link
Member

Choose a reason for hiding this comment

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

I may have missed this in earlier PRs but do we have some docs around testing?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We don't really have docs yet. We should add to the contributing guide eventually

print(f"The magic number is {config.magic_number}")
"""A simple entrypoint to demonstrate the Ray interface."""
# Connect to the Ray cluster (if not already running)
ray.init(ignore_reinit_error=True)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@aittalam this is an example of launching a ray cluster if not already existing. I am able to run this on my local machine without explicitly launching a Ray cluster.

flamingo run simple --config examples/configs/simple_config.yaml

@sfriedowitz
Copy link
Contributor Author

sfriedowitz commented Jan 25, 2024

@binaryaaron as Vicki approved, and we discussed this a bit via Slack, I'm going to roll w/ this initial PR. We can iterate and add more tests as we progress.

@sfriedowitz sfriedowitz merged commit 9c7f4f9 into main Jan 25, 2024
1 check passed
@sfriedowitz sfriedowitz deleted the RD2024-45/basic-it-suite branch January 25, 2024 21:38
@binaryaaron
Copy link
Contributor

@binaryaaron as Vicki approved, and we discussed this a bit via Slack, I'm going to roll w/ this initial PR. We can iterate and add more tests as we progress.

🚢

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants