Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 21
tests fix#341
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
Open
shreymodi1
wants to merge
4
commits into
mainChoose a base branch
from
shrey/testsfix
base:main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Uh oh!
There was an error while loading. Please reload this page.
Open
tests fix #341
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -8,13 +8,8 @@ | ||
| from eval_protocol.pytest.openenv_rollout_processor import OpenEnvRolloutProcessor | ||
| import pytest | ||
| # Preferred import when using the monolithic `openenv` package | ||
| from envs.echo_env import EchoEnv # type: ignore | ||
| # Skip these integration-heavy tests on CI runners by default | ||
| pytestmark = pytest.mark.skipif(os.getenv("CI") == "true", reason="Skip OpenEnv integration tests on CI") | ||
| # Import OpenEnv Echo environment | ||
| from envs.echo_env import EchoEnv, EchoAction # type: ignore | ||
shreymodi1 marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. shreymodi1 marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| def echo_dataset_to_rows(data: List[Dict[str, Any]]) -> List[EvaluationRow]: | ||
| @@ -39,23 +34,10 @@ def action_parser(response_text: str): | ||
| """ | ||
| Convert raw model response to EchoAction. | ||
| """ | ||
| try: | ||
| from envs.echo_env import EchoAction # type: ignore | ||
| except Exception: | ||
| pytest.skip("OpenEnv (openenv.envs.echo_env) is not installed; skipping Echo hub test.") | ||
| raise | ||
| text = response_text.strip() if isinstance(response_text, str) else "" | ||
| return EchoAction(message=text or "hello") | ||
| # try: | ||
| # from envs.echo_env import EchoEnv # type: ignore | ||
| # _HAS_ECHO = True | ||
| # except Exception: | ||
| # _HAS_ECHO = False | ||
| # Inline test data | ||
| ECHO_INLINE_DATA: List[Dict[str, Any]] = [ | ||
| {"id": "echo-1", "prompt": "hello"}, | ||
| @@ -76,18 +58,16 @@ def action_parser(response_text: str): | ||
| num_runs=1, | ||
| max_concurrent_rollouts=2, | ||
| mode="pointwise", | ||
| rollout_processor=( | ||
| OpenEnvRolloutProcessor( | ||
| # Use HF Hub to launch the environment container automatically | ||
| env_client_cls=EchoEnv, # type: ignore | ||
| hub_repo_id=os.getenv("OPENENV_ECHO_REPO", "openenv/echo-env"), | ||
| # Simple prompt+parser above | ||
| prompt_builder=prompt_builder, | ||
| action_parser=action_parser, | ||
| # Keep defaults for timeouts/viewport/etc. (not relevant for echo) | ||
| timeout_ms=5000, | ||
| num_generations=1, | ||
| ) | ||
| rollout_processor=OpenEnvRolloutProcessor( | ||
| # Use HF Hub to launch the environment container automatically | ||
| env_client_cls=EchoEnv, | ||
| hub_repo_id=os.getenv("OPENENV_ECHO_REPO", "openenv/echo-env"), | ||
| # Simple prompt+parser above | ||
| prompt_builder=prompt_builder, | ||
| action_parser=action_parser, | ||
| # Keep defaults for timeouts/viewport/etc. (not relevant for echo) | ||
| timeout_ms=5000, | ||
| num_generations=1, | ||
| ), | ||
| ) | ||
| def test_openenv_echo_hub(row: EvaluationRow) -> EvaluationRow: | ||
Oops, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
hmmm i would prefer to not install more dependencies in ci.yml like this, as the tests are getting quite slow.
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.
can we create a test that happens in parallel that's specifically for the test you want to test?