From 35c2477288394451147db28c685cb93dee9815c1 Mon Sep 17 00:00:00 2001 From: Christian Kasim Loan Date: Mon, 29 Jan 2024 08:29:53 +0100 Subject: [PATCH 1/2] updated Marketplace UI, offering and notebook --- .../auto_install/databricks/marketplace.py | 48 +- .../databricks/marketplace_offering.py | 772 +++++++++-- notebooks/databricks_model_marketplace.ipynb | 1192 ++--------------- 3 files changed, 812 insertions(+), 1200 deletions(-) diff --git a/johnsnowlabs/auto_install/databricks/marketplace.py b/johnsnowlabs/auto_install/databricks/marketplace.py index 9bc21f4307..0bc7fc32c9 100644 --- a/johnsnowlabs/auto_install/databricks/marketplace.py +++ b/johnsnowlabs/auto_install/databricks/marketplace.py @@ -68,7 +68,6 @@ def create_endpoint( headers=get_headers(db_token), ) response_json = response.json() - print(response.json()) if ( "error_code" in response_json and response_json["error_code"] == "RESOURCE_DOES_NOT_EXIST" @@ -99,20 +98,31 @@ def create_endpoint( import os from johnsnowlabs.auto_install.databricks.endpoints import ( - create_secret_in_scope, setup_secrets, ) def make_model_select_drop_down(models_df): - models = models_df.NluRef.values.tolist() + def extract_number(s): + import re + + # Use regular expression to extract the numeric part + match = re.search(r"\d+", s) + return int(match.group()) if match else 0 + + models = sorted(models_df.DropDownId.values.tolist(), key=extract_number) first_model = models[0] dbutils.widgets.dropdown("The model", first_model, models) -def get_selected_model_metadata(models_df): +def get_selected_widget_model_metadata(models_df): selected_model = dbutils.widgets.get("The model") - model_data = models_df[models_df.NluRef == selected_model] + model_data = models_df[models_df.DropDownId == selected_model] + return model_data + + +def get_model_metadta(models_df, selected_model): + model_data = models_df[models_df.DropDownId == selected_model] return model_data @@ -132,21 +142,16 @@ def query_endpoint(data, endpoint_name, db_host, db_token, base_name=None): return pd.DataFrame(json.loads(response.json()["predictions"])) -def render_ui(models_df=None): - if models_df is None: - from johnsnowlabs.auto_install.databricks.marketplace_offering import models_df +def render_ui(): + from johnsnowlabs.auto_install.databricks.marketplace_offering import models_df + dbutils.widgets.removeAll() dbutils.widgets.text("JSL-JSON-License", "") dbutils.widgets.text("Databricks access token", "") dbutils.widgets.text("Databricks host", "") - # dbutils.widgets.text("Model to deploy", "") make_model_select_drop_down(models_df) dbutils.widgets.dropdown("hardware_target", "CPU", ["CPU", "GPU"]) - # avaiable_models = get_all_mm_models() - # first_model = list(avaiable_models.keys())[0] - # dbutils.widgets.dropdown("Model to Deploy", first_model,avaiable_models) - def get_db_token(): return dbutils.widgets.get("Databricks access token") @@ -156,7 +161,6 @@ def get_db_host(): return dbutils.widgets.get("Databricks host") -# def get_model():return dbutils.widgets.get('Model to deploy') def get_hardware_target(): return dbutils.widgets.get("hardware_target") @@ -165,20 +169,20 @@ def get_jsl_license(): return dbutils.widgets.get("JSL-JSON-License") -def deploy(deployed_endpoint_name=None, models_df=None): - if models_df is None: - from johnsnowlabs.auto_install.databricks.marketplace_offering import models_df - path_prefix = "john_snow_labs.test_models_v3" +def deploy(deployed_endpoint_name=None, jsl_model_id=None): + from johnsnowlabs.auto_install.databricks.marketplace_offering import models_df - # models = get_all_mm_models() db_token = get_db_token() db_host = get_db_host() os.environ["DATABRICKS_HOST"] = db_host os.environ["DATABRICKS_TOKEN"] = db_token hardware_target = get_hardware_target() jsl_license = get_jsl_license() - # model_name = get_model() - model_data = get_selected_model_metadata(models_df) + if not jsl_model_id: + model_data = get_selected_widget_model_metadata(models_df) + else: + model_data = get_model_metadta(models_df, jsl_model_id) + model_path = ( model_data.CpuModelPath.values[0] if hardware_target == "CPU" @@ -215,7 +219,7 @@ def deploy(deployed_endpoint_name=None, models_df=None): ) if endpoint_success == "RESOURCE_DOES_NOT_EXIST": - listing_id = model_data.PrivateListingId.values[0] + listing_id = model_data.ListingId.values[0] try: displayHTML( f"""Could not import the model. Please click this link and click on "get instant access" in the top right """ diff --git a/johnsnowlabs/auto_install/databricks/marketplace_offering.py b/johnsnowlabs/auto_install/databricks/marketplace_offering.py index e5559dbcff..3fd83ce869 100644 --- a/johnsnowlabs/auto_install/databricks/marketplace_offering.py +++ b/johnsnowlabs/auto_install/databricks/marketplace_offering.py @@ -1,44 +1,214 @@ models = { + "index": { + 0: 0, + 1: 1, + 2: 2, + 3: 3, + 4: 4, + 5: 5, + 6: 6, + 7: 8, + 8: 10, + 9: 11, + 10: 13, + 11: 14, + 12: 15, + 13: 16, + 14: 19, + 15: 21, + 16: 22, + 17: 23, + 18: 24, + 19: 25, + 20: 26, + 21: 29, + 22: 30, + 23: 32, + 24: 33, + 25: 34, + 26: 35, + 27: 37, + 28: 38, + 29: 39, + 30: 40, + 31: 41, + 32: 42, + 33: 43, + 34: 44, + 35: 45, + 36: 46, + 37: 47, + 38: 49, + 39: 50, + 40: 51, + 41: 52, + 42: 53, + 43: 54, + 44: 55, + 45: 56, + 46: 57, + 47: 58, + 48: 59, + 49: 60, + 50: 61, + 51: 63, + 52: 65, + 53: 67, + 54: 70, + 55: 71, + 56: 72, + 57: 73, + 58: 75, + 59: 80, + }, "NluRef": { - 0: "en.summarize.clinical_guidelines_large.pipeline", - 1: "en.resolve.cpt.augmented", - 2: "en.resolve.loinc.augmented", - 6: "en.med_ner.nihss_pipeline", - 7: "en.resolve.icd9.pipeline", - 8: "en.resolve.HPO", - 9: "en.explain_doc.clinical_radiology.pipeline", - 12: "en.explain_doc.era", - 13: "en.med_ner.pathogen.pipeline", - 14: "en.resolve.icdo_augmented", - 17: "en.med_ner.sdoh_langtest.pipeline", - 21: "pt.deid.clinical", - 23: "en.de_identify.clinical_pipeline", - 24: "ro.deid.clinical", - 25: "fr.deid_obfuscated", - 26: "es.deid.clinical", - 27: "en.map_entity.snomed_to_icdo", - 28: "en.med_ner.risk_factors.pipeline", + 0: "en.map_entity.umls_disease_syndrome_resolver", + 1: "en.answer_question.clinical_notes_onnx.pipeline", + 2: "en.classify.bert_sequence.vop_hcp_consult.pipeline", + 3: "en.resolve.cpt.augmented", + 4: "en.resolve.loinc.augmented", + 5: "en.summarize.clinical_guidelines_large.pipeline", + 6: "en.icd10cm_resolver.pipeline", + 7: "en.map_entity.umls_clinical_findings_resolver", + 8: "en.med_ner.nihss_pipeline", + 9: "en.resolve.icd9.pipeline", + 10: "en.map_entity.rxnorm_resolver.pipe", + 11: "en.resolve.HPO", + 12: "en.classify.bert_sequence.vop_drug_side_effect.pipeline", + 13: "en.map_entity.umls_drug_resolver", + 14: "en.summarize.clinical_laymen_onnx.pipeline", + 15: "en.explain_doc.era", + 16: "en.explain_doc.clinical_radiology.pipeline", + 17: "en.med_ner.pathogen.pipeline", + 18: "en.med_ner.vop_langtest", + 19: "en.resolve.icdo_augmented", + 20: "pt.deid.clinical", + 21: "ro.deid.clinical", + 22: "en.med_ner.sdoh_langtest.pipeline", + 23: "fr.deid_obfuscated", + 24: "en.summarize.clinical_questions.pipeline", + 25: "es.deid.clinical", + 26: "it.deid.clinical", + 27: "ar.deid.clinical", + 28: "en.de_identify.clinical_pipeline", 29: "de.deid.clinical", - 30: "it.deid.clinical", - 31: "en.explain_doc.clinical_ade", - 32: "en.summarize.radiology.pipeline", - 33: "en.med_ner.living_species.pipeline", - 34: "en.med_ner.anatom.pipeline", - 38: "en.med_ner.bionlp.pipeline", + 30: "en.resolve.snomed.findings", + 31: "en.ner.oncology.pipeline", + 32: "pt.deid.clinical", + 33: "en.summarize.clinical_jsl_augmented.pipeline", + 34: "en.map_entity.umls_drug_resolver", + 35: "en.map_entity.icd10cm_to_snomed.pipe", + 36: "ro.deid.clinical", + 37: "en.map_entity.snomed_to_icd10cm.pipe", + 38: "fr.deid_obfuscated", + 39: "es.deid.clinical", + 40: "ar.deid.clinical", + 41: "de.deid.clinical", + 42: "it.deid.clinical", + 43: "en.de_identify.clinical_pipeline", + 44: "en.summarize.biomedical_pubmed.pipeline", + 45: "en.map_entity.snomed_to_icdo", + 46: "en.explain_doc.clinical_ade", + 47: "en.med_ner.risk_factors.pipeline", + 48: "en.map_entity.rxnorm_to_ndc.pipe", + 49: "en.summarize.radiology.pipeline", + 50: "en.med_ner.anatom.pipeline", + 51: "en.icd10cm.umls.mapping", + 52: "en.med_ner.living_species.pipeline", + 53: "en.icd10_icd9.mapping", + 54: "en.rxnorm.umls.mapping", + 55: "en.med_ner.bionlp.pipeline", + 56: "en.snomed.umls.mapping", + 57: "en.rxnorm.mes.mapping", + 58: "en.mesh.umls.mapping", + 59: "en.resolve.medication", + }, + "Title": { + 0: "Extract Disease and Syndrom entities and their UMLS Codes", + 1: "Medical Question Answering (Open-Book on Clinical Notes)", + 2: "Detect Healthcare Professional Consult documents", + 3: "Extract procedures and measurements and their corresponding CPT codes", + 4: "Extract Laboratory Observations and the corresponding LOINC codes", + 5: "Guideline Summarizer for Asthma & Breast Cancer", + 6: "Extract Clinical Findings and the corresponding ICD10CM codes", + 7: "Extract Clinical Findings and their UMLS Codes", + 8: "Extract neurologic deficits related to Stroke Scale (NIHSS)", + 9: "Extract Clinical Findings and the corresponding ICD 9 codes", + 10: "Extract Drugs and the correspondingt RXNORM codes", + 11: "Extract phenotypic abnormalities and the coresponding HPO codes ", + 12: "Detect Drug Side Effect Narratives", + 13: "Extract Drugs and Substances and their UMLS Codes", + 14: "Summarize Clinical Notes in Laymen Terms ", + 15: "Extract clinical events and find temporal relations (ERA)", + 16: "Extract findings in radiology reports", + 17: "Detect Pathogen, Medical Condition and Medicine", + 18: "Extract patient information from patient narratives", + 19: "Resolve Oncology terminology with ICD-O Taxonomy", + 20: "Clinical De-identification for Portuguese (Obfuscate)", + 21: "Clinical De-identification for Romanian (Obfuscate)", + 22: "Extract Social Determinants of Health", + 23: "Clinical De-identification for French (Obfuscate)", + 24: "Summarize Clinical Question Notes", + 25: "Clinical De-identification for Spanish (Obfuscate)", + 26: "Clinical De-identification for Italian (Obfuscate)", + 27: "Clinical De-identification for Arabic (Obfuscate)", + 28: "Clinical De-identification (Obfuscate)", + 29: "Clinical De-identification for German (Obfuscate)", + 30: "SNOMED Clinical Health Information Coder", + 31: "Extract oncological entities and relations", + 32: "Clinical De-identification for Portuguese (Mask)", + 33: "Clinical Text Summarization", + 34: "Extract Drugs and their UMLS Codes", + 35: "ICD-10-CM to SNOMED Code Mapper", + 36: "Clinical De-identification for Romanian (Mask)", + 37: "SNOMED to ICD-10-CM Code Mapper", + 38: "Clinical De-identification for French (Mask)", + 39: "Clinical De-identification for Spanish (Mask)", + 40: "Clinical De-identification for Arabic (Mask)", + 41: "Clinical De-identification for German (Mask)", + 42: "Clinical De-identification forItalian (Mask)", + 43: "Clinical De-identification (Mask)", + 44: "Summarize PubMed Research", + 45: "SNOMED Codes to ICDO Codes Mapper", + 46: "Extract Adverse Drug Events (ADE)", + 47: "Extract clinical risk factors", + 48: "RxNorm to NDC Code Converter", + 49: "Summarize Radiology Reports", + 50: "Extract Anatomical Structures", + 51: " ICD-10-CM to UMLS Code Mapper", + 52: "Extract Living Species", + 53: "ICD-10 to ICD-9 Code Converter", + 54: "RxNorm to UMLS Code Mapper", + 55: "Detect Cancer Genetics", + 56: "SNOMED to UMLS Code Mapper", + 57: "RxNorm to MeSH Code Mapper", + 58: "MeSH to UMLS Code Mapper", + 59: "Medication Coder", }, "ReleaseID": { 0: "0.9", 1: "0.9", 2: "0.9", + 3: "0.9", + 4: "0.9", + 5: "0.9", 6: "0.9", 7: "0.9", 8: "0.9", 9: "0.9", + 10: "0.9", + 11: "0.9", 12: "0.9", 13: "0.9", 14: "0.9", + 15: "0.9", + 16: "0.9", 17: "0.9", + 18: "0.9", + 19: "0.9", + 20: "0.9", 21: "0.9", + 22: "0.9", 23: "0.9", 24: "0.9", 25: "0.9", @@ -51,119 +221,469 @@ 32: "0.9", 33: "0.9", 34: "0.9", + 35: "0.9", + 36: "0.9", + 37: "0.9", 38: "0.9", + 39: "0.9", + 40: "0.9", + 41: "0.9", + 42: "0.9", + 43: "0.9", + 44: "0.9", + 45: "0.9", + 46: "0.9", + 47: "0.9", + 48: "0.9", + 49: "0.9", + 50: "0.9", + 51: "0.9", + 52: "0.9", + 53: "0.9", + 54: "0.9", + 55: "0.9", + 56: "0.9", + 57: "0.9", + 58: "0.9", + 59: "0.9", + }, + "BaseModelPath": { + 0: "john_snow_labs_extract_disease_and_syndrom_entities_and_their_umls_codes.johnsnowlabs_folder.en_map_entity_umls_disease_syndrome_resolver", + 1: "john_snow_labs_medical_question_answering_open_book_on_clinical_notes.johnsnowlabs_folder.en_answer_question_clinical_notes_onnx_pipeline", + 2: "john_snow_labs_detect_healthcare_professional_consult_documents.johnsnowlabs_folder.en_classify_bert_sequence_vop_hcp_consult_pipeline", + 3: "john_snow_labs_extract_procedures_and_measurements_and_their_corresponding_cpt_codes.johnsnowlabs_folder.en_resolve_cpt_augmented", + 4: "john_snow_labs_extract_laboratory_observations_and_the_corresponding_loinc_codes.johnsnowlabs_folder.en_resolve_loinc_augmented", + 5: "john_snow_labs_guideline_summarizer_for_asthma___breast_cancer.johnsnowlabs_folder.en_summarize_clinical_guidelines_large_pipeline", + 6: "john_snow_labs_extract_clinical_findings_and_the_corresponding_icd10cm_codes.johnsnowlabs_folder.en_icd10cm_resolver_pipeline", + 7: "john_snow_labs_extract_clinical_findings_and_their_umls_codes.johnsnowlabs_folder.en_map_entity_umls_clinical_findings_resolver", + 8: "john_snow_labs_extract_neurologic_deficits_related_to_stroke_scale_nihss.johnsnowlabs_folder.en_med_ner_nihss_pipeline", + 9: "john_snow_labs_extract_clinical_findings_and_the_corresponding_icd_9_codes.johnsnowlabs_folder.en_resolve_icd9_pipeline", + 10: "john_snow_labs_extract_drugs_and_the_correspondingt_rxnorm_codes.johnsnowlabs_folder.en_map_entity_rxnorm_resolver_pipe", + 11: "john_snow_labs_extract_phenotypic_abnormalities_and_the_coresponding_hpo_codes_.johnsnowlabs_folder.en_resolve_HPO", + 12: "john_snow_labs_detect_drug_side_effect_narratives.johnsnowlabs_folder.en_classify_bert_sequence_vop_drug_side_effect_pipeline", + 13: "john_snow_labs_extract__drugs_and_substances_and_their_umls_codes.johnsnowlabs_folder.en_map_entity_umls_drug_resolver", + 14: "john_snow_labs_summarize_clinical_notes_in_laymen_terms_.johnsnowlabs_folder.en_summarize_clinical_laymen_onnx_pipeline", + 15: "john_snow_labs_extract_clinical_events_and_find_temporal_relations_era.johnsnowlabs_folder.en_explain_doc_era", + 16: "john_snow_labs_extract_findings_in_radiology_reports.johnsnowlabs_folder.en_explain_doc_clinical_radiology_pipeline", + 17: "john_snow_labs_detect_pathogen,_medical_condition_and_medicine.johnsnowlabs_folder.en_med_ner_pathogen_pipeline", + 18: "john_snow_labs_extract_patient_information_from_patient_narratives.johnsnowlabs_folder.en_med_ner_vop_langtest", + 19: "john_snow_labs_resolve_oncology_terminology_with_icd_o_taxonomy.johnsnowlabs_folder.en_resolve_icdo_augmented", + 20: "john_snow_labs_clinical_de_identification_for_portuguese_obfuscate.johnsnowlabs_folder.pt_deid_clinical", + 21: "john_snow_labs_clinical_de_identification_for_romanian_obfuscate.johnsnowlabs_folder.ro_deid_clinical", + 22: "john_snow_labs_extract_social_determinants_of_health.johnsnowlabs_folder.en_med_ner_sdoh_langtest_pipeline", + 23: "john_snow_labs_clinical_de_identification_for_french_obfuscate.johnsnowlabs_folder.fr_deid_obfuscated", + 24: "john_snow_labs_summarize_clinical_question_notes.johnsnowlabs_folder.en_summarize_clinical_questions_pipeline", + 25: "john_snow_labs_clinical_de_identification_for_spanish_obfuscate.johnsnowlabs_folder.es_deid_clinical", + 26: "john_snow_labs_clinical_de_identification_for_italian_obfuscate.johnsnowlabs_folder.it_deid_clinical", + 27: "john_snow_labs_clinical_de_identification_for_arabic_obfuscate.johnsnowlabs_folder.ar_deid_clinical", + 28: "john_snow_labs_clinical_de_identification_obfuscate.johnsnowlabs_folder.en_de_identify_clinical_pipeline", + 29: "john_snow_labs_clinical_de_identification_for_german_obfuscate.johnsnowlabs_folder.de_deid_clinical", + 30: "john_snow_labs_snomed_clinical_health_information_coder.johnsnowlabs_folder.en_resolve_snomed_findings", + 31: "john_snow_labs_extract_oncological_entities_and_relations.johnsnowlabs_folder.en_ner_oncology_pipeline", + 32: "john_snow_labs_clinical_de_identification_for_portuguese_mask.johnsnowlabs_folder.pt_deid_clinical", + 33: "john_snow_labs_clinical_text_summarization.johnsnowlabs_folder.en_summarize_clinical_jsl_augmented_pipeline", + 34: "john_snow_labs_extract_drugs_and_their_umls_codes.johnsnowlabs_folder.en_map_entity_umls_drug_resolver", + 35: "john_snow_labs_icd_10_cm_to_snomed_code_mapper.johnsnowlabs_folder.en_map_entity_icd10cm_to_snomed_pipe", + 36: "john_snow_labs_clinical_de_identification_for_romanian_mask.johnsnowlabs_folder.ro_deid_clinical", + 37: "john_snow_labs_snomed_to_icd_10_cm_code_mapper.johnsnowlabs_folder.en_map_entity_snomed_to_icd10cm_pipe", + 38: "john_snow_labs_clinical_de_identification_for_french_mask.johnsnowlabs_folder.fr_deid_obfuscated", + 39: "john_snow_labs_clinical_de_identification_for_spanish_mask.johnsnowlabs_folder.es_deid_clinical", + 40: "john_snow_labs_clinical_de_identification_for_arabic_mask.johnsnowlabs_folder.ar_deid_clinical", + 41: "john_snow_labs_clinical_de_identification_for_german_mask.johnsnowlabs_folder.de_deid_clinical", + 42: "john_snow_labs_clinical_de_identification_foritalian_mask.johnsnowlabs_folder.it_deid_clinical", + 43: "john_snow_labs_clinical_de_identification_mask.johnsnowlabs_folder.en_de_identify_clinical_pipeline", + 44: "john_snow_labs_summarize_pubmed_research.johnsnowlabs_folder.en_summarize_biomedical_pubmed_pipeline", + 45: "john_snow_labs_snomed_codes_to_icdo_codes_mapper.johnsnowlabs_folder.en_map_entity_snomed_to_icdo", + 46: "john_snow_labs_extract_adverse_drug_events_ade.johnsnowlabs_folder.en_explain_doc_clinical_ade", + 47: "john_snow_labs_extract_clinical_risk_factors.johnsnowlabs_folder.en_med_ner_risk_factors_pipeline", + 48: "john_snow_labs_rxnorm_to_ndc_code_converter.johnsnowlabs_folder.en_map_entity_rxnorm_to_ndc_pipe", + 49: "john_snow_labs_summarize_radiology_reports.johnsnowlabs_folder.en_summarize_radiology_pipeline", + 50: "john_snow_labs_extract_anatomical_structures.johnsnowlabs_folder.en_med_ner_anatom_pipeline", + 51: "john_snow_labs__icd_10_cm_to_umls_code_mapper.johnsnowlabs_folder.en_icd10cm_umls_mapping", + 52: "john_snow_labs_extract_living_species.johnsnowlabs_folder.en_med_ner_living_species_pipeline", + 53: "john_snow_labs_icd_10_to_icd_9_code_converter.johnsnowlabs_folder.en_icd10_icd9_mapping", + 54: "john_snow_labs_rxnorm_to_umls_code_mapper.johnsnowlabs_folder.en_rxnorm_umls_mapping", + 55: "john_snow_labs_detect_cancer_genetics.johnsnowlabs_folder.en_med_ner_bionlp_pipeline", + 56: "john_snow_labs_snomed_to_umls_code_mapper.johnsnowlabs_folder.en_snomed_umls_mapping", + 57: "john_snow_labs_rxnorm_to_mesh_code_mapper.johnsnowlabs_folder.en_rxnorm_mes_mapping", + 58: "john_snow_labs_mesh_to_umls_code_mapper.johnsnowlabs_folder.en_mesh_umls_mapping", + 59: "john_snow_labs_medication_coder.johnsnowlabs_folder.en_resolve_medication", }, "CpuModelPath": { - 0: "john_snow_labs_guideline_summarizer_for_asthma_breast_cancer.johnsnowlabs_folder.en_summarize_clinical_guidelines_large_pipeline_cpu", - 1: "john_snow_labs_extract_procedures_and_measurements_and_their_corresponding_cpt_codes.johnsnowlabs_folder.en_resolve_cpt_augmented_cpu", - 2: "john_snow_labs_extract_laboratory_observations_and_the_corresponding_loinc_codes.johnsnowlabs_folder.en_resolve_loinc_augmented_cpu", - 6: "john_snow_labs_extract_neurologic_deficits_related_to_stroke_scale_nihss.johnsnowlabs_folder.en_med_ner_nihss_pipeline_cpu", - 7: "john_snow_labs_extract_clinical_findings_and_the_corresponding_icd_9_codes.johnsnowlabs_folder.en_resolve_icd9_pipeline_cpu", - 8: "john_snow_labs_extract_phenotypic_abnormalities_and_the_coresponding_hpo_codes_.johnsnowlabs_folder.en_resolve_HPO_cpu", - 9: "john_snow_labs_extract_findings_in_radiology_reports.johnsnowlabs_folder.en_explain_doc_clinical_radiology_pipeline_cpu", - 12: "john_snow_labs_extract_clinical_events_and_find_temporal_relations_era.johnsnowlabs_folder.en_explain_doc_era_cpu", - 13: "john_snow_labs_detect_pathogen,_medical_condition_and_medicine.johnsnowlabs_folder.en_med_ner_pathogen_pipeline_cpu", # TODO BAD!! also __!!! - 14: "john_snow_labs_resolve_oncology_terminology_with_icd_o_taxonomy.johnsnowlabs_folder.en_resolve_icdo_augmented_cpu", - 17: "john_snow_labs_extract_social_determinants_of_health.johnsnowlabs_folder.en_med_ner_sdoh_langtest_pipeline_cpu", - 21: "john_snow_labs_clinical_de_identification_for_portuguese_mask.johnsnowlabs_folder.pt_deid_clinical_cpu", - 23: "john_snow_labs_clinical_de_identification_mask.johnsnowlabs_folder.en_de_identify_clinical_pipeline_cpu", - 24: "john_snow_labs_clinical_de_identification_for_romanian_mask.johnsnowlabs_folder.ro_deid_clinical_cpu", - 25: "john_snow_labs_clinical_de_identification_for_french_mask.johnsnowlabs_folder.fr_deid_obfuscated_cpu", - 26: "john_snow_labs_clinical_de_identification_for_spanish_mask.johnsnowlabs_folder.es_deid_clinical_cpu", - 27: "john_snow_labs_snomed_codes_to_icdo_codes_mapper.johnsnowlabs_folder.en_map_entity_snomed_to_icdo_cpu", - 28: "john_snow_labs_extract_clinical_risk_factors.johnsnowlabs_folder.en_med_ner_risk_factors_pipeline_cpu", - 29: "john_snow_labs_clinical_de_identification_for_german_mask.johnsnowlabs_folder.de_deid_clinical_cpu", - 30: "john_snow_labs_clinical_de_identification_foritalian_mask.johnsnowlabs_folder.it_deid_clinical_cpu", - 31: "john_snow_labs_extract_adverse_drug_events_ade.johnsnowlabs_folder.en_explain_doc_clinical_ade_cpu", - 32: "john_snow_labs_summarize_radiology_reports.johnsnowlabs_folder.en_summarize_radiology_pipeline_cpu", - 33: "john_snow_labs_extract_living_species.johnsnowlabs_folder.en_med_ner_living_species_pipeline_cpu", - 34: "john_snow_labs_extract_anatomical_structures.johnsnowlabs_folder.en_med_ner_anatom_pipeline_cpu", - 38: "john_snow_labs_detect_cancer_genetics.johnsnowlabs_folder.en_med_ner_bionlp_pipeline_cpu", + 0: "john_snow_labs_extract_disease_and_syndrom_entities_and_their_umls_codes.johnsnowlabs_folder.en_map_entity_umls_disease_syndrome_resolver_cpu", + 1: "john_snow_labs_medical_question_answering_open_book_on_clinical_notes.johnsnowlabs_folder.en_answer_question_clinical_notes_onnx_pipeline_cpu", + 2: "john_snow_labs_detect_healthcare_professional_consult_documents.johnsnowlabs_folder.en_classify_bert_sequence_vop_hcp_consult_pipeline_cpu", + 3: "john_snow_labs_extract_procedures_and_measurements_and_their_corresponding_cpt_codes.johnsnowlabs_folder.en_resolve_cpt_augmented_cpu", + 4: "john_snow_labs_extract_laboratory_observations_and_the_corresponding_loinc_codes.johnsnowlabs_folder.en_resolve_loinc_augmented_cpu", + 5: "john_snow_labs_guideline_summarizer_for_asthma___breast_cancer.johnsnowlabs_folder.en_summarize_clinical_guidelines_large_pipeline_cpu", + 6: "john_snow_labs_extract_clinical_findings_and_the_corresponding_icd10cm_codes.johnsnowlabs_folder.en_icd10cm_resolver_pipeline_cpu", + 7: "john_snow_labs_extract_clinical_findings_and_their_umls_codes.johnsnowlabs_folder.en_map_entity_umls_clinical_findings_resolver_cpu", + 8: "john_snow_labs_extract_neurologic_deficits_related_to_stroke_scale_nihss.johnsnowlabs_folder.en_med_ner_nihss_pipeline_cpu", + 9: "john_snow_labs_extract_clinical_findings_and_the_corresponding_icd_9_codes.johnsnowlabs_folder.en_resolve_icd9_pipeline_cpu", + 10: "john_snow_labs_extract_drugs_and_the_correspondingt_rxnorm_codes.johnsnowlabs_folder.en_map_entity_rxnorm_resolver_pipe_cpu", + 11: "john_snow_labs_extract_phenotypic_abnormalities_and_the_coresponding_hpo_codes_.johnsnowlabs_folder.en_resolve_HPO_cpu", + 12: "john_snow_labs_detect_drug_side_effect_narratives.johnsnowlabs_folder.en_classify_bert_sequence_vop_drug_side_effect_pipeline_cpu", + 13: "john_snow_labs_extract__drugs_and_substances_and_their_umls_codes.johnsnowlabs_folder.en_map_entity_umls_drug_resolver_cpu", + 14: "john_snow_labs_summarize_clinical_notes_in_laymen_terms_.johnsnowlabs_folder.en_summarize_clinical_laymen_onnx_pipeline_cpu", + 15: "john_snow_labs_extract_clinical_events_and_find_temporal_relations_era.johnsnowlabs_folder.en_explain_doc_era_cpu", + 16: "john_snow_labs_extract_findings_in_radiology_reports.johnsnowlabs_folder.en_explain_doc_clinical_radiology_pipeline_cpu", + 17: "john_snow_labs_detect_pathogen,_medical_condition_and_medicine.johnsnowlabs_folder.en_med_ner_pathogen_pipeline_cpu", + 18: "john_snow_labs_extract_patient_information_from_patient_narratives.johnsnowlabs_folder.en_med_ner_vop_langtest_cpu", + 19: "john_snow_labs_resolve_oncology_terminology_with_icd_o_taxonomy.johnsnowlabs_folder.en_resolve_icdo_augmented_cpu", + 20: "john_snow_labs_clinical_de_identification_for_portuguese_obfuscate.johnsnowlabs_folder.pt_deid_clinical_cpu", + 21: "john_snow_labs_clinical_de_identification_for_romanian_obfuscate.johnsnowlabs_folder.ro_deid_clinical_cpu", + 22: "john_snow_labs_extract_social_determinants_of_health.johnsnowlabs_folder.en_med_ner_sdoh_langtest_pipeline_cpu", + 23: "john_snow_labs_clinical_de_identification_for_french_obfuscate.johnsnowlabs_folder.fr_deid_obfuscated_cpu", + 24: "john_snow_labs_summarize_clinical_question_notes.johnsnowlabs_folder.en_summarize_clinical_questions_pipeline_cpu", + 25: "john_snow_labs_clinical_de_identification_for_spanish_obfuscate.johnsnowlabs_folder.es_deid_clinical_cpu", + 26: "john_snow_labs_clinical_de_identification_for_italian_obfuscate.johnsnowlabs_folder.it_deid_clinical_cpu", + 27: "john_snow_labs_clinical_de_identification_for_arabic_obfuscate.johnsnowlabs_folder.ar_deid_clinical_cpu", + 28: "john_snow_labs_clinical_de_identification_obfuscate.johnsnowlabs_folder.en_de_identify_clinical_pipeline_cpu", + 29: "john_snow_labs_clinical_de_identification_for_german_obfuscate.johnsnowlabs_folder.de_deid_clinical_cpu", + 30: "john_snow_labs_snomed_clinical_health_information_coder.johnsnowlabs_folder.en_resolve_snomed_findings_cpu", + 31: "john_snow_labs_extract_oncological_entities_and_relations.johnsnowlabs_folder.en_ner_oncology_pipeline_cpu", + 32: "john_snow_labs_clinical_de_identification_for_portuguese_mask.johnsnowlabs_folder.pt_deid_clinical_cpu", + 33: "john_snow_labs_clinical_text_summarization.johnsnowlabs_folder.en_summarize_clinical_jsl_augmented_pipeline_cpu", + 34: "john_snow_labs_extract_drugs_and_their_umls_codes.johnsnowlabs_folder.en_map_entity_umls_drug_resolver_cpu", + 35: "john_snow_labs_icd_10_cm_to_snomed_code_mapper.johnsnowlabs_folder.en_map_entity_icd10cm_to_snomed_pipe_cpu", + 36: "john_snow_labs_clinical_de_identification_for_romanian_mask.johnsnowlabs_folder.ro_deid_clinical_cpu", + 37: "john_snow_labs_snomed_to_icd_10_cm_code_mapper.johnsnowlabs_folder.en_map_entity_snomed_to_icd10cm_pipe_cpu", + 38: "john_snow_labs_clinical_de_identification_for_french_mask.johnsnowlabs_folder.fr_deid_obfuscated_cpu", + 39: "john_snow_labs_clinical_de_identification_for_spanish_mask.johnsnowlabs_folder.es_deid_clinical_cpu", + 40: "john_snow_labs_clinical_de_identification_for_arabic_mask.johnsnowlabs_folder.ar_deid_clinical_cpu", + 41: "john_snow_labs_clinical_de_identification_for_german_mask.johnsnowlabs_folder.de_deid_clinical_cpu", + 42: "john_snow_labs_clinical_de_identification_foritalian_mask.johnsnowlabs_folder.it_deid_clinical_cpu", + 43: "john_snow_labs_clinical_de_identification_mask.johnsnowlabs_folder.en_de_identify_clinical_pipeline_cpu", + 44: "john_snow_labs_summarize_pubmed_research.johnsnowlabs_folder.en_summarize_biomedical_pubmed_pipeline_cpu", + 45: "john_snow_labs_snomed_codes_to_icdo_codes_mapper.johnsnowlabs_folder.en_map_entity_snomed_to_icdo_cpu", + 46: "john_snow_labs_extract_adverse_drug_events_ade.johnsnowlabs_folder.en_explain_doc_clinical_ade_cpu", + 47: "john_snow_labs_extract_clinical_risk_factors.johnsnowlabs_folder.en_med_ner_risk_factors_pipeline_cpu", + 48: "john_snow_labs_rxnorm_to_ndc_code_converter.johnsnowlabs_folder.en_map_entity_rxnorm_to_ndc_pipe_cpu", + 49: "john_snow_labs_summarize_radiology_reports.johnsnowlabs_folder.en_summarize_radiology_pipeline_cpu", + 50: "john_snow_labs_extract_anatomical_structures.johnsnowlabs_folder.en_med_ner_anatom_pipeline_cpu", + 51: "john_snow_labs__icd_10_cm_to_umls_code_mapper.johnsnowlabs_folder.en_icd10cm_umls_mapping_cpu", + 52: "john_snow_labs_extract_living_species.johnsnowlabs_folder.en_med_ner_living_species_pipeline_cpu", + 53: "john_snow_labs_icd_10_to_icd_9_code_converter.johnsnowlabs_folder.en_icd10_icd9_mapping_cpu", + 54: "john_snow_labs_rxnorm_to_umls_code_mapper.johnsnowlabs_folder.en_rxnorm_umls_mapping_cpu", + 55: "john_snow_labs_detect_cancer_genetics.johnsnowlabs_folder.en_med_ner_bionlp_pipeline_cpu", + 56: "john_snow_labs_snomed_to_umls_code_mapper.johnsnowlabs_folder.en_snomed_umls_mapping_cpu", + 57: "john_snow_labs_rxnorm_to_mesh_code_mapper.johnsnowlabs_folder.en_rxnorm_mes_mapping_cpu", + 58: "john_snow_labs_mesh_to_umls_code_mapper.johnsnowlabs_folder.en_mesh_umls_mapping_cpu", + 59: "john_snow_labs_medication_coder.johnsnowlabs_folder.en_resolve_medication_cpu", }, "GpuModelPath": { - 0: "john_snow_labs_guideline_summarizer_for_asthma_breast_cancer.johnsnowlabs_folder.en_summarize_clinical_guidelines_large_pipeline_gpu", - 1: "john_snow_labs_extract_procedures_and_measurements_and_their_corresponding_cpt_codes.johnsnowlabs_folder.en_resolve_cpt_augmented_gpu", - 2: "john_snow_labs_extract_laboratory_observations_and_the_corresponding_loinc_codes.johnsnowlabs_folder.en_resolve_loinc_augmented_gpu", - 6: "john_snow_labs_extract_neurologic_deficits_related_to_stroke_scale_nihss.johnsnowlabs_folder.en_med_ner_nihss_pipeline_gpu", - 7: "john_snow_labs_extract_clinical_findings_and_the_corresponding_icd_9_codes.johnsnowlabs_folder.en_resolve_icd9_pipeline_gpu", - 8: "john_snow_labs_extract_phenotypic_abnormalities_and_the_coresponding_hpo_codes_.johnsnowlabs_folder.en_resolve_HPO_gpu", - 9: "john_snow_labs_extract_findings_in_radiology_reports.johnsnowlabs_folder.en_explain_doc_clinical_radiology_pipeline_gpu", - 12: "john_snow_labs_extract_clinical_events_and_find_temporal_relations_era.johnsnowlabs_folder.en_explain_doc_era_gpu", - 13: "john_snow_labs_detect_pathogen,_medical_condition_and_medicine.johnsnowlabs_folder.en_med_ner_pathogen_pipeline_gpu", - 14: "john_snow_labs_resolve_oncology_terminology_with_icd_o_taxonomy.johnsnowlabs_folder.en_resolve_icdo_augmented_gpu", - 17: "john_snow_labs_extract_social_determinants_of_health.johnsnowlabs_folder.en_med_ner_sdoh_langtest_pipeline_gpu", - 21: "john_snow_labs_clinical_de_identification_for_portuguese_mask.johnsnowlabs_folder.pt_deid_clinical_gpu", - 23: "john_snow_labs_clinical_de_identification_mask.johnsnowlabs_folder.en_de_identify_clinical_pipeline_gpu", - 24: "john_snow_labs_clinical_de_identification_for_romanian_mask.johnsnowlabs_folder.ro_deid_clinical_gpu", - 25: "john_snow_labs_clinical_de_identification_for_french_mask.johnsnowlabs_folder.fr_deid_obfuscated_gpu", - 26: "john_snow_labs_clinical_de_identification_for_spanish_mask.johnsnowlabs_folder.es_deid_clinical_gpu", - 27: "john_snow_labs_snomed_codes_to_icdo_codes_mapper.johnsnowlabs_folder.en_map_entity_snomed_to_icdo_gpu", - 28: "john_snow_labs_extract_clinical_risk_factors.johnsnowlabs_folder.en_med_ner_risk_factors_pipeline_gpu", - 29: "john_snow_labs_clinical_de_identification_for_german_mask.johnsnowlabs_folder.de_deid_clinical_gpu", - 30: "john_snow_labs_clinical_de_identification_foritalian_mask.johnsnowlabs_folder.it_deid_clinical_gpu", - 31: "john_snow_labs_extract_adverse_drug_events_ade.johnsnowlabs_folder.en_explain_doc_clinical_ade_gpu", - 32: "john_snow_labs_summarize_radiology_reports.johnsnowlabs_folder.en_summarize_radiology_pipeline_gpu", - 33: "john_snow_labs_extract_living_species.johnsnowlabs_folder.en_med_ner_living_species_pipeline_gpu", - 34: "john_snow_labs_extract_anatomical_structures.johnsnowlabs_folder.en_med_ner_anatom_pipeline_gpu", - 38: "john_snow_labs_detect_cancer_genetics.johnsnowlabs_folder.en_med_ner_bionlp_pipeline_gpu", + 0: "john_snow_labs_extract_disease_and_syndrom_entities_and_their_umls_codes.johnsnowlabs_folder.en_map_entity_umls_disease_syndrome_resolver_gpu", + 1: "john_snow_labs_medical_question_answering_open_book_on_clinical_notes.johnsnowlabs_folder.en_answer_question_clinical_notes_onnx_pipeline_gpu", + 2: "john_snow_labs_detect_healthcare_professional_consult_documents.johnsnowlabs_folder.en_classify_bert_sequence_vop_hcp_consult_pipeline_gpu", + 3: "john_snow_labs_extract_procedures_and_measurements_and_their_corresponding_cpt_codes.johnsnowlabs_folder.en_resolve_cpt_augmented_gpu", + 4: "john_snow_labs_extract_laboratory_observations_and_the_corresponding_loinc_codes.johnsnowlabs_folder.en_resolve_loinc_augmented_gpu", + 5: "john_snow_labs_guideline_summarizer_for_asthma___breast_cancer.johnsnowlabs_folder.en_summarize_clinical_guidelines_large_pipeline_gpu", + 6: "john_snow_labs_extract_clinical_findings_and_the_corresponding_icd10cm_codes.johnsnowlabs_folder.en_icd10cm_resolver_pipeline_gpu", + 7: "john_snow_labs_extract_clinical_findings_and_their_umls_codes.johnsnowlabs_folder.en_map_entity_umls_clinical_findings_resolver_gpu", + 8: "john_snow_labs_extract_neurologic_deficits_related_to_stroke_scale_nihss.johnsnowlabs_folder.en_med_ner_nihss_pipeline_gpu", + 9: "john_snow_labs_extract_clinical_findings_and_the_corresponding_icd_9_codes.johnsnowlabs_folder.en_resolve_icd9_pipeline_gpu", + 10: "john_snow_labs_extract_drugs_and_the_correspondingt_rxnorm_codes.johnsnowlabs_folder.en_map_entity_rxnorm_resolver_pipe_gpu", + 11: "john_snow_labs_extract_phenotypic_abnormalities_and_the_coresponding_hpo_codes_.johnsnowlabs_folder.en_resolve_HPO_gpu", + 12: "john_snow_labs_detect_drug_side_effect_narratives.johnsnowlabs_folder.en_classify_bert_sequence_vop_drug_side_effect_pipeline_gpu", + 13: "john_snow_labs_extract__drugs_and_substances_and_their_umls_codes.johnsnowlabs_folder.en_map_entity_umls_drug_resolver_gpu", + 14: "john_snow_labs_summarize_clinical_notes_in_laymen_terms_.johnsnowlabs_folder.en_summarize_clinical_laymen_onnx_pipeline_gpu", + 15: "john_snow_labs_extract_clinical_events_and_find_temporal_relations_era.johnsnowlabs_folder.en_explain_doc_era_gpu", + 16: "john_snow_labs_extract_findings_in_radiology_reports.johnsnowlabs_folder.en_explain_doc_clinical_radiology_pipeline_gpu", + 17: "john_snow_labs_detect_pathogen,_medical_condition_and_medicine.johnsnowlabs_folder.en_med_ner_pathogen_pipeline_gpu", + 18: "john_snow_labs_extract_patient_information_from_patient_narratives.johnsnowlabs_folder.en_med_ner_vop_langtest_gpu", + 19: "john_snow_labs_resolve_oncology_terminology_with_icd_o_taxonomy.johnsnowlabs_folder.en_resolve_icdo_augmented_gpu", + 20: "john_snow_labs_clinical_de_identification_for_portuguese_obfuscate.johnsnowlabs_folder.pt_deid_clinical_gpu", + 21: "john_snow_labs_clinical_de_identification_for_romanian_obfuscate.johnsnowlabs_folder.ro_deid_clinical_gpu", + 22: "john_snow_labs_extract_social_determinants_of_health.johnsnowlabs_folder.en_med_ner_sdoh_langtest_pipeline_gpu", + 23: "john_snow_labs_clinical_de_identification_for_french_obfuscate.johnsnowlabs_folder.fr_deid_obfuscated_gpu", + 24: "john_snow_labs_summarize_clinical_question_notes.johnsnowlabs_folder.en_summarize_clinical_questions_pipeline_gpu", + 25: "john_snow_labs_clinical_de_identification_for_spanish_obfuscate.johnsnowlabs_folder.es_deid_clinical_gpu", + 26: "john_snow_labs_clinical_de_identification_for_italian_obfuscate.johnsnowlabs_folder.it_deid_clinical_gpu", + 27: "john_snow_labs_clinical_de_identification_for_arabic_obfuscate.johnsnowlabs_folder.ar_deid_clinical_gpu", + 28: "john_snow_labs_clinical_de_identification_obfuscate.johnsnowlabs_folder.en_de_identify_clinical_pipeline_gpu", + 29: "john_snow_labs_clinical_de_identification_for_german_obfuscate.johnsnowlabs_folder.de_deid_clinical_gpu", + 30: "john_snow_labs_snomed_clinical_health_information_coder.johnsnowlabs_folder.en_resolve_snomed_findings_gpu", + 31: "john_snow_labs_extract_oncological_entities_and_relations.johnsnowlabs_folder.en_ner_oncology_pipeline_gpu", + 32: "john_snow_labs_clinical_de_identification_for_portuguese_mask.johnsnowlabs_folder.pt_deid_clinical_gpu", + 33: "john_snow_labs_clinical_text_summarization.johnsnowlabs_folder.en_summarize_clinical_jsl_augmented_pipeline_gpu", + 34: "john_snow_labs_extract_drugs_and_their_umls_codes.johnsnowlabs_folder.en_map_entity_umls_drug_resolver_gpu", + 35: "john_snow_labs_icd_10_cm_to_snomed_code_mapper.johnsnowlabs_folder.en_map_entity_icd10cm_to_snomed_pipe_gpu", + 36: "john_snow_labs_clinical_de_identification_for_romanian_mask.johnsnowlabs_folder.ro_deid_clinical_gpu", + 37: "john_snow_labs_snomed_to_icd_10_cm_code_mapper.johnsnowlabs_folder.en_map_entity_snomed_to_icd10cm_pipe_gpu", + 38: "john_snow_labs_clinical_de_identification_for_french_mask.johnsnowlabs_folder.fr_deid_obfuscated_gpu", + 39: "john_snow_labs_clinical_de_identification_for_spanish_mask.johnsnowlabs_folder.es_deid_clinical_gpu", + 40: "john_snow_labs_clinical_de_identification_for_arabic_mask.johnsnowlabs_folder.ar_deid_clinical_gpu", + 41: "john_snow_labs_clinical_de_identification_for_german_mask.johnsnowlabs_folder.de_deid_clinical_gpu", + 42: "john_snow_labs_clinical_de_identification_foritalian_mask.johnsnowlabs_folder.it_deid_clinical_gpu", + 43: "john_snow_labs_clinical_de_identification_mask.johnsnowlabs_folder.en_de_identify_clinical_pipeline_gpu", + 44: "john_snow_labs_summarize_pubmed_research.johnsnowlabs_folder.en_summarize_biomedical_pubmed_pipeline_gpu", + 45: "john_snow_labs_snomed_codes_to_icdo_codes_mapper.johnsnowlabs_folder.en_map_entity_snomed_to_icdo_gpu", + 46: "john_snow_labs_extract_adverse_drug_events_ade.johnsnowlabs_folder.en_explain_doc_clinical_ade_gpu", + 47: "john_snow_labs_extract_clinical_risk_factors.johnsnowlabs_folder.en_med_ner_risk_factors_pipeline_gpu", + 48: "john_snow_labs_rxnorm_to_ndc_code_converter.johnsnowlabs_folder.en_map_entity_rxnorm_to_ndc_pipe_gpu", + 49: "john_snow_labs_summarize_radiology_reports.johnsnowlabs_folder.en_summarize_radiology_pipeline_gpu", + 50: "john_snow_labs_extract_anatomical_structures.johnsnowlabs_folder.en_med_ner_anatom_pipeline_gpu", + 51: "john_snow_labs__icd_10_cm_to_umls_code_mapper.johnsnowlabs_folder.en_icd10cm_umls_mapping_gpu", + 52: "john_snow_labs_extract_living_species.johnsnowlabs_folder.en_med_ner_living_species_pipeline_gpu", + 53: "john_snow_labs_icd_10_to_icd_9_code_converter.johnsnowlabs_folder.en_icd10_icd9_mapping_gpu", + 54: "john_snow_labs_rxnorm_to_umls_code_mapper.johnsnowlabs_folder.en_rxnorm_umls_mapping_gpu", + 55: "john_snow_labs_detect_cancer_genetics.johnsnowlabs_folder.en_med_ner_bionlp_pipeline_gpu", + 56: "john_snow_labs_snomed_to_umls_code_mapper.johnsnowlabs_folder.en_snomed_umls_mapping_gpu", + 57: "john_snow_labs_rxnorm_to_mesh_code_mapper.johnsnowlabs_folder.en_rxnorm_mes_mapping_gpu", + 58: "john_snow_labs_mesh_to_umls_code_mapper.johnsnowlabs_folder.en_mesh_umls_mapping_gpu", + 59: "john_snow_labs_medication_coder.johnsnowlabs_folder.en_resolve_medication_gpu", }, "ListingId": { - 0: "153b223a-d73f-479f-a51c-8905434b545d", - 1: "e1a5be5d-b799-4bd1-a664-c31b9c47225f", - 2: "a299884a-7a95-4ddf-96e0-b8594c4290d3", - 6: "7afe6ca0-ad66-489b-b2d0-b31b0644d053", - 7: "c2469843-c104-4201-9db5-ba1542823448", - 8: "d07d7654-d483-4f1d-bb26-13b02197b87f", - 9: "a516cbd4-107d-4194-ab02-74095c155f34", - 12: "2a078943-c56d-48b1-a99d-3addb38d688f", - 13: "f52c1b80-794f-457f-bb94-51c5df3ee4be", - 14: "074bbfa7-20ad-4444-8e0a-bc05ff07d6ea", - 17: "c23fe435-9461-4d0e-a829-d64f6fecb659", - 21: "a5111c18-1c60-4c02-a25a-fa709e819ecd", - 23: "40f9b4db-ba84-4af1-aba6-57abfba24676", - 24: "8a7ef1cd-c307-4bc7-94c7-4b812a64d3c4", - 25: "c600aad0-84c6-4f3d-ae92-5541d3cad171", - 26: "c0456a4c-beeb-4258-9b4a-12e0964e33e5", - 27: "e3d2930b-b3bc-4f26-9d35-e81fa9fdd161", - 28: "4d973f25-f457-4af7-8ea7-7c3fddaf9493", - 29: "833ccefd-89a0-4e74-8b1d-ddb32181693b", - 30: "51ec7304-2cce-4c60-830e-9fe735ac2a89", - 31: "64d6608b-8341-4b14-8edd-c1a1b31823a6", - 32: "0fa941ad-cf3d-4b03-8e46-854e6299afe8", - 33: "7418db61-8ff0-49db-ae87-756fc17382fc", - 34: "7487be7b-0f6d-4aaf-82ef-ea2b1833685a", - 38: "0a5aebb4-6f73-4af6-96d4-f8d2acfce25d", + 0: "cf968e18-d8d8-4b9f-b79a-fc4e4a3337a7", + 1: "35e98245-c1bd-4a35-be0b-6daf0e9a3825", + 2: "f29c9e93-8f2d-4969-b472-f3524bdfd883", + 3: "e1a5be5d-b799-4bd1-a664-c31b9c47225f", + 4: "a299884a-7a95-4ddf-96e0-b8594c4290d3", + 5: "153b223a-d73f-479f-a51c-8905434b545d", + 6: "80b9ec4d-c7b8-401c-b177-aa388259f422", + 7: "29d9158d-33ed-4805-ad4b-92ff210e808b", + 8: "7afe6ca0-ad66-489b-b2d0-b31b0644d053", + 9: "c2469843-c104-4201-9db5-ba1542823448", + 10: "2b8709b8-4a42-406b-bd93-43172eae07b9", + 11: "d07d7654-d483-4f1d-bb26-13b02197b87f", + 12: "48daa468-2417-437a-b59d-0a06a8935d99", + 13: "10de7650-8e88-461e-bea4-6c38bb3f0d00", + 14: "3ec7ae21-ef22-4ae3-ac52-70a0ef4dedc2", + 15: "2a078943-c56d-48b1-a99d-3addb38d688f", + 16: "a516cbd4-107d-4194-ab02-74095c155f34", + 17: "f52c1b80-794f-457f-bb94-51c5df3ee4be", + 18: "685dab5c-03cb-4545-9a71-e08ae72946e6", + 19: "074bbfa7-20ad-4444-8e0a-bc05ff07d6ea", + 20: "8dd5abe1-4df8-41b5-a251-dcf3b161f5c3", + 21: "68c7064e-c1dc-459f-971b-e759bb80810d", + 22: "c23fe435-9461-4d0e-a829-d64f6fecb659", + 23: "eb2042f5-8a50-459c-8884-e11f9573c618", + 24: "251eeb55-2ff6-4e7f-ab92-dbbbabe5c2a4", + 25: "bb9e02a3-3926-4125-bfdf-49cdef5d1ca7", + 26: "ac413121-3018-4a1f-95c1-fadbbf321708", + 27: "b3bac611-ed88-4391-b013-08de4e32a503", + 28: "facfaf55-00f6-496c-a8db-a395631130ec", + 29: "37b22ea9-caf2-429e-ac3c-8b1adb0324cc", + 30: "de82227b-b6d2-4243-857f-071c4b860e8b", + 31: "00affefe-d268-4bd2-9fa1-8d3a07199be0", + 32: "a5111c18-1c60-4c02-a25a-fa709e819ecd", + 33: "88bf2ba0-fb95-44f8-801d-325a720b6f03", + 34: "bfb569e4-69a2-4f4b-8d6e-e306982e4a95", + 35: "1edf9844-470b-4e3a-a157-3ed8c5af89a9", + 36: "8a7ef1cd-c307-4bc7-94c7-4b812a64d3c4", + 37: "5e6f0af1-bcc7-4aa6-a1de-21ca58638fce", + 38: "c600aad0-84c6-4f3d-ae92-5541d3cad171", + 39: "c0456a4c-beeb-4258-9b4a-12e0964e33e5", + 40: "7f5d667a-82a9-48b8-b559-408c589259cd", + 41: "833ccefd-89a0-4e74-8b1d-ddb32181693b", + 42: "51ec7304-2cce-4c60-830e-9fe735ac2a89", + 43: "40f9b4db-ba84-4af1-aba6-57abfba24676", + 44: "9956314c-f7a4-42e0-8081-a7f933ea0c8c", + 45: "e3d2930b-b3bc-4f26-9d35-e81fa9fdd161", + 46: "64d6608b-8341-4b14-8edd-c1a1b31823a6", + 47: "4d973f25-f457-4af7-8ea7-7c3fddaf9493", + 48: "bf4cd2a7-55b5-40fa-b010-c89f54b29ab8", + 49: "0fa941ad-cf3d-4b03-8e46-854e6299afe8", + 50: "7487be7b-0f6d-4aaf-82ef-ea2b1833685a", + 51: "0ee92a5c-35f1-40c9-a7b3-0282e67d9bd1", + 52: "7418db61-8ff0-49db-ae87-756fc17382fc", + 53: "5c645046-e195-4164-a5f5-d3015a7f7647", + 54: "379d172e-cc3f-4c17-ae25-6c83f91e2e6a", + 55: "0a5aebb4-6f73-4af6-96d4-f8d2acfce25d", + 56: "83306cbb-ac15-46e4-86a1-43036dd0c1ec", + 57: "b1a7c3ca-3d76-4434-a979-7ed9ad720530", + 58: "5b4cc372-b9b5-4632-9090-89ddfbef7fe5", + 59: "c0511f92-316e-4106-b09c-b3f55fcca24f", }, - "PrivateListingId": { - 0: "153b223a-d73f-479f-a51c-8905434b545d", - 1: "e1a5be5d-b799-4bd1-a664-c31b9c47225f", - 2: "a299884a-7a95-4ddf-96e0-b8594c4290d3", - 6: "7afe6ca0-ad66-489b-b2d0-b31b0644d053", - 7: "c2469843-c104-4201-9db5-ba1542823448", - 8: "d07d7654-d483-4f1d-bb26-13b02197b87f", - 9: "a516cbd4-107d-4194-ab02-74095c155f34", - 12: "2a078943-c56d-48b1-a99d-3addb38d688f", - 13: "f52c1b80-794f-457f-bb94-51c5df3ee4be", - 14: "074bbfa7-20ad-4444-8e0a-bc05ff07d6ea", - 17: "c23fe435-9461-4d0e-a829-d64f6fecb659", - 21: "a5111c18-1c60-4c02-a25a-fa709e819ecd", - 23: "40f9b4db-ba84-4af1-aba6-57abfba24676", - 24: "8a7ef1cd-c307-4bc7-94c7-4b812a64d3c4", - 25: "c600aad0-84c6-4f3d-ae92-5541d3cad171", - 26: "c0456a4c-beeb-4258-9b4a-12e0964e33e5", - 27: "e3d2930b-b3bc-4f26-9d35-e81fa9fdd161", - 28: "4d973f25-f457-4af7-8ea7-7c3fddaf9493", - 29: "833ccefd-89a0-4e74-8b1d-ddb32181693b", - 30: "51ec7304-2cce-4c60-830e-9fe735ac2a89", - 31: "64d6608b-8341-4b14-8edd-c1a1b31823a6", - 32: "0fa941ad-cf3d-4b03-8e46-854e6299afe8", - 33: "7418db61-8ff0-49db-ae87-756fc17382fc", - 34: "7487be7b-0f6d-4aaf-82ef-ea2b1833685a", - 38: "0a5aebb4-6f73-4af6-96d4-f8d2acfce25d", + "DropDownId": { + 0: "42. Extract Disease and Syndrom entities and their UMLS Codes", + 1: "23. Medical Question Answering (Open-Book on Clinical Notes)", + 2: "29. Detect Healthcare Professional Consult documents", + 3: "48. Extract procedures and measurements and their corresponding CPT codes", + 4: "60. Extract Laboratory Observations and the corresponding LOINC codes", + 5: "18. Guideline Summarizer for Asthma & Breast Cancer", + 6: "40. Extract Clinical Findings and the corresponding ICD10CM codes", + 7: "45. Extract Clinical Findings and their UMLS Codes", + 8: "32. Extract neurologic deficits related to Stroke Scale (NIHSS)", + 9: "44. Extract Clinical Findings and the corresponding ICD 9 codes", + 10: "39. Extract Drugs and the correspondingt RXNORM codes", + 11: "47. Extract phenotypic abnormalities and the coresponding HPO codes ", + 12: "30. Detect Drug Side Effect Narratives", + 13: "38. Extract Drugs and Substances and their UMLS Codes", + 14: "19. Summarize Clinical Notes in Laymen Terms ", + 15: "24. Extract clinical events and find temporal relations", + 16: "25. Extract findings in radiology reports", + 17: "35. Detect Pathogen, Medical Condition and Medicine", + 18: "28. Extract patient information from patient narratives", + 19: "52. Resolve Oncology terminology with ICD-O Taxonomy", + 20: "12. Clinical De-identification for Portuguese (Obfuscate)", + 21: "16. Clinical De-identification for Romanian (Obfuscate)", + 22: "31. Extract Social Determinants of Health", + 23: "10. Clinical De-identification for French (Obfuscate)", + 24: "20. Summarize Clinical Question Notes", + 25: "6. Clinical De-identification for Spanish (Obfuscate)", + 26: "8. Clinical De-identification for Italian (Obfuscate)", + 27: "14. Clinical De-identification for Arabic (Obfuscate)", + 28: "2. Clinical De-identification (Obfuscate)", + 29: "4. Clinical De-identification for German (Obfuscate)", + 30: "56. SNOMED Clinical Health Information Coder", + 31: "27. Extract oncological entities and relations", + 32: "11. Clinical De-identification for Portuguese (Mask)", + 33: "22. Clinical Text Summarization", + 34: "46. Extract Drugs and their UMLS Codes", + 35: "49. ICD-10-CM to SNOMED Code Mapper", + 36: "15. Clinical De-identification for Romanian (Mask)", + 37: "58. SNOMED to ICD-10-CM Code Mapper", + 38: "9. Clinical De-identification for French (Mask)", + 39: "5. Clinical De-identification for Spanish (Mask)", + 40: "13. Clinical De-identification for Arabic (Mask)", + 41: "3. Clinical De-identification for German (Mask)", + 42: "7. Clinical De-identification forItalian (Mask)", + 43: "1. Clinical De-identification (Mask)", + 44: "21. Summarize PubMed Research", + 45: "57. SNOMED Codes to ICDO Codes Mapper", + 46: "26. Extract Adverse Drug Events (ADE)", + 47: "33. Extract clinical risk factors", + 48: "54. RxNorm to NDC Code Converter", + 49: "17. Summarize Radiology Reports", + 50: "37. Extract Anatomical Structures", + 51: "43. ICD-10-CM to UMLS Code Mapper", + 52: "36. Extract Living Species", + 53: "50. ICD-10 to ICD-9 Code Converter", + 54: "55. RxNorm to UMLS Code Mapper", + 55: "34. Detect Cancer Genetics", + 56: "59. SNOMED to UMLS Code Mapper", + 57: "53. RxNorm to MeSH Code Mapper", + 58: "51. MeSH to UMLS Code Mapper", + 59: "41. Medication Coder", + }, + "Id": { + 0: 42.0, + 1: 23.0, + 2: 29.0, + 3: 48.0, + 4: 60.0, + 5: 18.0, + 6: 40.0, + 7: 45.0, + 8: 32.0, + 9: 44.0, + 10: 39.0, + 11: 47.0, + 12: 30.0, + 13: 38.0, + 14: 19.0, + 15: 24.0, + 16: 25.0, + 17: 35.0, + 18: 28.0, + 19: 52.0, + 20: 12.0, + 21: 16.0, + 22: 31.0, + 23: 10.0, + 24: 20.0, + 25: 6.0, + 26: 8.0, + 27: 14.0, + 28: 2.0, + 29: 4.0, + 30: 56.0, + 31: 27.0, + 32: 11.0, + 33: 22.0, + 34: 46.0, + 35: 49.0, + 36: 15.0, + 37: 58.0, + 38: 9.0, + 39: 5.0, + 40: 13.0, + 41: 3.0, + 42: 7.0, + 43: 1.0, + 44: 21.0, + 45: 57.0, + 46: 26.0, + 47: 33.0, + 48: 54.0, + 49: 17.0, + 50: 37.0, + 51: 43.0, + 52: 36.0, + 53: 50.0, + 54: 55.0, + 55: 34.0, + 56: 59.0, + 57: 53.0, + 58: 51.0, + 59: 41.0, + }, + "Title_d": { + 0: "[Extract Disease and Syndrom entities and their UMLS Codes](./marketplace/consumer/listings/cf968e18-d8d8-4b9f-b79a-fc4e4a3337a7)", + 1: "[Medical Question Answering (Open-Book on Clinical Notes)](./marketplace/consumer/listings/35e98245-c1bd-4a35-be0b-6daf0e9a3825)", + 2: "[Detect Healthcare Professional Consult documents](./marketplace/consumer/listings/f29c9e93-8f2d-4969-b472-f3524bdfd883)", + 3: "[Extract procedures and measurements and their corresponding CPT codes](./marketplace/consumer/listings/e1a5be5d-b799-4bd1-a664-c31b9c47225f)", + 4: "[Extract Laboratory Observations and the corresponding LOINC codes](./marketplace/consumer/listings/a299884a-7a95-4ddf-96e0-b8594c4290d3)", + 5: "[Guideline Summarizer for Asthma & Breast Cancer](./marketplace/consumer/listings/153b223a-d73f-479f-a51c-8905434b545d)", + 6: "[Extract Clinical Findings and the corresponding ICD10CM codes](./marketplace/consumer/listings/80b9ec4d-c7b8-401c-b177-aa388259f422)", + 7: "[Extract Clinical Findings and their UMLS Codes](./marketplace/consumer/listings/29d9158d-33ed-4805-ad4b-92ff210e808b)", + 8: "[Extract neurologic deficits related to Stroke Scale (NIHSS)](./marketplace/consumer/listings/7afe6ca0-ad66-489b-b2d0-b31b0644d053)", + 9: "[Extract Clinical Findings and the corresponding ICD 9 codes](./marketplace/consumer/listings/c2469843-c104-4201-9db5-ba1542823448)", + 10: "[Extract Drugs and the correspondingt RXNORM codes](./marketplace/consumer/listings/2b8709b8-4a42-406b-bd93-43172eae07b9)", + 11: "[Extract phenotypic abnormalities and the coresponding HPO codes ](./marketplace/consumer/listings/d07d7654-d483-4f1d-bb26-13b02197b87f)", + 12: "[Detect Drug Side Effect Narratives](./marketplace/consumer/listings/48daa468-2417-437a-b59d-0a06a8935d99)", + 13: "[Extract Drugs and Substances and their UMLS Codes](./marketplace/consumer/listings/10de7650-8e88-461e-bea4-6c38bb3f0d00)", + 14: "[Summarize Clinical Notes in Laymen Terms ](./marketplace/consumer/listings/3ec7ae21-ef22-4ae3-ac52-70a0ef4dedc2)", + 15: "[Extract clinical events and find temporal relations (ERA)](./marketplace/consumer/listings/2a078943-c56d-48b1-a99d-3addb38d688f)", + 16: "[Extract findings in radiology reports](./marketplace/consumer/listings/a516cbd4-107d-4194-ab02-74095c155f34)", + 17: "[Detect Pathogen, Medical Condition and Medicine](./marketplace/consumer/listings/f52c1b80-794f-457f-bb94-51c5df3ee4be)", + 18: "[Extract patient information from patient narratives](./marketplace/consumer/listings/685dab5c-03cb-4545-9a71-e08ae72946e6)", + 19: "[Resolve Oncology terminology with ICD-O Taxonomy](./marketplace/consumer/listings/074bbfa7-20ad-4444-8e0a-bc05ff07d6ea)", + 20: "[Clinical De-identification for Portuguese (Obfuscate)](./marketplace/consumer/listings/8dd5abe1-4df8-41b5-a251-dcf3b161f5c3)", + 21: "[Clinical De-identification for Romanian (Obfuscate)](./marketplace/consumer/listings/68c7064e-c1dc-459f-971b-e759bb80810d)", + 22: "[Extract Social Determinants of Health](./marketplace/consumer/listings/c23fe435-9461-4d0e-a829-d64f6fecb659)", + 23: "[Clinical De-identification for French (Obfuscate)](./marketplace/consumer/listings/eb2042f5-8a50-459c-8884-e11f9573c618)", + 24: "[Summarize Clinical Question Notes](./marketplace/consumer/listings/251eeb55-2ff6-4e7f-ab92-dbbbabe5c2a4)", + 25: "[Clinical De-identification for Spanish (Obfuscate)](./marketplace/consumer/listings/bb9e02a3-3926-4125-bfdf-49cdef5d1ca7)", + 26: "[Clinical De-identification for Italian (Obfuscate)](./marketplace/consumer/listings/ac413121-3018-4a1f-95c1-fadbbf321708)", + 27: "[Clinical De-identification for Arabic (Obfuscate)](./marketplace/consumer/listings/b3bac611-ed88-4391-b013-08de4e32a503)", + 28: "[Clinical De-identification (Obfuscate)](./marketplace/consumer/listings/facfaf55-00f6-496c-a8db-a395631130ec)", + 29: "[Clinical De-identification for German (Obfuscate)](./marketplace/consumer/listings/37b22ea9-caf2-429e-ac3c-8b1adb0324cc)", + 30: "[SNOMED Clinical Health Information Coder](./marketplace/consumer/listings/de82227b-b6d2-4243-857f-071c4b860e8b)", + 31: "[Extract oncological entities and relations](./marketplace/consumer/listings/00affefe-d268-4bd2-9fa1-8d3a07199be0)", + 32: "[Clinical De-identification for Portuguese (Mask)](./marketplace/consumer/listings/a5111c18-1c60-4c02-a25a-fa709e819ecd)", + 33: "[Clinical Text Summarization](./marketplace/consumer/listings/88bf2ba0-fb95-44f8-801d-325a720b6f03)", + 34: "[Extract Drugs and their UMLS Codes](./marketplace/consumer/listings/bfb569e4-69a2-4f4b-8d6e-e306982e4a95)", + 35: "[ICD-10-CM to SNOMED Code Mapper](./marketplace/consumer/listings/1edf9844-470b-4e3a-a157-3ed8c5af89a9)", + 36: "[Clinical De-identification for Romanian (Mask)](./marketplace/consumer/listings/8a7ef1cd-c307-4bc7-94c7-4b812a64d3c4)", + 37: "[SNOMED to ICD-10-CM Code Mapper](./marketplace/consumer/listings/5e6f0af1-bcc7-4aa6-a1de-21ca58638fce)", + 38: "[Clinical De-identification for French (Mask)](./marketplace/consumer/listings/c600aad0-84c6-4f3d-ae92-5541d3cad171)", + 39: "[Clinical De-identification for Spanish (Mask)](./marketplace/consumer/listings/c0456a4c-beeb-4258-9b4a-12e0964e33e5)", + 40: "[Clinical De-identification for Arabic (Mask)](./marketplace/consumer/listings/7f5d667a-82a9-48b8-b559-408c589259cd)", + 41: "[Clinical De-identification for German (Mask)](./marketplace/consumer/listings/833ccefd-89a0-4e74-8b1d-ddb32181693b)", + 42: "[Clinical De-identification forItalian (Mask)](./marketplace/consumer/listings/51ec7304-2cce-4c60-830e-9fe735ac2a89)", + 43: "[Clinical De-identification (Mask)](./marketplace/consumer/listings/40f9b4db-ba84-4af1-aba6-57abfba24676)", + 44: "[Summarize PubMed Research](./marketplace/consumer/listings/9956314c-f7a4-42e0-8081-a7f933ea0c8c)", + 45: "[SNOMED Codes to ICDO Codes Mapper](./marketplace/consumer/listings/e3d2930b-b3bc-4f26-9d35-e81fa9fdd161)", + 46: "[Extract Adverse Drug Events (ADE)](./marketplace/consumer/listings/64d6608b-8341-4b14-8edd-c1a1b31823a6)", + 47: "[Extract clinical risk factors](./marketplace/consumer/listings/4d973f25-f457-4af7-8ea7-7c3fddaf9493)", + 48: "[RxNorm to NDC Code Converter](./marketplace/consumer/listings/bf4cd2a7-55b5-40fa-b010-c89f54b29ab8)", + 49: "[Summarize Radiology Reports](./marketplace/consumer/listings/0fa941ad-cf3d-4b03-8e46-854e6299afe8)", + 50: "[Extract Anatomical Structures](./marketplace/consumer/listings/7487be7b-0f6d-4aaf-82ef-ea2b1833685a)", + 51: "[ ICD-10-CM to UMLS Code Mapper](./marketplace/consumer/listings/0ee92a5c-35f1-40c9-a7b3-0282e67d9bd1)", + 52: "[Extract Living Species](./marketplace/consumer/listings/7418db61-8ff0-49db-ae87-756fc17382fc)", + 53: "[ICD-10 to ICD-9 Code Converter](./marketplace/consumer/listings/5c645046-e195-4164-a5f5-d3015a7f7647)", + 54: "[RxNorm to UMLS Code Mapper](./marketplace/consumer/listings/379d172e-cc3f-4c17-ae25-6c83f91e2e6a)", + 55: "[Detect Cancer Genetics](./marketplace/consumer/listings/0a5aebb4-6f73-4af6-96d4-f8d2acfce25d)", + 56: "[SNOMED to UMLS Code Mapper](./marketplace/consumer/listings/83306cbb-ac15-46e4-86a1-43036dd0c1ec)", + 57: "[RxNorm to MeSH Code Mapper](./marketplace/consumer/listings/b1a7c3ca-3d76-4434-a979-7ed9ad720530)", + 58: "[MeSH to UMLS Code Mapper](./marketplace/consumer/listings/5b4cc372-b9b5-4632-9090-89ddfbef7fe5)", + 59: "[Medication Coder](./marketplace/consumer/listings/c0511f92-316e-4106-b09c-b3f55fcca24f)", }, } + import pandas as pd models_df = pd.DataFrame(models).reset_index() -models_df diff --git a/notebooks/databricks_model_marketplace.ipynb b/notebooks/databricks_model_marketplace.ipynb index f44da18722..62fa7bbdc6 100644 --- a/notebooks/databricks_model_marketplace.ipynb +++ b/notebooks/databricks_model_marketplace.ipynb @@ -23,36 +23,6 @@ "- `query` for querying endpoints\n", "\n", "\n", - "Overview of all [John Snow Labs Models](https://www.johnsnowlabs.com/) available in the [Databricks Market Place](./marketplace)\n", - "\n", - "| Model Description | Model ID |\n", - "|:----------------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------|\n", - "| [Extract procedures and measurements and their corresponding CPT codes](./marketplace/consumer/listings/e1a5be5d-b799-4bd1-a664-c31b9c47225f) | en.resolve.cpt.augmented |\n", - "| [Extract Laboratory Observations and the corresponding LOINC codes](./marketplace/consumer/listings/a299884a-7a95-4ddf-96e0-b8594c4290d3) | en.resolve.loinc.augmented |\n", - "| [Extract neurologic deficits related to Stroke Scale (NIHSS)](./marketplace/consumer/listings/7afe6ca0-ad66-489b-b2d0-b31b0644d053) | en.med_ner.nihss_pipeline |\n", - "| [Extract Clinical Findings and the corresponding ICD 9 codes](./marketplace/consumer/listings/c2469843-c104-4201-9db5-ba1542823448) | en.resolve.icd9.pipeline |\n", - "| [Extract phenotypic abnormalities and the coresponding HPO codes ](./marketplace/consumer/listings/d07d7654-d483-4f1d-bb26-13b02197b87f) | en.resolve.HPO |\n", - "| [Extract findings in radiology reports](./marketplace/consumer/listings/a516cbd4-107d-4194-ab02-74095c155f34) | en.explain_doc.clinical_radiology.pipeline |\n", - "| [Extract clinical events and find temporal relations (ERA)](./marketplace/consumer/listings/2a078943-c56d-48b1-a99d-3addb38d688f) | en.explain_doc.era |\n", - "| [Detect Pathogen, Medical Condition and Medicine](./marketplace/consumer/listings/f52c1b80-794f-457f-bb94-51c5df3ee4be) | en.med_ner.pathogen.pipeline |\n", - "| [Resolve Oncology terminology with ICD-O Taxonomy](./marketplace/consumer/listings/074bbfa7-20ad-4444-8e0a-bc05ff07d6ea) | en.resolve.icdo_augmented |\n", - "| [Extract Social Determinants of Health](./marketplace/consumer/listings/c23fe435-9461-4d0e-a829-d64f6fecb659) | en.med_ner.sdoh_langtest.pipeline |\n", - "| [Clinical De-identification for Portuguese (Mask)](./marketplace/consumer/listings/a5111c18-1c60-4c02-a25a-fa709e819ecd) | pt.deid.clinical |\n", - "| [Clinical De-identification (Mask)](./marketplace/consumer/listings/40f9b4db-ba84-4af1-aba6-57abfba24676) | en.de_identify.clinical_pipeline |\n", - "| [Clinical De-identification for Romanian (Mask)](./marketplace/consumer/listings/8a7ef1cd-c307-4bc7-94c7-4b812a64d3c4) | ro.deid.clinical |\n", - "| [Clinical De-identification for French (Mask)](./marketplace/consumer/listings/c600aad0-84c6-4f3d-ae92-5541d3cad171) | fr.deid_obfuscated |\n", - "| [Guideline Summarizer for Asthma & Breast Cancer](./marketplace/consumer/listings/153b223a-d73f-479f-a51c-8905434b545d) | en.summarize.clinical_guidelines_large.pipeline |\n", - "| [Clinical De-identification for Spanish (Mask)](./marketplace/consumer/listings/c0456a4c-beeb-4258-9b4a-12e0964e33e5) | es.deid.clinical |\n", - "| [SNOMED Codes to ICDO Codes Mapper](./marketplace/consumer/listings/e3d2930b-b3bc-4f26-9d35-e81fa9fdd161) | en.map_entity.snomed_to_icdo |\n", - "| [Extract clinical risk factors](./marketplace/consumer/listings/4d973f25-f457-4af7-8ea7-7c3fddaf9493) | en.med_ner.risk_factors.pipeline |\n", - "| [Clinical De-identification for German (Mask)](./marketplace/consumer/listings/833ccefd-89a0-4e74-8b1d-ddb32181693b) | de.deid.clinical |\n", - "| [Clinical De-identification forItalian (Mask)](./marketplace/consumer/listings/51ec7304-2cce-4c60-830e-9fe735ac2a89) | it.deid.clinical |\n", - "| [Extract Adverse Drug Events (ADE)](./marketplace/consumer/listings/64d6608b-8341-4b14-8edd-c1a1b31823a6) | en.explain_doc.clinical_ade |\n", - "| [Summarize Radiology Reports](./marketplace/consumer/listings/0fa941ad-cf3d-4b03-8e46-854e6299afe8) | en.summarize.radiology.pipeline |\n", - "| [Extract Living Species](./marketplace/consumer/listings/7418db61-8ff0-49db-ae87-756fc17382fc) | en.med_ner.living_species.pipeline |\n", - "| [Extract Anatomical Structures](./marketplace/consumer/listings/7487be7b-0f6d-4aaf-82ef-ea2b1833685a) | en.med_ner.anatom.pipeline |\n", - "| [Detect Cancer Genetics](./marketplace/consumer/listings/0a5aebb4-6f73-4af6-96d4-f8d2acfce25d) | en.med_ner.bionlp.pipeline |\n", - "\n", "## PAYG License \n", "You need a pay as you go (PAYG) license for using John Snow Labs models, follow these instructions to get one : \n", "1. Access [my.JohnSnowLabs.com](my.JohnSnowLabs.com) and log in to your account. If you don't have an account, create one. \n", @@ -69,25 +39,14 @@ "execution_count": 0, "metadata": { "application/vnd.databricks.v1+cell": { - "cellMetadata": { - "byteLimit": 2048000, - "rowLimit": 10000 - }, + "cellMetadata": {}, "inputWidgets": {}, - "nuid": "311fab99-a0f3-4b55-85bf-a9d10ab5be78", + "nuid": "1ddea1cc-7807-4e95-99f8-26b0ec02361e", "showTitle": false, "title": "" } }, - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "\u001B[43mNote: you may need to restart the kernel using dbutils.library.restartPython() to use updated packages.\u001B[0m\nCollecting johnsnowlabs_for_databricks==5.2.2rc11\n Downloading johnsnowlabs_for_databricks-5.2.2rc11-py3-none-any.whl (123 kB)\n ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 123.6/123.6 kB 1.5 MB/s eta 0:00:00\nRequirement already satisfied: numpy in /databricks/python3/lib/python3.10/site-packages (from johnsnowlabs_for_databricks==5.2.2rc11) (1.21.5)\nCollecting colorama\n Downloading colorama-0.4.6-py2.py3-none-any.whl (25 kB)\nCollecting pydantic==1.10.11\n Downloading pydantic-1.10.11-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.1 MB)\n ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.1/3.1 MB 66.6 MB/s eta 0:00:00\nCollecting spark-nlp==5.2.2\n Downloading spark_nlp-5.2.2-py2.py3-none-any.whl (547 kB)\n ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 547.3/547.3 kB 41.3 MB/s eta 0:00:00\nCollecting databricks-api\n Downloading databricks_api-0.9.0-py3-none-any.whl (7.4 kB)\nCollecting spark-nlp-display==4.1\n Downloading spark_nlp_display-4.1-py3-none-any.whl (95 kB)\n ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 95.4/95.4 kB 12.2 MB/s eta 0:00:00\nCollecting nlu==5.1.3\n Downloading nlu-5.1.3-py3-none-any.whl (664 kB)\n ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 664.4/664.4 kB 47.4 MB/s eta 0:00:00\nCollecting dataclasses\n Downloading dataclasses-0.6-py3-none-any.whl (14 kB)\nRequirement already satisfied: requests in /databricks/python3/lib/python3.10/site-packages (from johnsnowlabs_for_databricks==5.2.2rc11) (2.28.1)\nRequirement already satisfied: boto3 in /databricks/python3/lib/python3.10/site-packages (from johnsnowlabs_for_databricks==5.2.2rc11) (1.24.28)\nRequirement already satisfied: pyarrow>=0.16.0 in /databricks/python3/lib/python3.10/site-packages (from nlu==5.1.3->johnsnowlabs_for_databricks==5.2.2rc11) (8.0.0)\nRequirement already satisfied: pandas>=1.3.5 in /databricks/python3/lib/python3.10/site-packages (from nlu==5.1.3->johnsnowlabs_for_databricks==5.2.2rc11) (1.4.4)\nRequirement already satisfied: typing-extensions>=4.2.0 in /databricks/python3/lib/python3.10/site-packages (from pydantic==1.10.11->johnsnowlabs_for_databricks==5.2.2rc11) (4.3.0)\nRequirement already satisfied: ipython in /databricks/python3/lib/python3.10/site-packages (from spark-nlp-display==4.1->johnsnowlabs_for_databricks==5.2.2rc11) (8.10.0)\nCollecting svgwrite==1.4\n Downloading svgwrite-1.4-py3-none-any.whl (66 kB)\n ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 66.9/66.9 kB 12.3 MB/s eta 0:00:00\nRequirement already satisfied: s3transfer<0.7.0,>=0.6.0 in /databricks/python3/lib/python3.10/site-packages (from boto3->johnsnowlabs_for_databricks==5.2.2rc11) (0.6.0)\nRequirement already satisfied: botocore<1.28.0,>=1.27.28 in /databricks/python3/lib/python3.10/site-packages (from boto3->johnsnowlabs_for_databricks==5.2.2rc11) (1.27.28)\nRequirement already satisfied: jmespath<2.0.0,>=0.7.1 in /databricks/python3/lib/python3.10/site-packages (from boto3->johnsnowlabs_for_databricks==5.2.2rc11) (0.10.0)\nCollecting databricks-cli\n Downloading databricks_cli-0.18.0-py2.py3-none-any.whl (150 kB)\n ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 150.3/150.3 kB 21.2 MB/s eta 0:00:00\nRequirement already satisfied: charset-normalizer<3,>=2 in /databricks/python3/lib/python3.10/site-packages (from requests->johnsnowlabs_for_databricks==5.2.2rc11) (2.0.4)\nRequirement already satisfied: certifi>=2017.4.17 in /databricks/python3/lib/python3.10/site-packages (from requests->johnsnowlabs_for_databricks==5.2.2rc11) (2022.9.14)\nRequirement already satisfied: urllib3<1.27,>=1.21.1 in /databricks/python3/lib/python3.10/site-packages (from requests->johnsnowlabs_for_databricks==5.2.2rc11) (1.26.11)\nRequirement already satisfied: idna<4,>=2.5 in /databricks/python3/lib/python3.10/site-packages (from requests->johnsnowlabs_for_databricks==5.2.2rc11) (3.3)\nRequirement already satisfied: python-dateutil<3.0.0,>=2.1 in /databricks/python3/lib/python3.10/site-packages (from botocore<1.28.0,>=1.27.28->boto3->johnsnowlabs_for_databricks==5.2.2rc11) (2.8.2)\nRequirement already satisfied: pytz>=2020.1 in /databricks/python3/lib/python3.10/site-packages (from pandas>=1.3.5->nlu==5.1.3->johnsnowlabs_for_databricks==5.2.2rc11) (2022.1)\nCollecting tabulate>=0.7.7\n Downloading tabulate-0.9.0-py3-none-any.whl (35 kB)\nRequirement already satisfied: click>=7.0 in /databricks/python3/lib/python3.10/site-packages (from databricks-cli->databricks-api->johnsnowlabs_for_databricks==5.2.2rc11) (8.0.4)\nRequirement already satisfied: pyjwt>=1.7.0 in /usr/lib/python3/dist-packages (from databricks-cli->databricks-api->johnsnowlabs_for_databricks==5.2.2rc11) (2.3.0)\nRequirement already satisfied: oauthlib>=3.1.0 in /usr/lib/python3/dist-packages (from databricks-cli->databricks-api->johnsnowlabs_for_databricks==5.2.2rc11) (3.2.0)\nRequirement already satisfied: six>=1.10.0 in /usr/lib/python3/dist-packages (from databricks-cli->databricks-api->johnsnowlabs_for_databricks==5.2.2rc11) (1.16.0)\nRequirement already satisfied: jedi>=0.16 in /databricks/python3/lib/python3.10/site-packages (from ipython->spark-nlp-display==4.1->johnsnowlabs_for_databricks==5.2.2rc11) (0.18.1)\nRequirement already satisfied: decorator in /databricks/python3/lib/python3.10/site-packages (from ipython->spark-nlp-display==4.1->johnsnowlabs_for_databricks==5.2.2rc11) (5.1.1)\nRequirement already satisfied: matplotlib-inline in /databricks/python3/lib/python3.10/site-packages (from ipython->spark-nlp-display==4.1->johnsnowlabs_for_databricks==5.2.2rc11) (0.1.6)\nRequirement already satisfied: prompt-toolkit<3.1.0,>=3.0.30 in /databricks/python3/lib/python3.10/site-packages (from ipython->spark-nlp-display==4.1->johnsnowlabs_for_databricks==5.2.2rc11) (3.0.36)\nRequirement already satisfied: pygments>=2.4.0 in /databricks/python3/lib/python3.10/site-packages (from ipython->spark-nlp-display==4.1->johnsnowlabs_for_databricks==5.2.2rc11) (2.11.2)\nRequirement already satisfied: traitlets>=5 in /databricks/python3/lib/python3.10/site-packages (from ipython->spark-nlp-display==4.1->johnsnowlabs_for_databricks==5.2.2rc11) (5.1.1)\nRequirement already satisfied: pexpect>4.3 in /databricks/python3/lib/python3.10/site-packages (from ipython->spark-nlp-display==4.1->johnsnowlabs_for_databricks==5.2.2rc11) (4.8.0)\nRequirement already satisfied: backcall in /databricks/python3/lib/python3.10/site-packages (from ipython->spark-nlp-display==4.1->johnsnowlabs_for_databricks==5.2.2rc11) (0.2.0)\nRequirement already satisfied: stack-data in /databricks/python3/lib/python3.10/site-packages (from ipython->spark-nlp-display==4.1->johnsnowlabs_for_databricks==5.2.2rc11) (0.6.2)\nRequirement already satisfied: pickleshare in /databricks/python3/lib/python3.10/site-packages (from ipython->spark-nlp-display==4.1->johnsnowlabs_for_databricks==5.2.2rc11) (0.7.5)\nRequirement already satisfied: parso<0.9.0,>=0.8.0 in /databricks/python3/lib/python3.10/site-packages (from jedi>=0.16->ipython->spark-nlp-display==4.1->johnsnowlabs_for_databricks==5.2.2rc11) (0.8.3)\nRequirement already satisfied: ptyprocess>=0.5 in /databricks/python3/lib/python3.10/site-packages (from pexpect>4.3->ipython->spark-nlp-display==4.1->johnsnowlabs_for_databricks==5.2.2rc11) (0.7.0)\nRequirement already satisfied: wcwidth in /databricks/python3/lib/python3.10/site-packages (from prompt-toolkit<3.1.0,>=3.0.30->ipython->spark-nlp-display==4.1->johnsnowlabs_for_databricks==5.2.2rc11) (0.2.5)\nRequirement already satisfied: asttokens>=2.1.0 in /databricks/python3/lib/python3.10/site-packages (from stack-data->ipython->spark-nlp-display==4.1->johnsnowlabs_for_databricks==5.2.2rc11) (2.2.1)\nRequirement already satisfied: pure-eval in /databricks/python3/lib/python3.10/site-packages (from stack-data->ipython->spark-nlp-display==4.1->johnsnowlabs_for_databricks==5.2.2rc11) (0.2.2)\nRequirement already satisfied: executing>=1.2.0 in /databricks/python3/lib/python3.10/site-packages (from stack-data->ipython->spark-nlp-display==4.1->johnsnowlabs_for_databricks==5.2.2rc11) (1.2.0)\nInstalling collected packages: spark-nlp, dataclasses, tabulate, svgwrite, pydantic, colorama, databricks-cli, nlu, databricks-api, spark-nlp-display, johnsnowlabs_for_databricks\n Attempting uninstall: pydantic\n Found existing installation: pydantic 1.10.6\n Not uninstalling pydantic at /databricks/python3/lib/python3.10/site-packages, outside environment /local_disk0/.ephemeral_nfs/envs/pythonEnv-a3209c9a-2080-46c7-a8ac-301127ba0a10\n Can't uninstall 'pydantic'. No files were found to uninstall.\nSuccessfully installed colorama-0.4.6 databricks-api-0.9.0 databricks-cli-0.18.0 dataclasses-0.6 johnsnowlabs_for_databricks-5.2.2rc11 nlu-5.1.3 pydantic-1.10.11 spark-nlp-5.2.2 spark-nlp-display-4.1 svgwrite-1.4 tabulate-0.9.0\n\u001B[43mNote: you may need to restart the kernel using dbutils.library.restartPython() to use updated packages.\u001B[0m\n" - ] - } - ], + "outputs": [], "source": [ "%pip install -U johnsnowlabs_for_databricks\n", "dbutils.library.restartPython()" @@ -131,37 +90,18 @@ "rowLimit": 10000 }, "inputWidgets": {}, - "nuid": "955607d7-d885-474c-aa41-e2212ba4d265", + "nuid": "2bc70f19-9d62-4547-9565-34c15f64a4a8", "showTitle": false, "title": "" } }, "outputs": [], "source": [ - "from johnsnowlabs.auto_install.databricks.marketplace import render_ui , deploy\n", "from johnsnowlabs import nlp \n", + "from johnsnowlabs.auto_install.databricks.marketplace import render_ui , deploy\n", + "# Render the Widget UI\n", + "render_ui()\n", "\n", - "# Make the UI in the top\n", - "render_ui()" - ] - }, - { - "cell_type": "code", - "execution_count": 0, - "metadata": { - "application/vnd.databricks.v1+cell": { - "cellMetadata": { - "byteLimit": 2048000, - "rowLimit": 10000 - }, - "inputWidgets": {}, - "nuid": "2bc70f19-9d62-4547-9565-34c15f64a4a8", - "showTitle": false, - "title": "" - } - }, - "outputs": [], - "source": [ "# Define some medical text we can use for queries\n", "general_text = \"John Snow is a medical doctor from England. Peter likes America\"\n", "cancer_text = \"\"\"with his breathing while feeding (but negative for any perioral cyanosis or retractions). One day ago, mom also noticed a tactile temperature and gave the patient Tylenol. Baby-girl also has had some decreased p.o. intake. His normal breast-feeding is down from 20 minutes q.2h. to 5 to 10 minutes s\"\"\"\n", @@ -204,33 +144,35 @@ { "output_type": "stream", "name": "stdout", + "output_type": "stream", "text": [ - "Writing license to scope JSL_SCOPE\ncreating model john_snow_labs_extract_social_determinants_of_health.johnsnowlabs_folder.en_med_ner_sdoh_langtest_pipeline_cpu\ncreating endpoint john_snow_labs_extract_social_determinants_of_heal_cpu\nCreating new serving endpoint: john_snow_labs_extract_social_determinants_of_heal_cpu\n{'name': 'john_snow_labs_extract_social_determinants_of_heal_cpu', 'creator': 'christian@johnsnowlabs.com', 'creation_timestamp': 1705960876000, 'last_updated_timestamp': 1705960876000, 'state': {'ready': 'NOT_READY', 'config_update': 'IN_PROGRESS'}, 'pending_config': {'start_time': 1705960876000, 'served_models': [{'name': 'current', 'model_name': 'john_snow_labs_extract_social_determinants_of_health.johnsnowlabs_folder.en_med_ner_sdoh_langtest_pipeline_cpu', 'model_version': '2', 'workload_size': 'Small', 'scale_to_zero_enabled': True, 'workload_type': 'CPU', 'environment_vars': {'DB_ENDPOINT_ENV': '{{secrets/JSL_SCOPE/DB_ENDPOINT_ENV}}', 'JOHNSNOWLABS_LICENSE_JSON': '{{secrets/JSL_SCOPE/JSL_SECRET_NAME}}', 'spark.databricks.api.url': '{{secrets/JSL_SCOPE/DB_API_URL}}'}, 'state': {'deployment': 'DEPLOYMENT_CREATING', 'deployment_state_message': 'Creating resources for served model.'}, 'creator': 'christian@johnsnowlabs.com', 'creation_timestamp': 1705960876000}], 'served_entities': [{'name': 'current', 'entity_name': 'john_snow_labs_extract_social_determinants_of_health.johnsnowlabs_folder.en_med_ner_sdoh_langtest_pipeline_cpu', 'entity_version': '2', 'workload_size': 'Small', 'scale_to_zero_enabled': True, 'workload_type': 'CPU', 'environment_vars': {'DB_ENDPOINT_ENV': '{{secrets/JSL_SCOPE/DB_ENDPOINT_ENV}}', 'JOHNSNOWLABS_LICENSE_JSON': '{{secrets/JSL_SCOPE/JSL_SECRET_NAME}}', 'spark.databricks.api.url': '{{secrets/JSL_SCOPE/DB_API_URL}}'}, 'state': {'deployment': 'DEPLOYMENT_CREATING', 'deployment_state_message': 'Creating resources for served model.'}, 'creator': 'christian@johnsnowlabs.com', 'creation_timestamp': 1705960876000}], 'config_version': 1, 'traffic_config': {'routes': [{'served_model_name': 'current', 'traffic_percentage': 100, 'served_entity_name': 'current'}]}}, 'id': 'f1931837347648348d78a961ec77042c', 'permission_level': 'CAN_MANAGE', 'route_optimized': False}\nDeployment starting, this may take 10 to 20 minutes...\n" + "Writing license to scope JSL_SCOPE\ncreating model john_snow_labs_clinical_de_identification_mask.johnsnowlabs_folder.en_de_identify_clinical_pipeline_cpu\ncreating endpoint my_deid_endpoint\nCreating new serving endpoint: my_deid_endpoint\nDeployment starting, this may take 10 to 20 minutes...\n" ] }, { "output_type": "display_data", "data": { "text/html": [ - "Created the john_snow_labs_extract_social_determinants_of_heal_cpu serving endpoint" + "Created the my_deid_endpoint serving endpoint" ] }, - "metadata": {} + "metadata": {}, + "output_type": "display_data" }, { "output_type": "execute_result", "data": { "text/plain": [ - "'john_snow_labs_extract_social_determinants_of_heal_cpu'" + "'my_deid_endpoint'" ] }, - "execution_count": 8, - "metadata": {} + "execution_count": 5, + "metadata": {}, + "output_type": "execute_result" } ], "source": [ - "# Lets deploy Detect Cancer Genetics (en.med_ner.bionlp.pipeline)\n", - "endpoint_name = deploy()\n", + "endpoint_name = deploy('my_deid_endpoint')\n", "endpoint_name" ] }, @@ -261,7 +203,7 @@ "rowLimit": 10000 }, "inputWidgets": {}, - "nuid": "c03a64a5-22c7-4e91-a6e0-871880d91414", + "nuid": "4d286c95-598a-4e74-8d26-d2a0fcf75228", "showTitle": false, "title": "" } @@ -290,995 +232,106 @@ " \n", " \n", " index\n", - " document\n", - " entities_from_disk\n", - " entities_from_disk_class\n", - " entities_from_disk_confidence\n", - " entities_from_disk_origin_chunk\n", - " entities_from_disk_origin_sentence\n", + " finished_masked\n", + " finished_masked_fixed_length_chars\n", + " finished_masked_with_chars\n", + " finished_ner_chunk\n", + " finished_obfuscated\n", + " finished_sentence\n", " text\n", - " word_embedding_from_disk\n", " \n", " \n", " \n", " \n", " 0\n", " 0\n", + " [<PATIENT> is a medical doctor from <COUNTRY>....\n", + " [**** is a medical doctor from ****., ****]\n", + " [[*******] is a medical doctor from [*****]., ...\n", + " [John Snow, England, Peter likes America]\n", + " [Gustavus Bryant is a medical doctor from Guad...\n", + " [John Snow is a medical doctor from England., ...\n", " John Snow is a medical doctor from England. Pe...\n", - " None\n", - " None\n", - " None\n", - " None\n", - " None\n", - " John Snow is a medical doctor from England. Pe...\n", - " [[0.586196661, 0.0477368683, -0.4561105967, -0...\n", " \n", " \n", " 1\n", " 1\n", + " [with his breathing while feeding (but negativ...\n", + " [with his breathing while feeding (but negativ...\n", + " [with his breathing while feeding (but negativ...\n", + " []\n", + " [with his breathing while feeding (but negativ...\n", + " [with his breathing while feeding (but negativ...\n", " with his breathing while feeding (but negative...\n", - " perioral\n", - " Organism_subdivision\n", - " 0.9995\n", - " 0\n", - " 0\n", - " with his breathing while feeding (but negative...\n", - " [[-0.0100379074, 0.005227346, -0.2856681049, -...\n", " \n", " \n", " 2\n", - " 1\n", - " with his breathing while feeding (but negative...\n", - " patient\n", - " Organism\n", - " 1.0\n", - " 1\n", - " 1\n", - " with his breathing while feeding (but negative...\n", - " [[-0.0100379074, 0.005227346, -0.2856681049, -...\n", - " \n", - " \n", - " 3\n", - " 1\n", - " with his breathing while feeding (but negative...\n", - " Baby-girl\n", - " Cell\n", - " 0.9583\n", - " 2\n", - " 2\n", - " with his breathing while feeding (but negative...\n", - " [[-0.0100379074, 0.005227346, -0.2856681049, -...\n", - " \n", - " \n", - " 4\n", " 2\n", + " [So glad I am off effexor, so sad it ruined my...\n", + " [So glad I am off effexor, so sad it ruined my...\n", + " [So glad I am off effexor, so sad it ruined my...\n", + " []\n", + " [So glad I am off effexor, so sad it ruined my...\n", + " [So glad I am off effexor, so sad it ruined my...\n", " So glad I am off effexor, so sad it ruined my ...\n", - " teeth\n", - " Organ\n", - " 0.9992\n", - " 0\n", - " 0\n", - " So glad I am off effexor, so sad it ruined my ...\n", - " [[0.2837973535, -0.0827255622, 0.282771647, -0...\n", - " \n", - " \n", - " 5\n", - " 3\n", - " MRI demonstrated infarction in the upper brain...\n", - " brain stem\n", - " Tissue\n", - " 0.78555\n", - " 0\n", - " 0\n", - " MRI demonstrated infarction in the upper brain...\n", - " [[0.3066935539, -0.1863229275, 0.6304829717, -...\n", - " \n", - " \n", - " 6\n", - " 3\n", - " MRI demonstrated infarction in the upper brain...\n", - " left cerebellum\n", - " Multi-tissue_structure\n", - " 0.80675\n", - " 1\n", - " 0\n", - " MRI demonstrated infarction in the upper brain...\n", - " [[0.3066935539, -0.1863229275, 0.6304829717, -...\n", " \n", " \n", - " 7\n", + " 3\n", " 3\n", + " [MRI demonstrated infarction in the upper brai...\n", + " [MRI demonstrated infarction in the upper brai...\n", + " [MRI demonstrated infarction in the upper brai...\n", + " []\n", + " [MRI demonstrated infarction in the upper brai...\n", + " [MRI demonstrated infarction in the upper brai...\n", " MRI demonstrated infarction in the upper brain...\n", - " basil ganglia\n", - " Tissue\n", - " 0.69509995\n", - " 2\n", - " 0\n", - " MRI demonstrated infarction in the upper brain...\n", - " [[0.3066935539, -0.1863229275, 0.6304829717, -...\n", - " \n", - " \n", - " 8\n", - " 4\n", - " INTERPRETATION: There has been interval develo...\n", - " left upper lobe\n", - " Multi-tissue_structure\n", - " 0.5312667\n", - " 0\n", - " 0\n", - " INTERPRETATION: There has been interval develo...\n", - " [[0.0482680351, 0.8041833639, 0.2013939619, 0....\n", - " \n", - " \n", - " 9\n", - " 4\n", - " INTERPRETATION: There has been interval develo...\n", - " lobe\n", - " Organ\n", - " 0.8972\n", - " 1\n", - " 1\n", - " INTERPRETATION: There has been interval develo...\n", - " [[0.0482680351, 0.8041833639, 0.2013939619, 0....\n", - " \n", - " \n", - " 10\n", - " 4\n", - " INTERPRETATION: There has been interval develo...\n", - " interstitial\n", - " Organ\n", - " 0.3399\n", - " 2\n", - " 2\n", - " INTERPRETATION: There has been interval develo...\n", - " [[0.0482680351, 0.8041833639, 0.2013939619, 0....\n", - " \n", - " \n", - " 11\n", - " 4\n", - " INTERPRETATION: There has been interval develo...\n", - " heart\n", - " Organ\n", - " 0.9998\n", - " 3\n", - " 3\n", - " INTERPRETATION: There has been interval develo...\n", - " [[0.0482680351, 0.8041833639, 0.2013939619, 0....\n", - " \n", - " \n", - " 12\n", - " 4\n", - " INTERPRETATION: There has been interval develo...\n", - " pulmonary\n", - " Organ\n", - " 0.9991\n", - " 4\n", - " 3\n", - " INTERPRETATION: There has been interval develo...\n", - " [[0.0482680351, 0.8041833639, 0.2013939619, 0....\n", " \n", " \n", - " 13\n", - " 4\n", - " INTERPRETATION: There has been interval develo...\n", - " junction\n", - " Multi-tissue_structure\n", - " 0.8899\n", - " 5\n", + " 4\n", " 4\n", + " [INTERPRETATION: There has been interval devel...\n", + " [INTERPRETATION: There has been interval devel...\n", + " [INTERPRETATION: There has been interval devel...\n", + " []\n", + " [INTERPRETATION: There has been interval devel...\n", + " [INTERPRETATION: There has been interval devel...\n", " INTERPRETATION: There has been interval develo...\n", - " [[0.0482680351, 0.8041833639, 0.2013939619, 0....\n", - " \n", - " \n", - " 14\n", - " 5\n", - " \\nPatient with hypertension, syncope, and spin...\n", - " Patient\n", - " Organism\n", - " 0.9999\n", - " 0\n", - " 0\n", - " \\nPatient with hypertension, syncope, and spin...\n", - " [[-0.0845315754, 0.2063299119, -0.053948395, -...\n", - " \n", - " \n", - " 15\n", - " 5\n", - " \\nPatient with hypertension, syncope, and spin...\n", - " spinal\n", - " Organ\n", - " 0.9967\n", - " 1\n", - " 0\n", - " \\nPatient with hypertension, syncope, and spin...\n", - " [[-0.0845315754, 0.2063299119, -0.053948395, -...\n", - " \n", - " \n", - " 16\n", - " 5\n", - " \\nPatient with hypertension, syncope, and spin...\n", - " patient\n", - " Organism\n", - " 1.0\n", - " 2\n", - " 3\n", - " \\nPatient with hypertension, syncope, and spin...\n", - " [[-0.0845315754, 0.2063299119, -0.053948395, -...\n", - " \n", - " \n", - " 17\n", - " 5\n", - " \\nPatient with hypertension, syncope, and spin...\n", - " female\n", - " Organism\n", - " 0.8777\n", - " 3\n", - " 3\n", - " \\nPatient with hypertension, syncope, and spin...\n", - " [[-0.0845315754, 0.2063299119, -0.053948395, -...\n", - " \n", - " \n", - " 18\n", - " 5\n", - " \\nPatient with hypertension, syncope, and spin...\n", - " She\n", - " Organism\n", - " 0.8927\n", - " 4\n", - " 4\n", - " \\nPatient with hypertension, syncope, and spin...\n", - " [[-0.0845315754, 0.2063299119, -0.053948395, -...\n", - " \n", - " \n", - " 19\n", - " 5\n", - " \\nPatient with hypertension, syncope, and spin...\n", - " She\n", - " Organism\n", - " 0.8581\n", - " 5\n", - " 5\n", - " \\nPatient with hypertension, syncope, and spin...\n", - " [[-0.0845315754, 0.2063299119, -0.053948395, -...\n", - " \n", - " \n", - " 20\n", - " 5\n", - " \\nPatient with hypertension, syncope, and spin...\n", - " edema\n", - " Pathological_formation\n", - " 0.9998\n", - " 6\n", - " 5\n", - " \\nPatient with hypertension, syncope, and spin...\n", - " [[-0.0845315754, 0.2063299119, -0.053948395, -...\n", - " \n", - " \n", - " 21\n", - " 5\n", - " \\nPatient with hypertension, syncope, and spin...\n", - " Atenolol\n", - " Simple_chemical\n", - " 1.0\n", - " 7\n", - " 7\n", - " \\nPatient with hypertension, syncope, and spin...\n", - " [[-0.0845315754, 0.2063299119, -0.053948395, -...\n", - " \n", - " \n", - " 22\n", - " 5\n", - " \\nPatient with hypertension, syncope, and spin...\n", - " Premarin\n", - " Simple_chemical\n", - " 0.9999\n", - " 8\n", - " 7\n", - " \\nPatient with hypertension, syncope, and spin...\n", - " [[-0.0845315754, 0.2063299119, -0.053948395, -...\n", - " \n", - " \n", - " 23\n", - " 5\n", - " \\nPatient with hypertension, syncope, and spin...\n", - " calcium\n", - " Simple_chemical\n", - " 1.0\n", - " 9\n", - " 7\n", - " \\nPatient with hypertension, syncope, and spin...\n", - " [[-0.0845315754, 0.2063299119, -0.053948395, -...\n", - " \n", - " \n", - " 24\n", - " 5\n", - " \\nPatient with hypertension, syncope, and spin...\n", - " vitamin D\n", - " Simple_chemical\n", - " 0.99985003\n", - " 10\n", - " 7\n", - " \\nPatient with hypertension, syncope, and spin...\n", - " [[-0.0845315754, 0.2063299119, -0.053948395, -...\n", - " \n", - " \n", - " 25\n", - " 5\n", - " \\nPatient with hypertension, syncope, and spin...\n", - " multivitamin\n", - " Simple_chemical\n", - " 0.9967\n", - " 11\n", - " 7\n", - " \\nPatient with hypertension, syncope, and spin...\n", - " [[-0.0845315754, 0.2063299119, -0.053948395, -...\n", - " \n", - " \n", - " 26\n", - " 5\n", - " \\nPatient with hypertension, syncope, and spin...\n", - " aspirin\n", - " Simple_chemical\n", - " 1.0\n", - " 12\n", - " 7\n", - " \\nPatient with hypertension, syncope, and spin...\n", - " [[-0.0845315754, 0.2063299119, -0.053948395, -...\n", - " \n", - " \n", - " 27\n", - " 5\n", - " \\nPatient with hypertension, syncope, and spin...\n", - " She\n", - " Organism\n", - " 0.9584\n", - " 13\n", - " 8\n", - " \\nPatient with hypertension, syncope, and spin...\n", - " [[-0.0845315754, 0.2063299119, -0.053948395, -...\n", " \n", " \n", - " 28\n", + " 5\n", " 5\n", + " [Patient with hypertension, syncope, and spina...\n", + " [Patient with hypertension, syncope, and spina...\n", + " [Patient with hypertension, syncope, and spina...\n", + " [78, 12/03/2003]\n", + " [Patient with hypertension, syncope, and spina...\n", + " [Patient with hypertension, syncope, and spina...\n", " \\nPatient with hypertension, syncope, and spin...\n", - " Synalar\n", - " Simple_chemical\n", - " 0.9989\n", - " 14\n", - " 8\n", - " \\nPatient with hypertension, syncope, and spin...\n", - " [[-0.0845315754, 0.2063299119, -0.053948395, -...\n", " \n", " \n", "\n", "" ], "text/plain": [ - " index ... word_embedding_from_disk\n", - "0 0 ... [[0.586196661, 0.0477368683, -0.4561105967, -0...\n", - "1 1 ... [[-0.0100379074, 0.005227346, -0.2856681049, -...\n", - "2 1 ... [[-0.0100379074, 0.005227346, -0.2856681049, -...\n", - "3 1 ... [[-0.0100379074, 0.005227346, -0.2856681049, -...\n", - "4 2 ... [[0.2837973535, -0.0827255622, 0.282771647, -0...\n", - "5 3 ... [[0.3066935539, -0.1863229275, 0.6304829717, -...\n", - "6 3 ... [[0.3066935539, -0.1863229275, 0.6304829717, -...\n", - "7 3 ... [[0.3066935539, -0.1863229275, 0.6304829717, -...\n", - "8 4 ... [[0.0482680351, 0.8041833639, 0.2013939619, 0....\n", - "9 4 ... [[0.0482680351, 0.8041833639, 0.2013939619, 0....\n", - "10 4 ... [[0.0482680351, 0.8041833639, 0.2013939619, 0....\n", - "11 4 ... [[0.0482680351, 0.8041833639, 0.2013939619, 0....\n", - "12 4 ... [[0.0482680351, 0.8041833639, 0.2013939619, 0....\n", - "13 4 ... [[0.0482680351, 0.8041833639, 0.2013939619, 0....\n", - "14 5 ... [[-0.0845315754, 0.2063299119, -0.053948395, -...\n", - "15 5 ... [[-0.0845315754, 0.2063299119, -0.053948395, -...\n", - "16 5 ... [[-0.0845315754, 0.2063299119, -0.053948395, -...\n", - "17 5 ... [[-0.0845315754, 0.2063299119, -0.053948395, -...\n", - "18 5 ... [[-0.0845315754, 0.2063299119, -0.053948395, -...\n", - "19 5 ... [[-0.0845315754, 0.2063299119, -0.053948395, -...\n", - "20 5 ... [[-0.0845315754, 0.2063299119, -0.053948395, -...\n", - "21 5 ... [[-0.0845315754, 0.2063299119, -0.053948395, -...\n", - "22 5 ... [[-0.0845315754, 0.2063299119, -0.053948395, -...\n", - "23 5 ... [[-0.0845315754, 0.2063299119, -0.053948395, -...\n", - "24 5 ... [[-0.0845315754, 0.2063299119, -0.053948395, -...\n", - "25 5 ... [[-0.0845315754, 0.2063299119, -0.053948395, -...\n", - "26 5 ... [[-0.0845315754, 0.2063299119, -0.053948395, -...\n", - "27 5 ... [[-0.0845315754, 0.2063299119, -0.053948395, -...\n", - "28 5 ... [[-0.0845315754, 0.2063299119, -0.053948395, -...\n", + " index ... text\n", + "0 0 ... John Snow is a medical doctor from England. Pe...\n", + "1 1 ... with his breathing while feeding (but negative...\n", + "2 2 ... So glad I am off effexor, so sad it ruined my ...\n", + "3 3 ... MRI demonstrated infarction in the upper brain...\n", + "4 4 ... INTERPRETATION: There has been interval develo...\n", + "5 5 ... \\nPatient with hypertension, syncope, and spin...\n", "\n", - "[29 rows x 9 columns]" + "[6 rows x 8 columns]" ] }, - "execution_count": 26, - "metadata": {} + "execution_count": 6, + "metadata": {}, + "output_type": "execute_result" } ], "source": [ "nlp.query_endpoint(endpoint_name, all_data)" ] - }, - { - "cell_type": "markdown", - "metadata": { - "application/vnd.databricks.v1+cell": { - "cellMetadata": {}, - "inputWidgets": {}, - "nuid": "052029fe-acbf-4582-868a-d4978aa292f6", - "showTitle": false, - "title": "" - } - }, - "source": [ - "## More examples" - ] - }, - { - "cell_type": "code", - "execution_count": 0, - "metadata": { - "application/vnd.databricks.v1+cell": { - "cellMetadata": { - "byteLimit": 2048000, - "rowLimit": 10000 - }, - "inputWidgets": {}, - "nuid": "607120c8-9a8f-4e08-ad8d-a7f640db6f15", - "showTitle": false, - "title": "" - } - }, - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "Writing license to scope JSL_SCOPE\ncreating model john_snow_labs_extract_social_determinants_of_health.johnsnowlabs_folder.en_med_ner_sdoh_langtest_pipeline_cpu\ncreating endpoint john_snow_labs_extract_social_determinants_of_heal_cpu\nCreating new serving endpoint: john_snow_labs_extract_social_determinants_of_heal_cpu\n{'name': 'john_snow_labs_extract_social_determinants_of_heal_cpu', 'creator': 'christian@johnsnowlabs.com', 'creation_timestamp': 1705962275000, 'last_updated_timestamp': 1705962275000, 'state': {'ready': 'NOT_READY', 'config_update': 'IN_PROGRESS'}, 'pending_config': {'start_time': 1705962275000, 'served_models': [{'name': 'current', 'model_name': 'john_snow_labs_extract_social_determinants_of_health.johnsnowlabs_folder.en_med_ner_sdoh_langtest_pipeline_cpu', 'model_version': '2', 'workload_size': 'Small', 'scale_to_zero_enabled': True, 'workload_type': 'CPU', 'environment_vars': {'DB_ENDPOINT_ENV': '{{secrets/JSL_SCOPE/DB_ENDPOINT_ENV}}', 'JOHNSNOWLABS_LICENSE_JSON': '{{secrets/JSL_SCOPE/JSL_SECRET_NAME}}', 'spark.databricks.api.url': '{{secrets/JSL_SCOPE/DB_API_URL}}'}, 'state': {'deployment': 'DEPLOYMENT_CREATING', 'deployment_state_message': 'Creating resources for served model.'}, 'creator': 'christian@johnsnowlabs.com', 'creation_timestamp': 1705962275000}], 'served_entities': [{'name': 'current', 'entity_name': 'john_snow_labs_extract_social_determinants_of_health.johnsnowlabs_folder.en_med_ner_sdoh_langtest_pipeline_cpu', 'entity_version': '2', 'workload_size': 'Small', 'scale_to_zero_enabled': True, 'workload_type': 'CPU', 'environment_vars': {'DB_ENDPOINT_ENV': '{{secrets/JSL_SCOPE/DB_ENDPOINT_ENV}}', 'JOHNSNOWLABS_LICENSE_JSON': '{{secrets/JSL_SCOPE/JSL_SECRET_NAME}}', 'spark.databricks.api.url': '{{secrets/JSL_SCOPE/DB_API_URL}}'}, 'state': {'deployment': 'DEPLOYMENT_CREATING', 'deployment_state_message': 'Creating resources for served model.'}, 'creator': 'christian@johnsnowlabs.com', 'creation_timestamp': 1705962275000}], 'config_version': 1, 'traffic_config': {'routes': [{'served_model_name': 'current', 'traffic_percentage': 100, 'served_entity_name': 'current'}]}}, 'id': '1746b5f4418d45329dade4f7eb3b9c9d', 'permission_level': 'CAN_MANAGE', 'route_optimized': False}\nDeployment starting, this may take 10 to 20 minutes...\n" - ] - }, - { - "output_type": "display_data", - "data": { - "text/html": [ - "Created the john_snow_labs_extract_social_determinants_of_heal_cpu serving endpoint" - ] - }, - "metadata": {} - }, - { - "output_type": "execute_result", - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
indexdocumententitiesentities_classentities_confidenceentities_origin_chunkentities_origin_sentencetextword_embedding_from_disk
00John Snow is a medical doctor from England. Pe...medical doctorEmployment0.620300John Snow is a medical doctor from England. Pe...[[0.586196661, 0.0477368683, -0.4561105967, -0...
10John Snow is a medical doctor from England. Pe...AmericaGeographic_Entity0.507911John Snow is a medical doctor from England. Pe...[[0.586196661, 0.0477368683, -0.4561105967, -0...
21with his breathing while feeding (but negative...hisGender0.995200with his breathing while feeding (but negative...[[-0.0100379074, 0.005227346, -0.2856681049, -...
31with his breathing while feeding (but negative...momFamily_Member0.995211with his breathing while feeding (but negative...[[-0.0100379074, 0.005227346, -0.2856681049, -...
41with his breathing while feeding (but negative...Baby-girlFamily_Member0.9122with his breathing while feeding (but negative...[[-0.0100379074, 0.005227346, -0.2856681049, -...
51with his breathing while feeding (but negative...HisGender0.998633with his breathing while feeding (but negative...[[-0.0100379074, 0.005227346, -0.2856681049, -...
62So glad I am off effexor, so sad it ruined my ...NoneNoneNoneNoneNoneSo glad I am off effexor, so sad it ruined my ...[[0.2837973535, -0.0827255622, 0.282771647, -0...
73MRI demonstrated infarction in the upper brain...infarctionOther_Disease0.921400MRI demonstrated infarction in the upper brain...[[0.3066935539, -0.1863229275, 0.6304829717, -...
83MRI demonstrated infarction in the upper brain...basil gangliaOther_Disease0.569210MRI demonstrated infarction in the upper brain...[[0.3066935539, -0.1863229275, 0.6304829717, -...
94INTERPRETATION: There has been interval develo...pneumothoraxOther_Disease0.878400INTERPRETATION: There has been interval develo...[[0.0482680351, 0.8041833639, 0.2013939619, 0....
104INTERPRETATION: There has been interval develo...interstitialOther_Disease0.771712INTERPRETATION: There has been interval develo...[[0.0482680351, 0.8041833639, 0.2013939619, 0....
114INTERPRETATION: There has been interval develo...pulmonary vascularityOther_Disease0.467323INTERPRETATION: There has been interval develo...[[0.0482680351, 0.8041833639, 0.2013939619, 0....
124INTERPRETATION: There has been interval develo...Groshong tipMental_Health0.4139000234INTERPRETATION: There has been interval develo...[[0.0482680351, 0.8041833639, 0.2013939619, 0....
134INTERPRETATION: There has been interval develo...acute fractureOther_Disease0.6398545INTERPRETATION: There has been interval develo...[[0.0482680351, 0.8041833639, 0.2013939619, 0....
145\\nPatient with hypertension, syncope, and spin...hypertensionHypertension0.988900\\nPatient with hypertension, syncope, and spin...[[-0.0845315754, 0.2063299119, -0.053948395, -...
155\\nPatient with hypertension, syncope, and spin...syncopeOther_Disease0.96710\\nPatient with hypertension, syncope, and spin...[[-0.0845315754, 0.2063299119, -0.053948395, -...
165\\nPatient with hypertension, syncope, and spin...spinal stenosisOther_Disease0.7067500420\\nPatient with hypertension, syncope, and spin...[[-0.0845315754, 0.2063299119, -0.053948395, -...
175\\nPatient with hypertension, syncope, and spin...78-year-oldAge0.966333\\nPatient with hypertension, syncope, and spin...[[-0.0845315754, 0.2063299119, -0.053948395, -...
185\\nPatient with hypertension, syncope, and spin...femaleGender0.997243\\nPatient with hypertension, syncope, and spin...[[-0.0845315754, 0.2063299119, -0.053948395, -...
195\\nPatient with hypertension, syncope, and spin...SheGender0.99954\\nPatient with hypertension, syncope, and spin...[[-0.0845315754, 0.2063299119, -0.053948395, -...
205\\nPatient with hypertension, syncope, and spin...hypertensionHypertension0.993364\\nPatient with hypertension, syncope, and spin...[[-0.0845315754, 0.2063299119, -0.053948395, -...
215\\nPatient with hypertension, syncope, and spin...SheGender0.997675\\nPatient with hypertension, syncope, and spin...[[-0.0845315754, 0.2063299119, -0.053948395, -...
225\\nPatient with hypertension, syncope, and spin...chest painOther_Disease0.5958585\\nPatient with hypertension, syncope, and spin...[[-0.0845315754, 0.2063299119, -0.053948395, -...
235\\nPatient with hypertension, syncope, and spin...orthopneaOther_Disease0.983895\\nPatient with hypertension, syncope, and spin...[[-0.0845315754, 0.2063299119, -0.053948395, -...
245\\nPatient with hypertension, syncope, and spin...nocturnal dyspneaOther_Disease0.75965105\\nPatient with hypertension, syncope, and spin...[[-0.0845315754, 0.2063299119, -0.053948395, -...
255\\nPatient with hypertension, syncope, and spin...edemaOther_Disease0.8885115\\nPatient with hypertension, syncope, and spin...[[-0.0845315754, 0.2063299119, -0.053948395, -...
265\\nPatient with hypertension, syncope, and spin...HOSPITALIZATIONSOther_SDoH_Keywords0.9931126\\nPatient with hypertension, syncope, and spin...[[-0.0845315754, 0.2063299119, -0.053948395, -...
275\\nPatient with hypertension, syncope, and spin...50 mgSubstance_Quantity0.3682137\\nPatient with hypertension, syncope, and spin...[[-0.0845315754, 0.2063299119, -0.053948395, -...
285\\nPatient with hypertension, syncope, and spin...dailySubstance_Frequency0.8701147\\nPatient with hypertension, syncope, and spin...[[-0.0845315754, 0.2063299119, -0.053948395, -...
295\\nPatient with hypertension, syncope, and spin...dailySubstance_Frequency0.9201157\\nPatient with hypertension, syncope, and spin...[[-0.0845315754, 0.2063299119, -0.053948395, -...
305\\nPatient with hypertension, syncope, and spin...three pillsSubstance_Quantity0.49135167\\nPatient with hypertension, syncope, and spin...[[-0.0845315754, 0.2063299119, -0.053948395, -...
315\\nPatient with hypertension, syncope, and spin...dailySubstance_Frequency0.9616177\\nPatient with hypertension, syncope, and spin...[[-0.0845315754, 0.2063299119, -0.053948395, -...
325\\nPatient with hypertension, syncope, and spin...25 mg two pillsSubstance_Quantity0.664675187\\nPatient with hypertension, syncope, and spin...[[-0.0845315754, 0.2063299119, -0.053948395, -...
335\\nPatient with hypertension, syncope, and spin...dailySubstance_Frequency0.969197\\nPatient with hypertension, syncope, and spin...[[-0.0845315754, 0.2063299119, -0.053948395, -...
345\\nPatient with hypertension, syncope, and spin...SheGender0.9992208\\nPatient with hypertension, syncope, and spin...[[-0.0845315754, 0.2063299119, -0.053948395, -...
355\\nPatient with hypertension, syncope, and spin...sheGender0.9916218\\nPatient with hypertension, syncope, and spin...[[-0.0845315754, 0.2063299119, -0.053948395, -...
\n", - "
" - ], - "text/plain": [ - " index ... word_embedding_from_disk\n", - "0 0 ... [[0.586196661, 0.0477368683, -0.4561105967, -0...\n", - "1 0 ... [[0.586196661, 0.0477368683, -0.4561105967, -0...\n", - "2 1 ... [[-0.0100379074, 0.005227346, -0.2856681049, -...\n", - "3 1 ... [[-0.0100379074, 0.005227346, -0.2856681049, -...\n", - "4 1 ... [[-0.0100379074, 0.005227346, -0.2856681049, -...\n", - "5 1 ... [[-0.0100379074, 0.005227346, -0.2856681049, -...\n", - "6 2 ... [[0.2837973535, -0.0827255622, 0.282771647, -0...\n", - "7 3 ... [[0.3066935539, -0.1863229275, 0.6304829717, -...\n", - "8 3 ... [[0.3066935539, -0.1863229275, 0.6304829717, -...\n", - "9 4 ... [[0.0482680351, 0.8041833639, 0.2013939619, 0....\n", - "10 4 ... [[0.0482680351, 0.8041833639, 0.2013939619, 0....\n", - "11 4 ... [[0.0482680351, 0.8041833639, 0.2013939619, 0....\n", - "12 4 ... [[0.0482680351, 0.8041833639, 0.2013939619, 0....\n", - "13 4 ... [[0.0482680351, 0.8041833639, 0.2013939619, 0....\n", - "14 5 ... [[-0.0845315754, 0.2063299119, -0.053948395, -...\n", - "15 5 ... [[-0.0845315754, 0.2063299119, -0.053948395, -...\n", - "16 5 ... [[-0.0845315754, 0.2063299119, -0.053948395, -...\n", - "17 5 ... [[-0.0845315754, 0.2063299119, -0.053948395, -...\n", - "18 5 ... [[-0.0845315754, 0.2063299119, -0.053948395, -...\n", - "19 5 ... [[-0.0845315754, 0.2063299119, -0.053948395, -...\n", - "20 5 ... [[-0.0845315754, 0.2063299119, -0.053948395, -...\n", - "21 5 ... [[-0.0845315754, 0.2063299119, -0.053948395, -...\n", - "22 5 ... [[-0.0845315754, 0.2063299119, -0.053948395, -...\n", - "23 5 ... [[-0.0845315754, 0.2063299119, -0.053948395, -...\n", - "24 5 ... [[-0.0845315754, 0.2063299119, -0.053948395, -...\n", - "25 5 ... [[-0.0845315754, 0.2063299119, -0.053948395, -...\n", - "26 5 ... [[-0.0845315754, 0.2063299119, -0.053948395, -...\n", - "27 5 ... [[-0.0845315754, 0.2063299119, -0.053948395, -...\n", - "28 5 ... [[-0.0845315754, 0.2063299119, -0.053948395, -...\n", - "29 5 ... [[-0.0845315754, 0.2063299119, -0.053948395, -...\n", - "30 5 ... [[-0.0845315754, 0.2063299119, -0.053948395, -...\n", - "31 5 ... [[-0.0845315754, 0.2063299119, -0.053948395, -...\n", - "32 5 ... [[-0.0845315754, 0.2063299119, -0.053948395, -...\n", - "33 5 ... [[-0.0845315754, 0.2063299119, -0.053948395, -...\n", - "34 5 ... [[-0.0845315754, 0.2063299119, -0.053948395, -...\n", - "35 5 ... [[-0.0845315754, 0.2063299119, -0.053948395, -...\n", - "\n", - "[36 rows x 9 columns]" - ] - }, - "execution_count": 12, - "metadata": {} - } - ], - "source": [ - "# Lets deploy Extract Social Determinants of Health (en.med_ner.sdoh_langtest.pipeline)\n", - "endpoint_name = deploy()\n", - "nlp.query_endpoint(endpoint_name, all_data)" - ] - }, - { - "cell_type": "code", - "execution_count": 0, - "metadata": { - "application/vnd.databricks.v1+cell": { - "cellMetadata": {}, - "inputWidgets": {}, - "nuid": "ed2fca53-9cc2-4765-9c36-235f13ff6d23", - "showTitle": false, - "title": "" - } - }, - "outputs": [], - "source": [] } ], "metadata": { @@ -1328,8 +381,8 @@ } }, "JSL-JSON-License": { - "currentValue": "{\"SPARK_NLP_LICENSE\": \"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MjkyMDk1OTksImlhdCI6MTY5NzU4NzIwMCwidW5pcXVlX2lkIjoiNzc4NjI1ODgtNmQ3OS0xMWVlLTllOTMtNmEwMjc2MGNkZDQwIiwic2NvcGUiOlsiaGVhbHRoY2FyZTp0cmFpbmluZyIsImhlYWx0aGNhcmU6aW5mZXJlbmNlIl0sInBsYXRmb3JtIjp7Im5hbWUiOiJQQVlHIiwibWF4X3BhcmFsbGVsX2pvYnMiOi0xfX0.FFjHJOd7ng70SuIZ1cgO4_Ozvfk8qZUoqBw7ItdZHu2sDqP-ah5tA5SbscPsdo3x06pMW5wSoNVDwRG5CcqJWt0xlIuy3rBpwJ7ynBMYheLMvk_Uz_v-N5-Z1ngau-QeHSrGkFQsYKnPWWeeb8W-w35oDIG0vOBf4dpmwT9O6Cngloly5sSO_xHCzaShKKWFYreteC6lXVNlqJD3r5X-E0PgSMFpRlfDHtaoqHKbcyWlA1ydwR1MQCwd3i-gjfVJHArOIyvhKKrsCO6XYx_3AqG57KTrIb9FMAhLq3Z7mBEMJCvK1WUi2SbHXF0tFGdXfVUxymghcVGNYkJOlmCejw\", \"SECRET\": \"5.2.1-ffc2b401994dc1c54ff36dc6e6557a8763900a80\", \"JSL_VERSION\": \"5.2.1\", \"PUBLIC_VERSION\": \"5.2.2\", \"AWS_ACCESS_KEY_ID\": \"ASIASRWSDKBGN2OHSLFS\", \"AWS_SECRET_ACCESS_KEY\": \"W1hI1Jzw5c+bVBijsqV6/DU1jvLX6nMMPFhcyFbj\", \"AWS_SESSION_TOKEN\": \"IQoJb3JpZ2luX2VjEGwaCXVzLWVhc3QtMSJGMEQCIAbjxAxIbpSwLXbb5m1plrqohA+Gy0scYHAEdiyrmeM3AiBuZWlntavCAMW+5wscL9qQgVS59EaVxuR6hjR5VemVkSq/AggkEAQaDDE3NTQ2MDUzNjM5NiIMd7E903IVbZAQWWS4KpwCpXNU7an2yydKkqsS30BxY2PYf5tR6hhUXwPbFrpT7KDD0B52mA2rJsgIN3+rZroeaiEXP/qvbxU7D9sR/G5bs3g53ok9/ub0o3sgUiGa750LjdUKjBefTaSuz8PNJEL9lJGO0P1t/BxJBQ2Ru5dd6GeCT7jGNiErNdPjtgdUxg5njZjZUcR57XQBvDAZqlKCbMNv3dtUY4bf6OF3JPXHOWDc075fZp09h/W+OfKt8h1og/dfuWGzY2r+fZ8m7LU6qJrAU+DtYqBG0tDIOG2ce1p24CqckcT2LJofBOJmf7jBZBpx8Bl3p8tA/g8IDIJQtCoHIpJ7d0j3ZIQ0qwnsVW5u/w9qlb4IsYlg3QKUcAUXNaEk5SfeZAXFENMw/5eyrQY61wHyUaRNYt7TLKdcgIzpPAm+rSa/Q5ESMjY4nV6saoM3r6o7uvsjTyuoe8kwVv+WkkTkW+DWBpnv1OpSYFcW4hTyFHt1/r31CYB6296ubLxXB41+TRGC0K3k0eIX27WL9wxEaVlxYX2MZ/vz233/tROMnUO9QNpZexSMl2ngxfllzh3iNmbogeyZKhKCh8Quc4wPQhDFnkF+13fECXmy3k/A30ZNaAJkJzBG8wONdlaqyEjr0EUrfsbSsPioslLUHYdKlBsMf47811JtY6TXxkWBayCi+gcCPA==\"}", - "nuid": "56a57218-8e02-4317-bc56-b89a33f058ea", + "currentValue": "{\"SPARK_NLP_LICENSE\": \"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MjkyMDk1OTksImlhdCI6MTY5NzU4NzIwMCwidW5pcXVlX2lkIjoiNzc4NjI1ODgtNmQ3OS0xMWVlLTllOTMtNmEwMjc2MGNkZDQwIiwic2NvcGUiOlsiaGVhbHRoY2FyZTp0cmFpbmluZyIsImhlYWx0aGNhcmU6aW5mZXJlbmNlIl0sInBsYXRmb3JtIjp7Im5hbWUiOiJQQVlHIiwibWF4X3BhcmFsbGVsX2pvYnMiOi0xfX0.FFjHJOd7ng70SuIZ1cgO4_Ozvfk8qZUoqBw7ItdZHu2sDqP-ah5tA5SbscPsdo3x06pMW5wSoNVDwRG5CcqJWt0xlIuy3rBpwJ7ynBMYheLMvk_Uz_v-N5-Z1ngau-QeHSrGkFQsYKnPWWeeb8W-w35oDIG0vOBf4dpmwT9O6Cngloly5sSO_xHCzaShKKWFYreteC6lXVNlqJD3r5X-E0PgSMFpRlfDHtaoqHKbcyWlA1ydwR1MQCwd3i-gjfVJHArOIyvhKKrsCO6XYx_3AqG57KTrIb9FMAhLq3Z7mBEMJCvK1WUi2SbHXF0tFGdXfVUxymghcVGNYkJOlmCejw\", \"SECRET\": \"5.2.1-ffc2b401994dc1c54ff36dc6e6557a8763900a80\", \"JSL_VERSION\": \"5.2.1\", \"PUBLIC_VERSION\": \"5.2.2\", \"AWS_ACCESS_KEY_ID\": \"ASIASRWSDKBGJ2W6XEOI\", \"AWS_SECRET_ACCESS_KEY\": \"0D+RWt1ouMpe++UY+XfoD9TZKp3UsMWjiny5EHze\", \"AWS_SESSION_TOKEN\": \"IQoJb3JpZ2luX2VjEOX//////////wEaCXVzLWVhc3QtMSJIMEYCIQCXkPKBZnU/S/s4KE9W3we3cJ3TUgxuHXYFtMxt6ywv/wIhANcLt2hzmrhEABr2JRncwRQ0syJSXEUlz9HDnmE0gREqKsgCCJ7//////////wEQBBoMMTc1NDYwNTM2Mzk2IgxuXAZ4oA+QSo0BMBAqnALA5Bbnm6gseWWS5Dw2JPnpCWwiuVk5gY0EeEuanZdGdENscthnQUSoUYzphEyCNyXo05+8dtth9tbpYmwhe+mPonXDxomtSBQXmB5lxNjTT2/m0E5jqFrssJCQYNbkyF8G++6Kf0T1j2S4lMxZNaK5/BcgIBU8yas6raykF3zJQJ7khFRruwOOmTfKZlf+Mr7vxUIYfnYBmqmUffqB+syqaMetasijkxSupMFOEW8F2vNk9mRhZCq9TJ/kq4ezdVdVmRnXWKbMfHo4FNUzho00SXZaXwg23bn3PSkNSpYmGE6RwnAaWFxmC6EP0JwuzoWff8zOqjdg2Q1uqIVOTwXT10qkmU+Pz11Xvee2pGoHDauWVXymNy+UaFGFwjCA9sytBjrVAUpRH2HlKGnQi5NnmhvEu/VzhbICy9h4OsrX557m+wOiz71hGxYwVPbOAobjn6MDHSWgfXCvAyZMNvJFf0/WpoG9sLvXnYoCrRv9IJqAEtdYuNS4mof/T8YanXyeSuKikkYq046dyWgackVWQmR9GKSwvDDRrUoTVrTwQJ65ztPknsgsONHWm4h1GvHPKzWJQ1vUqxrcrI0dZI2oDeg+J3qDeaKRVnB4UioI+MSXupgnTU0yEX1ZIFI8v5tiksihI5U3khkIqII4gMTpESeX34Ub6gs2OQ==\"}", + "nuid": "f9e40950-8046-4bf0-b41a-6b545b3d3995", "widgetInfo": { "widgetType": "text", "defaultValue": "", @@ -1343,49 +396,84 @@ } }, "The model": { - "currentValue": "en.med_ner.sdoh_langtest.pipeline", - "nuid": "bdcf8ef1-6ef8-4000-aedc-99803c20551c", + "currentValue": "1. Clinical De-identification (Mask)", + "nuid": "2e5dc5b2-4cd2-4e11-aa29-3d92159c9c1a", "widgetInfo": { "widgetType": "dropdown", - "defaultValue": "en.summarize.clinical_guidelines_large.pipeline", + "defaultValue": "1. Clinical De-identification (Mask)", "label": null, "name": "The model", "options": { "widgetType": "dropdown", "autoCreated": null, "choices": [ - "en.summarize.clinical_guidelines_large.pipeline", - "en.resolve.cpt.augmented", - "en.resolve.loinc.augmented", - "en.med_ner.nihss_pipeline", - "en.resolve.icd9.pipeline", - "en.resolve.HPO", - "en.explain_doc.clinical_radiology.pipeline", - "en.explain_doc.era", - "en.med_ner.pathogen.pipeline", - "en.resolve.icdo_augmented", - "en.med_ner.sdoh_langtest.pipeline", - "pt.deid.clinical", - "en.de_identify.clinical_pipeline", - "ro.deid.clinical", - "fr.deid_obfuscated", - "es.deid.clinical", - "en.map_entity.snomed_to_icdo", - "en.med_ner.risk_factors.pipeline", - "de.deid.clinical", - "it.deid.clinical", - "en.explain_doc.clinical_ade", - "en.summarize.radiology.pipeline", - "en.med_ner.living_species.pipeline", - "en.med_ner.anatom.pipeline", - "en.med_ner.bionlp.pipeline" + "1. Clinical De-identification (Mask)", + "2. Clinical De-identification (Obfuscate)", + "3. Clinical De-identification for German (Mask)", + "4. Clinical De-identification for German (Obfuscate)", + "5. Clinical De-identification for Spanish (Mask)", + "6. Clinical De-identification for Spanish (Obfuscate)", + "7. Clinical De-identification forItalian (Mask)", + "8. Clinical De-identification for Italian (Obfuscate)", + "9. Clinical De-identification for French (Mask)", + "10. Clinical De-identification for French (Obfuscate)", + "11. Clinical De-identification for Portuguese (Mask)", + "12. Clinical De-identification for Portuguese (Obfuscate)", + "13. Clinical De-identification for Arabic (Mask)", + "14. Clinical De-identification for Arabic (Obfuscate)", + "15. Clinical De-identification for Romanian (Mask)", + "16. Clinical De-identification for Romanian (Obfuscate)", + "17. Summarize Radiology Reports", + "18. Guideline Summarizer for Asthma & Breast Cancer", + "19. Summarize Clinical Notes in Laymen Terms ", + "20. Summarize Clinical Question Notes", + "21. Summarize PubMed Research", + "22. Clinical Text Summarization", + "23. Medical Question Answering (Open-Book on Clinical Notes)", + "24. Extract clinical events and find temporal relations", + "25. Extract findings in radiology reports", + "26. Extract Adverse Drug Events (ADE)", + "27. Extract oncological entities and relations", + "28. Extract patient information from patient narratives", + "29. Detect Healthcare Professional Consult documents", + "30. Detect Drug Side Effect Narratives", + "31. Extract Social Determinants of Health", + "32. Extract neurologic deficits related to Stroke Scale (NIHSS)", + "33. Extract clinical risk factors", + "34. Detect Cancer Genetics", + "35. Detect Pathogen, Medical Condition and Medicine", + "36. Extract Living Species", + "37. Extract Anatomical Structures", + "38. Extract Drugs and Substances and their UMLS Codes", + "39. Extract Drugs and the correspondingt RXNORM codes", + "40. Extract Clinical Findings and the corresponding ICD10CM codes", + "41. Medication Coder", + "42. Extract Disease and Syndrom entities and their UMLS Codes", + "43. ICD-10-CM to UMLS Code Mapper", + "44. Extract Clinical Findings and the corresponding ICD 9 codes", + "45. Extract Clinical Findings and their UMLS Codes", + "46. Extract Drugs and their UMLS Codes", + "47. Extract phenotypic abnormalities and the coresponding HPO codes ", + "48. Extract procedures and measurements and their corresponding CPT codes", + "49. ICD-10-CM to SNOMED Code Mapper", + "50. ICD-10 to ICD-9 Code Converter", + "51. MeSH to UMLS Code Mapper", + "52. Resolve Oncology terminology with ICD-O Taxonomy", + "53. RxNorm to MeSH Code Mapper", + "54. RxNorm to NDC Code Converter", + "55. RxNorm to UMLS Code Mapper", + "56. SNOMED Clinical Health Information Coder", + "57. SNOMED Codes to ICDO Codes Mapper", + "58. SNOMED to ICD-10-CM Code Mapper", + "59. SNOMED to UMLS Code Mapper", + "60. Extract Laboratory Observations and the corresponding LOINC codes" ] } } }, "hardware_target": { "currentValue": "CPU", - "nuid": "310fa85e-7855-4365-a1e5-88a632a8b7e7", + "nuid": "86f10dfd-6480-487f-ae37-cfd722fc0e60", "widgetInfo": { "widgetType": "dropdown", "defaultValue": "CPU", From 2af4529f5053cd817249e354edb8a9c4e39034c7 Mon Sep 17 00:00:00 2001 From: Christian Kasim Loan Date: Mon, 29 Jan 2024 09:43:54 +0100 Subject: [PATCH 2/2] add tmp dir to setting and fix bug with notebook submission path for nlp.run_in_databricks() --- johnsnowlabs/auto_install/databricks/work_utils.py | 10 ++-------- johnsnowlabs/settings.py | 1 + 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/johnsnowlabs/auto_install/databricks/work_utils.py b/johnsnowlabs/auto_install/databricks/work_utils.py index 0427a276a2..2d1b8eadb2 100644 --- a/johnsnowlabs/auto_install/databricks/work_utils.py +++ b/johnsnowlabs/auto_install/databricks/work_utils.py @@ -205,11 +205,8 @@ def executable_as_script(py_executable: Union[str, ModuleType, Callable]): def executable_to_str(executable_to_convert: Union[str, ModuleType, Callable]): # write a python code-string/module/function into a temp file and return resulting python file - import johnsnowlabs.utils.testing.test_settings - Path(johnsnowlabs.utils.testing.test_settings.tmp_notebook_dir).mkdir( - parents=True, exist_ok=True - ) + Path(settings.tmp).mkdir(parents=True, exist_ok=True) from random import randrange if isinstance(executable_to_convert, str) and not os.path.exists( @@ -225,10 +222,7 @@ def executable_to_str(executable_to_convert: Union[str, ModuleType, Callable]): except: # Within a Python shell, we cannot getFile(), so we have this fallback name file_name = f"{randrange(1333777)}tmp.py" - - out_path = ( - f"{johnsnowlabs.utils.testing.test_settings.tmp_notebook_dir}/{file_name}" - ) + out_path = f"{settings.tmp}/{file_name}" if isinstance(executable_to_convert, str): print(f"Detected Python Code String") diff --git a/johnsnowlabs/settings.py b/johnsnowlabs/settings.py index 48a11104d8..4886effead 100644 --- a/johnsnowlabs/settings.py +++ b/johnsnowlabs/settings.py @@ -58,6 +58,7 @@ license_dir = os.path.join(root_dir, "licenses") java_dir = os.path.join(root_dir, "java_installs") py_dir = os.path.join(root_dir, "py_installs") +tmp = os.path.join(root_dir, "tmp") # Info Files root_info_file = os.path.join(root_dir, "info.json")