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

[Droid] Integrate Florence-2-Large Model #309

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

factory-droid[bot]
Copy link

@factory-droid factory-droid bot commented Jun 20, 2024

Rotor

Summary of Changes

This pull request integrates the Florence-2-Large model into the repository. The changes include:

  • A new configuration file (config.yaml) specifying dependencies, computational resources, and secrets management for Florence-2-Large.
  • A model implementation (model.py) that handles loading, preprocessing, inference, and postprocessing for the Florence-2-Large model.
  • Unit tests (test_model.py) to ensure the model loads correctly, performs inference accurately, and handles outputs appropriately.

These changes implement the plan to deploy and validate the Florence-2-Large model, ensuring it is ready for multi-task computer vision tasks.

Fixes BT-11229

Tips

  • If you review this pull request, I will attempt to address your feedback by pushing an update. You may also leave a comment and tag @droid.

- Created config.yaml for Florence-2-Large with specified dependencies, computational resources, and secrets management.
- Implemented model.py to load, preprocess, predict, and postprocess using Florence-2-Large.
- Added unit tests in test_model.py to verify model loading, inference, and output handling.
Copy link

linear bot commented Jun 20, 2024

BT-11229 Create Florence-2-Large truss

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

Copy link
Author

factory-droid bot commented Jun 20, 2024

Important

Solutions for GitHub Action Failures - cc717c4 - 4

Droid deploy truss

To fix the ValidationError in the test_truss_deploy.py script, ensure that the model_id and deployment_id values are converted to strings. You can do this by updating the truss_push function as follows:

model_id = str(match.group(1))  # Ensure model_id is a string
deployment_id = str(match.group(2))  # Ensure deployment_id is a string
Details The error occurred because the `model_id` and `deployment_id` values were integers, but the script expected them to be strings. By explicitly converting these values to strings, the error will be resolved.

Here is the updated section of the test_truss_deploy.py script:

def truss_push():
    # ... other code ...
    if result.returncode != 0:
        raise Exception(
            f"Failed to push model:\n\nSTDOUT: {result.stdout.decode()}\nSTDERR: {result.stderr.decode()}"
        )
    model_id = str(match.group(1))  # Ensure model_id is a string
    deployment_id = str(match.group(2))  # Ensure deployment_id is a string
    print(
        f"Model pushed successfully. model-id: {model_id}. deployment-id: {deployment_id}"
    )

This change ensures that the model_id and deployment_id are correctly handled as strings, preventing the ValidationError.

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.

0 participants