Instructions to use nclgbd/medsiglip-448-pneumonia-finetune with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nclgbd/medsiglip-448-pneumonia-finetune with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="nclgbd/medsiglip-448-pneumonia-finetune") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# Load model directly from transformers import AutoProcessor, AutoModelForImageClassification processor = AutoProcessor.from_pretrained("nclgbd/medsiglip-448-pneumonia-finetune") model = AutoModelForImageClassification.from_pretrained("nclgbd/medsiglip-448-pneumonia-finetune", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Upload folder using huggingface_hub
Browse files- .hydra/config.yaml +36 -0
- .hydra/hydra.yaml +165 -0
- .hydra/overrides.yaml +1 -0
.hydra/config.yaml
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
user: nclgbd
|
| 2 |
+
name: medsiglip-448
|
| 3 |
+
label_column: chexagent
|
| 4 |
+
dataset_id: vllm-pneumonia-detection/mimic-cxr-labelled-dataset
|
| 5 |
+
task: finetune
|
| 6 |
+
dry_run: false
|
| 7 |
+
push_to_hub: true
|
| 8 |
+
date: ${now:%Y-%m-%d}
|
| 9 |
+
timestamp: ${now:%H-%M-%S}
|
| 10 |
+
data_dir: /data/nicoleg/datasets/physionet.org/files/mimic-cxr-jpg/2.1.0
|
| 11 |
+
pretrained_model_id: google/medsiglip-448
|
| 12 |
+
batch_size: 48
|
| 13 |
+
logging_steps: 500
|
| 14 |
+
training_args:
|
| 15 |
+
num_train_epochs: 25
|
| 16 |
+
resume_from_checkpoint: false
|
| 17 |
+
output_dir: model
|
| 18 |
+
load_best_model_at_end: true
|
| 19 |
+
logging_dir: logs
|
| 20 |
+
auto_find_batch_size: true
|
| 21 |
+
per_device_eval_batch_size: ${batch_size}
|
| 22 |
+
per_device_train_batch_size: ${batch_size}
|
| 23 |
+
remove_unused_columns: false
|
| 24 |
+
save_total_limit: 1
|
| 25 |
+
logging_steps: ${logging_steps}
|
| 26 |
+
logging_first_step: true
|
| 27 |
+
eval_strategy: steps
|
| 28 |
+
save_strategy: steps
|
| 29 |
+
eval_steps: ${logging_steps}
|
| 30 |
+
save_steps: ${training_args.eval_steps}
|
| 31 |
+
greater_is_better: true
|
| 32 |
+
learning_rate: 5.0e-06
|
| 33 |
+
lr_scheduler_type: cosine
|
| 34 |
+
metric_for_best_model: f1-score
|
| 35 |
+
warmup_steps: 0
|
| 36 |
+
weight_decay: 0.01
|
.hydra/hydra.yaml
ADDED
|
@@ -0,0 +1,165 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
hydra:
|
| 2 |
+
run:
|
| 3 |
+
dir: outputs/${hydra.job.config_name}/${date}/${timestamp}
|
| 4 |
+
sweep:
|
| 5 |
+
dir: outputs/${hydra.job.config_name}/${date}/${timestamp}
|
| 6 |
+
subdir: ${hydra.job.override_dirname}
|
| 7 |
+
launcher:
|
| 8 |
+
_target_: hydra._internal.core_plugins.basic_launcher.BasicLauncher
|
| 9 |
+
sweeper:
|
| 10 |
+
_target_: hydra._internal.core_plugins.basic_sweeper.BasicSweeper
|
| 11 |
+
max_batch_size: null
|
| 12 |
+
params: null
|
| 13 |
+
help:
|
| 14 |
+
app_name: ${hydra.job.name}
|
| 15 |
+
header: '${hydra.help.app_name} is powered by Hydra.
|
| 16 |
+
|
| 17 |
+
'
|
| 18 |
+
footer: 'Powered by Hydra (https://hydra.cc)
|
| 19 |
+
|
| 20 |
+
Use --hydra-help to view Hydra specific help
|
| 21 |
+
|
| 22 |
+
'
|
| 23 |
+
template: '${hydra.help.header}
|
| 24 |
+
|
| 25 |
+
== Configuration groups ==
|
| 26 |
+
|
| 27 |
+
Compose your configuration from those groups (group=option)
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
$APP_CONFIG_GROUPS
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
== Config ==
|
| 34 |
+
|
| 35 |
+
Override anything in the config (foo.bar=value)
|
| 36 |
+
|
| 37 |
+
|
| 38 |
+
$CONFIG
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
${hydra.help.footer}
|
| 42 |
+
|
| 43 |
+
'
|
| 44 |
+
hydra_help:
|
| 45 |
+
template: 'Hydra (${hydra.runtime.version})
|
| 46 |
+
|
| 47 |
+
See https://hydra.cc for more info.
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
== Flags ==
|
| 51 |
+
|
| 52 |
+
$FLAGS_HELP
|
| 53 |
+
|
| 54 |
+
|
| 55 |
+
== Configuration groups ==
|
| 56 |
+
|
| 57 |
+
Compose your configuration from those groups (For example, append hydra/job_logging=disabled
|
| 58 |
+
to command line)
|
| 59 |
+
|
| 60 |
+
|
| 61 |
+
$HYDRA_CONFIG_GROUPS
|
| 62 |
+
|
| 63 |
+
|
| 64 |
+
Use ''--cfg hydra'' to Show the Hydra config.
|
| 65 |
+
|
| 66 |
+
'
|
| 67 |
+
hydra_help: ???
|
| 68 |
+
hydra_logging:
|
| 69 |
+
version: 1
|
| 70 |
+
formatters:
|
| 71 |
+
colorlog:
|
| 72 |
+
(): colorlog.ColoredFormatter
|
| 73 |
+
format: '[%(cyan)s%(asctime)s%(reset)s][%(purple)sHYDRA%(reset)s] %(message)s'
|
| 74 |
+
handlers:
|
| 75 |
+
console:
|
| 76 |
+
class: logging.StreamHandler
|
| 77 |
+
formatter: colorlog
|
| 78 |
+
stream: ext://sys.stdout
|
| 79 |
+
root:
|
| 80 |
+
level: INFO
|
| 81 |
+
handlers:
|
| 82 |
+
- console
|
| 83 |
+
disable_existing_loggers: false
|
| 84 |
+
job_logging:
|
| 85 |
+
version: 1
|
| 86 |
+
formatters:
|
| 87 |
+
simple:
|
| 88 |
+
format: '[%(asctime)s][%(name)s][%(levelname)s] - %(message)s'
|
| 89 |
+
colorlog:
|
| 90 |
+
(): colorlog.ColoredFormatter
|
| 91 |
+
format: '[%(cyan)s%(asctime)s%(reset)s][%(blue)s%(name)s%(reset)s][%(log_color)s%(levelname)s%(reset)s]
|
| 92 |
+
- %(message)s'
|
| 93 |
+
log_colors:
|
| 94 |
+
DEBUG: purple
|
| 95 |
+
INFO: green
|
| 96 |
+
WARNING: yellow
|
| 97 |
+
ERROR: red
|
| 98 |
+
CRITICAL: red
|
| 99 |
+
handlers:
|
| 100 |
+
console:
|
| 101 |
+
class: logging.StreamHandler
|
| 102 |
+
formatter: colorlog
|
| 103 |
+
stream: ext://sys.stdout
|
| 104 |
+
file:
|
| 105 |
+
class: logging.FileHandler
|
| 106 |
+
formatter: simple
|
| 107 |
+
filename: ${hydra.job.name}.log
|
| 108 |
+
root:
|
| 109 |
+
level: INFO
|
| 110 |
+
handlers:
|
| 111 |
+
- console
|
| 112 |
+
- file
|
| 113 |
+
disable_existing_loggers: false
|
| 114 |
+
env: {}
|
| 115 |
+
mode: RUN
|
| 116 |
+
searchpath: []
|
| 117 |
+
callbacks: {}
|
| 118 |
+
output_subdir: .hydra
|
| 119 |
+
overrides:
|
| 120 |
+
hydra:
|
| 121 |
+
- hydra.mode=RUN
|
| 122 |
+
task: []
|
| 123 |
+
job:
|
| 124 |
+
name: train_siglip
|
| 125 |
+
chdir: true
|
| 126 |
+
override_dirname: ''
|
| 127 |
+
id: ???
|
| 128 |
+
num: ???
|
| 129 |
+
config_name: train-siglip
|
| 130 |
+
env_set: {}
|
| 131 |
+
env_copy: []
|
| 132 |
+
config:
|
| 133 |
+
override_dirname:
|
| 134 |
+
kv_sep: '='
|
| 135 |
+
item_sep: ','
|
| 136 |
+
exclude_keys: []
|
| 137 |
+
runtime:
|
| 138 |
+
version: 1.3.2
|
| 139 |
+
version_base: '1.2'
|
| 140 |
+
cwd: /data/nicoleg/workspaces/dissertation
|
| 141 |
+
config_sources:
|
| 142 |
+
- path: hydra.conf
|
| 143 |
+
schema: pkg
|
| 144 |
+
provider: hydra
|
| 145 |
+
- path: /data/nicoleg/workspaces/dissertation/configs
|
| 146 |
+
schema: file
|
| 147 |
+
provider: main
|
| 148 |
+
- path: hydra_plugins.hydra_colorlog.conf
|
| 149 |
+
schema: pkg
|
| 150 |
+
provider: hydra-colorlog
|
| 151 |
+
- path: ''
|
| 152 |
+
schema: structured
|
| 153 |
+
provider: schema
|
| 154 |
+
output_dir: /data/nicoleg/workspaces/dissertation/outputs/train-siglip/2025-09-21/15-58-23
|
| 155 |
+
choices:
|
| 156 |
+
hydra/env: default
|
| 157 |
+
hydra/callbacks: null
|
| 158 |
+
hydra/job_logging: colorlog
|
| 159 |
+
hydra/hydra_logging: colorlog
|
| 160 |
+
hydra/hydra_help: default
|
| 161 |
+
hydra/help: default
|
| 162 |
+
hydra/sweeper: basic
|
| 163 |
+
hydra/launcher: basic
|
| 164 |
+
hydra/output: default
|
| 165 |
+
verbose: false
|
.hydra/overrides.yaml
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
[]
|