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

Built In Jupyter Notebook #213

Merged
merged 15 commits into from
Dec 29, 2023
Merged

Built In Jupyter Notebook #213

merged 15 commits into from
Dec 29, 2023

Conversation

paulguerrie
Copy link
Contributor

Description

Introduces a built in Jupyter notebook for testing and development within the inference server docker containers.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

Copy link
Collaborator

@PawelPeczek-Roboflow PawelPeczek-Roboflow left a comment

Choose a reason for hiding this comment

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

Inference pipeline demo cannot work in notebook for two reasons:

  • it uses render boxes, which require display
  • there is some problem with possible lack of API key - simply put - Active Learning collides with that
     81 def get_roboflow_project_metadata(
     82     api_key: str,
     83     model_id: str,
     84     cache: BaseCache,
     85 ) -> RoboflowProjectMetadata:
     86     logger.info(f"Fetching active learning configuration.")
---> 87     config_cache_key = construct_cache_key_for_active_learning_config(
     88         api_key=api_key, model_id=model_id
     89     )
     90     cached_config = cache.get(config_cache_key)
     91     if cached_config is not None:

File /usr/local/lib/python3.9/site-packages/inference/core/active_learning/configuration.py:133, in construct_cache_key_for_active_learning_config(api_key, model_id)
    131 def construct_cache_key_for_active_learning_config(api_key: str, model_id: str) -> str:
    132     dataset_id = model_id.split("/")[0]
--> 133     api_key_hash = hashlib.md5(api_key.encode("utf-8")).hexdigest()
    134     return f"active_learning:configurations:{api_key_hash}:{dataset_id}"

AttributeError: 'NoneType' object has no attribute 'encode'

so despite of changing this example - we are in need to fix the issue of keyless AL (which should be disabled imo).

@@ -1200,6 +1206,45 @@ async def model_add(dataset_id: str, version_id: str, api_key: str = None):
}
)

if not LAMBDA:

@app.get(
Copy link
Collaborator

Choose a reason for hiding this comment

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

probably should be post?

Copy link
Collaborator

Choose a reason for hiding this comment

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

not sure how that would work with redirect

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ya, I'm not sure how the redirect works with POST. I'm going to leave it as GET for now since it's working and we don't expect users to be invoking this route other than through our own landing page.

@paulguerrie paulguerrie merged commit 820da06 into main Dec 29, 2023
5 checks passed
@paulguerrie paulguerrie deleted the feature/notebook branch December 29, 2023 16:22
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.

3 participants