{ "cells": [ { "cell_type": "markdown", "id": "f65637ee", "metadata": { "id": "colab-badge", "papermill": { "duration": 0.003651, "end_time": "2026-07-28T22:53:14.629375+00:00", "exception": false, "start_time": "2026-07-28T22:53:14.625724+00:00", "status": "completed" }, "tags": [] }, "source": [ "\n", " \"Open\n", "" ] }, { "cell_type": "markdown", "id": "eadfea7f", "metadata": { "papermill": { "duration": 0.003331, "end_time": "2026-07-28T22:53:14.648404+00:00", "exception": false, "start_time": "2026-07-28T22:53:14.645073+00:00", "status": "completed" }, "tags": [] }, "source": [ "# Example Hub and Local Operation Collections\n", "\n", "This notebook demonstrates the complete workflow for uploading and downloading operations collections using the \n", "`HubAnalysisOpManager` and loading local operations via `IT_ANALYSIS_OP_PATHS`. The workflow includes:\n", "\n", "1. Setting up local op collection path via IT_ANALYSIS_OP_PATHS\n", "2. Copying the current hub_op_collection folder to /tmp/\n", "3. Uploading operations to HuggingFace Hub as a private repository\n", "4. Downloading the uploaded collection to the default cache\n", "5. Re-importing interpretune to verify both hub and local operations are available\n", "6. Testing the loaded operations\n", "7. Cleaning up downloaded operations and re-importing\n", "8. Verifying only local operations remain available\n", "9. Final cleanup of the local operations collection\n", "\n", "```python\n", "\n", "**Note**: This example requires HuggingFace Hub authentication and will create a private repository.\n", "```" ] }, { "cell_type": "markdown", "id": "f24d51b0", "metadata": { "papermill": { "duration": 0.002986, "end_time": "2026-07-28T22:53:14.654462+00:00", "exception": false, "start_time": "2026-07-28T22:53:14.651476+00:00", "status": "completed" }, "tags": [] }, "source": [ "## Setup and Imports" ] }, { "cell_type": "code", "execution_count": 2, "id": "395a631a", "metadata": { "execution": { "iopub.execute_input": "2026-07-28T22:53:14.661856Z", "iopub.status.busy": "2026-07-28T22:53:14.661705Z", "iopub.status.idle": "2026-07-28T22:53:26.900162Z", "shell.execute_reply": "2026-07-28T22:53:26.899182Z" }, "papermill": { "duration": 12.24363, "end_time": "2026-07-28T22:53:26.901145+00:00", "exception": false, "start_time": "2026-07-28T22:53:14.657515+00:00", "status": "completed" }, "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Interpretune version: \n", "Current analysis cache location: /mnt/cache_extended/speediedan/.cache/huggingface/interpretune\n", "Current modules cache location: /mnt/cache_extended/speediedan/.cache/huggingface/interpretune/modules\n", "Current hub cache location: /mnt/cache_extended/speediedan/.cache/huggingface/hub/interpretune_ops\n", "Current IT analysis op paths: []\n", "This notebook's example hub op collection directory: /home/speediedan/repos/interpretune/src/it_examples/notebooks/publish/example_op_collections/hub_op_collection\n", "This notebook's example local op collection directory: /home/speediedan/repos/interpretune/src/it_examples/notebooks/publish/example_op_collections/local_op_collection\n" ] } ], "source": [ "import os\n", "from pathlib import Path\n", "\n", "# Import interpretune components\n", "import interpretune\n", "from interpretune.analysis.ops.hub_manager import HubAnalysisOpManager\n", "from interpretune.analysis import IT_ANALYSIS_CACHE, IT_ANALYSIS_HUB_CACHE, IT_ANALYSIS_OP_PATHS, IT_MODULES_CACHE\n", "from interpretune.base.components.cli import IT_BASE\n", "\n", "# Import utility functions for op collection demo setup/cleanup\n", "import it_examples.notebooks.publish.example_op_collections.op_collection_demo_utils as op_demo_utils\n", "\n", "example_op_collections_dir = Path(IT_BASE / \"notebooks\" / \"publish\" / \"example_op_collections\")\n", "example_hub_op_collection_dir = Path(example_op_collections_dir / \"hub_op_collection\")\n", "example_local_op_collection_dir = Path(example_op_collections_dir / \"local_op_collection\")\n", "\n", "# Print environment summary\n", "op_demo_utils.print_env_summary(\n", " interpretune.version,\n", " IT_ANALYSIS_CACHE,\n", " IT_MODULES_CACHE,\n", " IT_ANALYSIS_HUB_CACHE,\n", " IT_ANALYSIS_OP_PATHS,\n", " example_hub_op_collection_dir,\n", " example_local_op_collection_dir,\n", ")" ] }, { "cell_type": "markdown", "id": "19463a7b", "metadata": { "papermill": { "duration": 0.014608, "end_time": "2026-07-28T22:53:26.920406+00:00", "exception": false, "start_time": "2026-07-28T22:53:26.905798+00:00", "status": "completed" }, "tags": [] }, "source": [ "## Step 1: Stage example local op collections to a temporary directory\n", "\n", "Copy the local_op_collection to /tmp/ and add it to IT_ANALYSIS_OP_PATHS so local operations are loaded." ] }, { "cell_type": "code", "execution_count": 3, "id": "76259b28", "metadata": { "execution": { "iopub.execute_input": "2026-07-28T22:53:26.930112Z", "iopub.status.busy": "2026-07-28T22:53:26.929969Z", "iopub.status.idle": "2026-07-28T22:53:26.934204Z", "shell.execute_reply": "2026-07-28T22:53:26.933549Z" }, "papermill": { "duration": 0.010529, "end_time": "2026-07-28T22:53:26.935263+00:00", "exception": false, "start_time": "2026-07-28T22:53:26.924734+00:00", "status": "completed" }, "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Source local op_collection: /home/speediedan/repos/interpretune/src/it_examples/notebooks/publish/example_op_collections/local_op_collection\n", "Destination: /tmp/local_op_collection\n", "✓ Successfully copied local op_collection to /tmp/local_op_collection\n", "Original IT_ANALYSIS_OP_PATHS environment variable: ''\n", "✓ Set IT_ANALYSIS_OP_PATHS environment variable to: '/tmp/local_op_collection'\n", "✓ Also added /tmp/local_op_collection to imported IT_ANALYSIS_OP_PATHS list\n", "\n", "Updated IT_ANALYSIS_OP_PATHS list: ['/tmp/local_op_collection']\n", "Current IT_ANALYSIS_OP_PATHS env var: '/tmp/local_op_collection'\n", "\n", "Contents of copied local op_collection:\n", " - local_op_definitions.py\n", " - local_op_collection.yaml\n" ] } ], "source": [ "# Define source and destination paths for local ops\n", "source_local_op_collection = example_local_op_collection_dir\n", "tmp_local_op_collection = Path(\"/tmp/local_op_collection\")\n", "\n", "# copy our local op collection to `tmp_local_op_collection` and that path to our IT_ANALYSIS_OP_PATHS env var\n", "original_op_paths_env, new_op_paths = op_demo_utils.setup_local_op_collection(\n", " source_local_op_collection=source_local_op_collection, tmp_local_op_collection=tmp_local_op_collection\n", ")" ] }, { "cell_type": "markdown", "id": "17bc534c", "metadata": { "papermill": { "duration": 0.004275, "end_time": "2026-07-28T22:53:26.944065+00:00", "exception": false, "start_time": "2026-07-28T22:53:26.939790+00:00", "status": "completed" }, "tags": [] }, "source": [ "## Step 2: Copy hub op_collection to /tmp/\n", "\n", "Copy the hub op_collection folder to /tmp/ for upload to the hub." ] }, { "cell_type": "code", "execution_count": 4, "id": "4946f954", "metadata": { "execution": { "iopub.execute_input": "2026-07-28T22:53:26.954273Z", "iopub.status.busy": "2026-07-28T22:53:26.954141Z", "iopub.status.idle": "2026-07-28T22:53:26.958384Z", "shell.execute_reply": "2026-07-28T22:53:26.957696Z" }, "papermill": { "duration": 0.010877, "end_time": "2026-07-28T22:53:26.959546+00:00", "exception": false, "start_time": "2026-07-28T22:53:26.948669+00:00", "status": "completed" }, "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Source hub op_collection: /home/speediedan/repos/interpretune/src/it_examples/notebooks/publish/example_op_collections/hub_op_collection\n", "Destination: /tmp/hub_op_collection\n", "✓ Successfully copied hub op_collection to /tmp/hub_op_collection\n", "\n", "Contents of copied hub op_collection:\n", " - hub_op_collection.yaml\n", " - hub_op_definitions.py\n" ] } ], "source": [ "# Define source and destination paths for hub ops\n", "source_op_collection = example_hub_op_collection_dir\n", "tmp_op_collection = Path(\"/tmp/hub_op_collection\")\n", "\n", "# Stage a hub op collection using utility function\n", "op_demo_utils.setup_hub_op_collection(source_op_collection=source_op_collection, tmp_op_collection=tmp_op_collection)" ] }, { "cell_type": "markdown", "id": "5b5ec51b", "metadata": { "papermill": { "duration": 0.004394, "end_time": "2026-07-28T22:53:26.968655+00:00", "exception": false, "start_time": "2026-07-28T22:53:26.964261+00:00", "status": "completed" }, "tags": [] }, "source": [ "## Step 3: Upload operations to HuggingFace Hub\n", "\n", "Upload the hub op_collection to HuggingFace Hub as a private repository named \"trivial_op_repo\"." ] }, { "cell_type": "code", "execution_count": 5, "id": "467c6fad", "metadata": { "execution": { "iopub.execute_input": "2026-07-28T22:53:26.978690Z", "iopub.status.busy": "2026-07-28T22:53:26.978533Z", "iopub.status.idle": "2026-07-28T22:53:27.727203Z", "shell.execute_reply": "2026-07-28T22:53:27.726117Z" }, "papermill": { "duration": 0.755217, "end_time": "2026-07-28T22:53:27.728323+00:00", "exception": false, "start_time": "2026-07-28T22:53:26.973106+00:00", "status": "completed" }, "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Uploading op_collection to HuggingFace Hub...\n", "Current HF user: speediedan\n", "Repository: trivial_op_repo\n", "Private: True\n", "Source folder: /tmp/hub_op_collection\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "No files have been modified since last commit. Skipping to prevent empty commit.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "✓ Successfully uploaded operations (if necessary) to trivial_op_repo\n", "Upload result (new or latest op repo commit sha): 66f9e0cc2c6d9b792bbc5020c5ae20cffb6b8934\n" ] } ], "source": [ "from huggingface_hub import whoami\n", "\n", "# Resolve HF token: try dedicated key first, then standard HF_TOKEN, then interactive login.\n", "hub_token = os.environ.get(\"HF_TRIVIAL_OP_REPO_EXAMPLE_AUTH_KEY\") or os.environ.get(\"HF_TOKEN\")\n", "if not hub_token:\n", " from huggingface_hub import notebook_login\n", "\n", " notebook_login()\n", " hub_token = os.environ.get(\"HF_TOKEN\") # notebook_login sets HF_TOKEN\n", "\n", "current_user = whoami(token=hub_token)[\"name\"]\n", "\n", "# Initialize the hub manager with the resolved token\n", "hub_manager = HubAnalysisOpManager(token=hub_token)\n", "\n", "# Repository configuration\n", "repo_name = \"trivial_op_repo\"\n", "private = True\n", "\n", "print(\"Uploading op_collection to HuggingFace Hub...\")\n", "print(f\"Current HF user: {current_user}\")\n", "print(f\"Repository: {repo_name}\")\n", "print(f\"Private: {private}\")\n", "print(f\"Source folder: {tmp_op_collection}\")\n", "\n", "# Ensure the user is authenticated\n", "repo_id = f\"{current_user}/{repo_name}\"\n", "try:\n", " # Upload operations to hub\n", " # 1. This will create the specified repository if it doesn't exist\n", " # 2. If the repo exists, it will clean existing operations and upload the new ones in a single commit\n", " # - If no files have changed, it will skip the commit and leave the repository unchanged\n", "\n", " upload_result = hub_manager.upload_ops(\n", " local_dir=tmp_op_collection, repo_id=repo_id, private=private, clean_existing=True\n", " )\n", "\n", " print(f\"\\u2713 Successfully uploaded operations (if necessary) to {repo_name}\")\n", " print(f\"Upload result (new or latest op repo commit sha): {upload_result}\")\n", "\n", "except Exception as e:\n", " print(f\"\\u274c Error uploading operations: {e}\")\n", " raise" ] }, { "cell_type": "markdown", "id": "24e3bafb", "metadata": { "papermill": { "duration": 0.014531, "end_time": "2026-07-28T22:53:27.747939+00:00", "exception": false, "start_time": "2026-07-28T22:53:27.733408+00:00", "status": "completed" }, "tags": [] }, "source": [ "## Step 4: Download operations to default hub cache\n", "\n", "Download the uploaded operations collection to the default `IT_ANALYSIS_HUB_CACHE` location." ] }, { "cell_type": "code", "execution_count": 6, "id": "e8ffd7c4", "metadata": { "execution": { "iopub.execute_input": "2026-07-28T22:53:27.758911Z", "iopub.status.busy": "2026-07-28T22:53:27.758696Z", "iopub.status.idle": "2026-07-28T22:53:28.236428Z", "shell.execute_reply": "2026-07-28T22:53:28.235384Z" }, "papermill": { "duration": 0.48474, "end_time": "2026-07-28T22:53:28.237400+00:00", "exception": false, "start_time": "2026-07-28T22:53:27.752660+00:00", "status": "completed" }, "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Downloading operations from speediedan/trivial_op_repo to default cache...\n", "Cache location: /mnt/cache_extended/speediedan/.cache/huggingface/hub/interpretune_ops\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "88fa3df06db54fcb8fdce1182412a2c9", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Downloading (incomplete total...): 0.00B [00:00, ?B/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "97099095570047c499f864c5d447a855", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Fetching 5 files: 0%| | 0/5 [00:00 ITAnalysisFormatter)\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "Overwriting format type alias 'itanalysis' (interpretune -> interpretune)\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "Overwriting format type alias 'it' (interpretune -> interpretune)\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "Overwriting format type alias 'interpretune' (interpretune -> interpretune)\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Re-importing interpretune to pick up hub and local operations...\n", "✓ Interpretune re-imported\n", "\n", "📊 Operation Summary:\n", " Total registered names: 45\n", " Unique operations: 32\n", " Hub operations: 1\n", " Local operations: 10\n", " Composed operations: 8\n", " Built-in operations: 13\n", "\n", "🌐 Hub operations found:\n", " - speediedan.trivial_op_repo.trivial_test_op (accessible as: speediedan.trivial_op_repo.trivial_test_op, trivial_test_op)\n", "\n", "🏠 Local operations found:\n", " - extract_concept_latent_state (accessible as: extract_concept_latent_state, concept_latent_state_from_cache) - Extract per-example latent rows from the configured cache key\n", " - extract_concept_latent_examples (accessible as: extract_concept_latent_examples, concept_latent_examples) - Filter and annotate latent rows for concept-direction aggregation\n", " - concept_direction (accessible as: concept_direction, semantic_direction) - Aggregate latent concept examples into a normalized concept direction vector\n", " - compute_attribution_graph (accessible as: compute_attribution_graph, ct_graph) - Generate an attribution graph with circuit-tracer\n", " - extract_top_features (accessible as: extract_top_features, ct_top_features) - Extract top-N influential features from an attribution graph\n", " - graph_prune (accessible as: graph_prune, ct_graph_prune) - Prune a circuit-tracer attribution graph\n", " - graph_node_influence (accessible as: graph_node_influence, ct_node_influence) - Compute node influence scores for an attribution graph\n", " - feature_intervention_forward (accessible as: feature_intervention_forward, ct_feature_intervention) - Run feature interventions and return pre/post intervention outputs\n", " - model_fwd_intervention (accessible as: model_fwd_intervention, direction_intervention, direct_concept_direction_intervention) - Apply generalized hook-point interventions and return pre/post intervention logits\n", " - trivial_local_test_op (accessible as: trivial_local_test_op) - Local test op that transforms a simple orig_labels tensor to a preds tensor\n", "\n", "🔧 Testing operation instantiation:\n", "labels_to_ids op reference type: \n", "get_answer_indices op reference type: \n", "trivial_test_op op reference type: \n", "Get non-direct access attribute of labels_to_ids (description of the underlying AnalysisOp): Convert label strings to tensor IDs\n", "Type of labels_to_ids now: \n", "Type of get_answer_indices is still: and its instantiated status is False\n", "Non-direct access attribute of get_answer_indices (name of the underlying AnalysisOp): get_answer_indices\n", "Type of get_answer_indices is now: \n", "Type of trivial_test_op is: and its instantiated status is False\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Non-direct access attribute of trivial_test_op (name of the underlying AnalysisOp): trivial_test_op\n", "Type of trivial_test_op is now: as it has been successfully instantiated\n", "Non-direct access attribute of trivial_local_test_op (name of the underlying AnalysisOp): trivial_local_test_op\n", "Type of trivial_local_test_op is now: as it has been successfully instantiated\n", "speediedan.trivial_op_repo.trivial_test_op op reference type: \n", "extract_concept_latent_state op reference type: \n" ] } ], "source": [ "print(\"Re-importing interpretune to pick up hub and local operations...\")\n", "# Remove interpretune modules from sys.modules to force reimport\n", "op_demo_utils.purge_it_modules_from_sys()\n", "\n", "# ruff: noqa: E402\n", "\n", "# Re-import interpretune\n", "import interpretune as it\n", "from interpretune import DISPATCHER\n", "\n", "print(\"✓ Interpretune re-imported\")\n", "\n", "# Get operation definitions and generate summary\n", "operation_definitions = DISPATCHER.registered_ops\n", "op_demo_utils.generate_op_summary(operation_definitions)\n", "\n", "# Show operations by type\n", "canonical_ops, alias_map, hub_ops, local_ops, composed_ops, builtin_ops = op_demo_utils.categorize_operations(\n", " operation_definitions\n", ")\n", "\n", "# Demo lazy operation instantiation\n", "op_demo_utils.demo_lazy_op_instantiation(it, hub_ops, local_ops)" ] }, { "cell_type": "markdown", "id": "f61dc24e", "metadata": { "papermill": { "duration": 0.005608, "end_time": "2026-07-28T22:53:28.542979+00:00", "exception": false, "start_time": "2026-07-28T22:53:28.537371+00:00", "status": "completed" }, "tags": [] }, "source": [ "## Step 6: Test executing the loaded operations\n", "\n", "Test executing simple hub and local operations both individually executed and as part of a composite operation to ensure loading and execution works correctly." ] }, { "cell_type": "code", "execution_count": 8, "id": "f0cb901a", "metadata": { "execution": { "iopub.execute_input": "2026-07-28T22:53:28.555625Z", "iopub.status.busy": "2026-07-28T22:53:28.555497Z", "iopub.status.idle": "2026-07-28T22:53:28.571302Z", "shell.execute_reply": "2026-07-28T22:53:28.570303Z" }, "papermill": { "duration": 0.023376, "end_time": "2026-07-28T22:53:28.572010+00:00", "exception": false, "start_time": "2026-07-28T22:53:28.548634+00:00", "status": "completed" }, "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", "🧪 Testing loaded operations with demo data...\n", "\n", "📋 Testing operation pipeline parity of composite vs individual component ops (over 2 batches):\n", "\n", "Composite op execution...\n", "Local op: Converted orig_labels tensor([4, 3, 1, 2]) to preds tensor([5, 4, 2, 3])\n", "Hub op: Calculated pred_sum: 14\n", "\n", "Re-running with individual component ops...\n", "Local op: Converted orig_labels tensor([4, 3, 1, 2]) to preds tensor([5, 4, 2, 3])\n", "Hub op: Calculated pred_sum: 14\n", "\n", "Composite op execution...\n", "Local op: Converted orig_labels tensor([3, 0, 1, 4]) to preds tensor([4, 1, 2, 5])\n", "Hub op: Calculated pred_sum: 12\n", "\n", "Re-running with individual component ops...\n", "Local op: Converted orig_labels tensor([3, 0, 1, 4]) to preds tensor([4, 1, 2, 5])\n", "Hub op: Calculated pred_sum: 12\n", "\n", "🔍 Validating that composite and individual component op outputs are identical...\n", " ✓ Batch 1: Outputs match.\n", " ✓ Batch 2: Outputs match.\n", "\n", "🎉 All batches match: individual and composite operation outputs are identical!\n" ] } ], "source": [ "print(\"\\n🧪 Testing loaded operations with demo data...\")\n", "\n", "# Import required components\n", "from interpretune import trivial_test_op, trivial_local_test_op, composite_trivial_test_op\n", "\n", "NUM_BATCHES = 2 # Number of test batches to generate\n", "VERBOSE_OP_OUTPUTS = False # Set to True to log operation outputs\n", "\n", "# Test the operations\n", "print(f\"\\n📋 Testing operation pipeline parity of composite vs individual component ops (over {NUM_BATCHES} batches):\")\n", "individual_op_output_batches = []\n", "composite_op_output_batches = []\n", "\n", "for batch_name, individual_test_batch, composite_test_batch in op_demo_utils.generate_test_batches(NUM_BATCHES):\n", " print(\"\\nComposite op execution...\")\n", " if VERBOSE_OP_OUTPUTS:\n", " print(f\"\\n--- {batch_name} ---\")\n", " print(f\"Input batch: {individual_test_batch}\")\n", " composite_output_batch = composite_trivial_test_op(analysis_batch=composite_test_batch)\n", " op_demo_utils.maybe_print_output(f\"Composite op output batch: {composite_output_batch}\", VERBOSE_OP_OUTPUTS)\n", " composite_op_output_batches.append(composite_output_batch)\n", "\n", " print(\"\\nRe-running with individual component ops...\")\n", " local_batch_output = trivial_local_test_op(analysis_batch=individual_test_batch)\n", " op_demo_utils.maybe_print_output(f\"Local op batch output: {local_batch_output}\", VERBOSE_OP_OUTPUTS)\n", " individual_output_batch = trivial_test_op(analysis_batch=local_batch_output)\n", " op_demo_utils.maybe_print_output(f\"Hub output batch: {individual_output_batch}\", VERBOSE_OP_OUTPUTS)\n", " individual_op_output_batches.append(individual_output_batch)\n", "\n", "# Compare outputs using utility function\n", "all_match = op_demo_utils.compare_operation_outputs(individual_op_output_batches, composite_op_output_batches)" ] }, { "cell_type": "markdown", "id": "2e04c8a4", "metadata": { "papermill": { "duration": 0.005784, "end_time": "2026-07-28T22:53:28.583741+00:00", "exception": false, "start_time": "2026-07-28T22:53:28.577957+00:00", "status": "completed" }, "tags": [] }, "source": [ "## Step 7: Clean up hub operations and re-import\n", "\n", "Delete the downloaded hub operations folder and re-import interpretune to verify only local operations remain." ] }, { "cell_type": "code", "execution_count": 9, "id": "e2b99c86", "metadata": { "execution": { "iopub.execute_input": "2026-07-28T22:53:28.596600Z", "iopub.status.busy": "2026-07-28T22:53:28.596393Z", "iopub.status.idle": "2026-07-28T22:53:28.745436Z", "shell.execute_reply": "2026-07-28T22:53:28.744561Z" }, "papermill": { "duration": 0.156741, "end_time": "2026-07-28T22:53:28.746209+00:00", "exception": false, "start_time": "2026-07-28T22:53:28.589468+00:00", "status": "completed" }, "tags": [] }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "Overwriting format type 'interpretune' (ITAnalysisFormatter -> ITAnalysisFormatter)\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "Overwriting format type alias 'itanalysis' (interpretune -> interpretune)\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "Overwriting format type alias 'it' (interpretune -> interpretune)\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "Overwriting format type alias 'interpretune' (interpretune -> interpretune)\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Cleaning up downloaded hub operations...\n", "✓ Removed specific hub repository cache: /mnt/cache_extended/speediedan/.cache/huggingface/hub/interpretune_ops/models--speediedan--trivial_op_repo\n", "\n", "Re-importing interpretune after cleanup...\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "/home/speediedan/repos/interpretune/src/interpretune/analysis/ops/compiler/schema_compiler.py:306: Failed to compile operation 'composite_trivial_test_op' with composition ['trivial_local_test_op', 'trivial_test_op']: Operation trivial_test_op not found\n", "\n", "Note the above \"Failed to compile operation 'composite_trivial_test_op'\" error on re-import of interpretune after our cleanup.\n", "This is expected: we have removed our hub op definitions (trivial_test_op), but not our local op definitions (trivial_local_test_op, composite_trivial_test_op).\n", "As a result, the locally defined composite operation 'composite_trivial_test_op' could not be constructed since it depended on the now-missing hub op.\n", "All other available operations (local and built-in) should still be present as we will see.\n", "\n", " ✓ Interpretune re-imported after cleanup\n" ] } ], "source": [ "print(\"Cleaning up downloaded hub operations...\")\n", "\n", "# Remove only the specific repository we downloaded, not the entire hub cache\n", "op_demo_utils.cleanup_hub_repository(download_result)\n", "\n", "# Re-import interpretune again\n", "print(\"\\nRe-importing interpretune after cleanup...\")\n", "\n", "# Capture stdout and stderr during import to check for the expected warning\n", "stdout_output, stderr_output, DISPATCHER = op_demo_utils.reimport_interpretune_with_capture()\n", "\n", "op_demo_utils.inspect_err_for_composite_op_warning(stderr_output)\n", "\n", "print(\"\\n ✓ Interpretune re-imported after cleanup\")" ] }, { "cell_type": "markdown", "id": "47d16772", "metadata": { "papermill": { "duration": 0.006116, "end_time": "2026-07-28T22:53:28.758669+00:00", "exception": false, "start_time": "2026-07-28T22:53:28.752553+00:00", "status": "completed" }, "tags": [] }, "source": [ "## Step 8: Verify only local operations remain\n", "\n", "Verify that only the local and built-in operations are available after hub cleanup." ] }, { "cell_type": "code", "execution_count": 10, "id": "a8f0636f", "metadata": { "execution": { "iopub.execute_input": "2026-07-28T22:53:28.772012Z", "iopub.status.busy": "2026-07-28T22:53:28.771892Z", "iopub.status.idle": "2026-07-28T22:53:28.775323Z", "shell.execute_reply": "2026-07-28T22:53:28.774660Z" }, "papermill": { "duration": 0.011606, "end_time": "2026-07-28T22:53:28.776416+00:00", "exception": false, "start_time": "2026-07-28T22:53:28.764810+00:00", "status": "completed" }, "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Verifying operations after cleanup...\n", "\n", "📊 Operation Summary After Cleanup:\n", " Total registered names: 42\n", " Unique operations: 30\n", " Hub operations: 0\n", " Local operations: 10\n", " Composed operations: 7\n", " Built-in operations: 13\n", "\n", "✅ Success: No hub operations found - cleanup successful!\n", "\n", "🏠 Local operations still available:\n", " - extract_concept_latent_state (accessible as: extract_concept_latent_state, concept_latent_state_from_cache) - Extract per-example latent rows from the configured cache key\n", " - extract_concept_latent_examples (accessible as: extract_concept_latent_examples, concept_latent_examples) - Filter and annotate latent rows for concept-direction aggregation\n", " - concept_direction (accessible as: concept_direction, semantic_direction) - Aggregate latent concept examples into a normalized concept direction vector\n", " - compute_attribution_graph (accessible as: compute_attribution_graph, ct_graph) - Generate an attribution graph with circuit-tracer\n", " - extract_top_features (accessible as: extract_top_features, ct_top_features) - Extract top-N influential features from an attribution graph\n", " - graph_prune (accessible as: graph_prune, ct_graph_prune) - Prune a circuit-tracer attribution graph\n", " - graph_node_influence (accessible as: graph_node_influence, ct_node_influence) - Compute node influence scores for an attribution graph\n", " - feature_intervention_forward (accessible as: feature_intervention_forward, ct_feature_intervention) - Run feature interventions and return pre/post intervention outputs\n", " - model_fwd_intervention (accessible as: model_fwd_intervention, direction_intervention, direct_concept_direction_intervention) - Apply generalized hook-point interventions and return pre/post intervention logits\n", " - trivial_local_test_op (accessible as: trivial_local_test_op) - Local test op that transforms a simple orig_labels tensor to a preds tensor\n", "\n", "📋 Detailed breakdown:\n", "\n", " Built-in operations (13):\n", " - ablation_attribution (accessible as: ablation_attribution)\n", " - get_alive_latents (accessible as: get_alive_latents)\n", " - get_answer_indices (accessible as: get_answer_indices)\n", " - gradient_attribution (accessible as: gradient_attribution)\n", " - labels_to_ids (accessible as: labels_to_ids)\n", " - logit_diffs (accessible as: logit_diffs)\n", " - logit_diffs_cache (accessible as: logit_diffs_cache)\n", " - model_ablation (accessible as: model_ablation)\n", " - model_fwd (accessible as: model_fwd, model_forward)\n", " - model_fwd_w_cache (accessible as: model_fwd_w_cache)\n", " - model_fwd_w_cache_latent_models (accessible as: model_fwd_w_cache_latent_models)\n", " - model_gradient (accessible as: model_gradient)\n", " - sae_correct_acts (accessible as: sae_correct_acts)\n", "\n", " Composed operations (7):\n", " - attribution_from_concept (accessible as: attribution_from_concept)\n", " - intervention_from_concept (accessible as: intervention_from_concept)\n", " - intervention_from_features (accessible as: intervention_from_features)\n", " - logit_diffs_attr_ablation (accessible as: logit_diffs_attr_ablation, logit_diffs_ablation)\n", " - logit_diffs_attr_grad (accessible as: logit_diffs_attr_grad)\n", " - logit_diffs_base (accessible as: logit_diffs_base)\n", " - logit_diffs_sae (accessible as: logit_diffs_sae)\n" ] } ], "source": [ "print(\"Verifying operations after cleanup...\")\n", "\n", "# Get operation definitions after cleanup and verify cleanup status\n", "operation_definitions_after = DISPATCHER.registered_ops\n", "op_demo_utils.verify_cleanup_status(operation_definitions_after)" ] }, { "cell_type": "markdown", "id": "7cb0b647", "metadata": { "papermill": { "duration": 0.006223, "end_time": "2026-07-28T22:53:28.789116+00:00", "exception": false, "start_time": "2026-07-28T22:53:28.782893+00:00", "status": "completed" }, "tags": [] }, "source": [ "## Cleanup temporary files\n", "\n", "Clean up the temporary files created during this example." ] }, { "cell_type": "code", "execution_count": 11, "id": "5a37ad14", "metadata": { "execution": { "iopub.execute_input": "2026-07-28T22:53:28.803261Z", "iopub.status.busy": "2026-07-28T22:53:28.803009Z", "iopub.status.idle": "2026-07-28T22:53:28.809295Z", "shell.execute_reply": "2026-07-28T22:53:28.808442Z" }, "papermill": { "duration": 0.014633, "end_time": "2026-07-28T22:53:28.810047+00:00", "exception": false, "start_time": "2026-07-28T22:53:28.795414+00:00", "status": "completed" }, "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Cleaning up temporary files...\n", "✓ Removed temporary hub op_collection: /tmp/hub_op_collection\n", "✓ Removed temporary local op_collection: /tmp/local_op_collection\n", "✓ Unset IT_ANALYSIS_OP_PATHS environment variable\n", "✓ Removed /tmp/local_op_collection from imported IT_ANALYSIS_OP_PATHS list\n", "\n", "Final IT_ANALYSIS_OP_PATHS list: []\n", "Final IT_ANALYSIS_OP_PATHS env var: ''\n", "\n", "🎉 Hub and Local operations workflow example completed successfully!\n", "\n", "Summary of what was demonstrated:\n", "1. ✓ Setup local op collection path via IT_ANALYSIS_OP_PATHS environment variable\n", "2. ✓ Copied hub op_collection to /tmp/ with overwrite warning\n", "3. ✓ Uploaded operations to HuggingFace Hub as private repo\n", "4. ✓ Downloaded operations to default hub cache\n", "5. ✓ Re-imported interpretune and verified both hub and local operations\n", "6. ✓ Tested operation instantiation and execution with demo data\n", "7. ✓ Cleaned up hub operations and re-imported\n", "8. ✓ Verified only local and built-in operations remain available\n", "9. ✓ Restored original IT_ANALYSIS_OP_PATHS environment variable\n" ] } ], "source": [ "# Clean up using utility function\n", "op_demo_utils.cleanup_op_collections(\n", " tmp_op_collection=tmp_op_collection,\n", " tmp_local_op_collection=tmp_local_op_collection,\n", " original_op_paths_env=original_op_paths_env,\n", ")\n", "\n", "print(\"\\n🎉 Hub and Local operations workflow example completed successfully!\")\n", "print(\"\\nSummary of what was demonstrated:\")\n", "print(\"1. ✓ Setup local op collection path via IT_ANALYSIS_OP_PATHS environment variable\")\n", "print(\"2. ✓ Copied hub op_collection to /tmp/ with overwrite warning\")\n", "print(\"3. ✓ Uploaded operations to HuggingFace Hub as private repo\")\n", "print(\"4. ✓ Downloaded operations to default hub cache\")\n", "print(\"5. ✓ Re-imported interpretune and verified both hub and local operations\")\n", "print(\"6. ✓ Tested operation instantiation and execution with demo data\")\n", "print(\"7. ✓ Cleaned up hub operations and re-imported\")\n", "print(\"8. ✓ Verified only local and built-in operations remain available\")\n", "print(\"9. ✓ Restored original IT_ANALYSIS_OP_PATHS environment variable\")" ] }, { "cell_type": "markdown", "id": "150f93a1", "metadata": { "papermill": { "duration": 0.006427, "end_time": "2026-07-28T22:53:28.823158+00:00", "exception": false, "start_time": "2026-07-28T22:53:28.816731+00:00", "status": "completed" }, "tags": [] }, "source": [ "## Step 9: Final verification after environment cleanup\n", "\n", "Re-import interpretune one final time to verify that local operations are no longer available after unsetting IT_ANALYSIS_OP_PATHS." ] }, { "cell_type": "code", "execution_count": 12, "id": "5b881ac4", "metadata": { "execution": { "iopub.execute_input": "2026-07-28T22:53:28.837247Z", "iopub.status.busy": "2026-07-28T22:53:28.837045Z", "iopub.status.idle": "2026-07-28T22:53:28.976166Z", "shell.execute_reply": "2026-07-28T22:53:28.975362Z" }, "papermill": { "duration": 0.147324, "end_time": "2026-07-28T22:53:28.976844+00:00", "exception": false, "start_time": "2026-07-28T22:53:28.829520+00:00", "status": "completed" }, "tags": [] }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "Overwriting format type 'interpretune' (ITAnalysisFormatter -> ITAnalysisFormatter)\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "Overwriting format type alias 'itanalysis' (interpretune -> interpretune)\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "Overwriting format type alias 'it' (interpretune -> interpretune)\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "Overwriting format type alias 'interpretune' (interpretune -> interpretune)\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Final verification: Re-importing interpretune after environment cleanup...\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "✓ Interpretune re-imported after environment cleanup\n", "\n", "📊 Final Operation Summary (after complete cleanup):\n", " Total registered names: 41\n", " Unique operations: 29\n", " Hub operations: 0\n", " Local operations: 9\n", " Composed operations: 7\n", " Built-in operations: 13\n", "\n", "⚠️ Hub operations cleaned up, but 9 local operations still present:\n", " - extract_concept_latent_state (accessible as: extract_concept_latent_state, concept_latent_state_from_cache)\n", " - extract_concept_latent_examples (accessible as: extract_concept_latent_examples, concept_latent_examples)\n", " - concept_direction (accessible as: concept_direction, semantic_direction)\n", " - compute_attribution_graph (accessible as: compute_attribution_graph, ct_graph)\n", " - extract_top_features (accessible as: extract_top_features, ct_top_features)\n", " - graph_prune (accessible as: graph_prune, ct_graph_prune)\n", " - graph_node_influence (accessible as: graph_node_influence, ct_node_influence)\n", " - feature_intervention_forward (accessible as: feature_intervention_forward, ct_feature_intervention)\n", " - model_fwd_intervention (accessible as: model_fwd_intervention, direction_intervention, direct_concept_direction_intervention)\n", "\n", "Environment verification:\n", " Current IT_ANALYSIS_OP_PATHS env var: 'Not set'\n" ] } ], "source": [ "print(\"Final verification: Re-importing interpretune after environment cleanup...\")\n", "\n", "# Remove interpretune modules from sys.modules to force reimport\n", "op_demo_utils.purge_it_modules_from_sys()\n", "\n", "# Re-import interpretune one final time\n", "import interpretune\n", "from interpretune import DISPATCHER\n", "\n", "print(\"✓ Interpretune re-imported after environment cleanup\")\n", "\n", "# Get operation definitions after complete cleanup and generate final summary\n", "operation_definitions_final = DISPATCHER.registered_ops\n", "canonical_ops_final, alias_map_final, hub_ops_final, local_ops_final, composed_ops_final, builtin_ops = (\n", " op_demo_utils.categorize_operations(operation_definitions_final)\n", ")\n", "\n", "print(\"\\n📊 Final Operation Summary (after complete cleanup):\")\n", "print(f\" Total registered names: {len(operation_definitions_final)}\")\n", "print(f\" Unique operations: {len(canonical_ops_final)}\")\n", "print(f\" Hub operations: {len(hub_ops_final)}\")\n", "print(f\" Local operations: {len(local_ops_final)}\")\n", "print(f\" Composed operations: {len(composed_ops_final)}\")\n", "print(f\" Built-in operations: {len(builtin_ops)}\")\n", "\n", "# Verify complete cleanup\n", "if len(hub_ops_final) == 0 and len(local_ops_final) == 0:\n", " print(\"\\n🎯 Perfect! Complete cleanup successful - only built-in and composed operations remain!\")\n", "elif len(hub_ops_final) == 0:\n", " print(f\"\\n⚠️ Hub operations cleaned up, but {len(local_ops_final)} local operations still present:\")\n", " for op_name, op_def in local_ops_final.items():\n", " aliases = alias_map_final.get(op_name, [])\n", " all_names = [op_name] + aliases\n", " print(f\" - {op_name} (accessible as: {', '.join(all_names)})\")\n", "elif len(local_ops_final) == 0:\n", " print(f\"\\n⚠️ Local operations cleaned up, but {len(hub_ops_final)} hub operations still present:\")\n", " for op_name, op_def in hub_ops_final.items():\n", " aliases = alias_map_final.get(op_name, [])\n", " all_names = [op_name] + aliases\n", " print(f\" - {op_name} (accessible as: {', '.join(all_names)})\")\n", "else:\n", " print(f\"\\n❌ Cleanup incomplete: {len(hub_ops_final)} hub ops and {len(local_ops_final)} local ops still present\")\n", "\n", "print(\"\\nEnvironment verification:\")\n", "print(f\" Current IT_ANALYSIS_OP_PATHS env var: '{os.environ.get('IT_ANALYSIS_OP_PATHS', 'Not set')}'\")" ] }, { "cell_type": "markdown", "id": "b18134a1", "metadata": { "papermill": { "duration": 0.006801, "end_time": "2026-07-28T22:53:28.990676+00:00", "exception": false, "start_time": "2026-07-28T22:53:28.983875+00:00", "status": "completed" }, "tags": [] }, "source": [ "## Appendix: All Registered Analysis Ops\n", "\n", "The dispatcher also includes built-in native analysis ops (e.g., circuit-tracer attribution and intervention ops). Here is the full set of registered operations:" ] }, { "cell_type": "code", "execution_count": 13, "id": "8477eeee", "metadata": { "execution": { "iopub.execute_input": "2026-07-28T22:53:29.008650Z", "iopub.status.busy": "2026-07-28T22:53:29.008528Z", "iopub.status.idle": "2026-07-28T22:53:29.011843Z", "shell.execute_reply": "2026-07-28T22:53:29.011139Z" }, "papermill": { "duration": 0.015242, "end_time": "2026-07-28T22:53:29.012624+00:00", "exception": false, "start_time": "2026-07-28T22:53:28.997382+00:00", "status": "completed" }, "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Total registered ops: 41\n", " ablation_attribution: Compute attribution values from ablation\n", " attribution_from_concept: Compiled composition: concept_direction.compute_attribution_graph.graph_node_influence.extract_top_features\n", " compute_attribution_graph: Generate an attribution graph with circuit-tracer\n", " concept_direction: Aggregate latent concept examples into a normalized concept direction vector\n", " concept_latent_examples: Filter and annotate latent rows for concept-direction aggregation\n", " concept_latent_state_from_cache: Extract per-example latent rows from the configured cache key\n", " ct_feature_intervention: Run feature interventions and return pre/post intervention outputs\n", " ct_graph: Generate an attribution graph with circuit-tracer\n", " ct_graph_prune: Prune a circuit-tracer attribution graph\n", " ct_node_influence: Compute node influence scores for an attribution graph\n", " ct_top_features: Extract top-N influential features from an attribution graph\n", " direct_concept_direction_intervention: Apply generalized hook-point interventions and return pre/post intervention logits\n", " direction_intervention: Apply generalized hook-point interventions and return pre/post intervention logits\n", " extract_concept_latent_examples: Filter and annotate latent rows for concept-direction aggregation\n", " extract_concept_latent_state: Extract per-example latent rows from the configured cache key\n", " extract_top_features: Extract top-N influential features from an attribution graph\n", " feature_intervention_forward: Run feature interventions and return pre/post intervention outputs\n", " get_alive_latents: Extract alive latents from cache\n", " get_answer_indices: Extract answer indices from batch\n", " gradient_attribution: Compute attribution values from gradients\n", " graph_node_influence: Compute node influence scores for an attribution graph\n", " graph_prune: Prune a circuit-tracer attribution graph\n", " intervention_from_concept: Compiled composition: concept_direction.compute_attribution_graph.graph_node_influence.extract_top_features.feature_intervention_forward\n", " intervention_from_features: Compiled composition: feature_intervention_forward\n", " labels_to_ids: Convert label strings to tensor IDs\n", " logit_diffs: Clean forward pass for computing logit differences\n", " logit_diffs_ablation: Compiled composition: labels_to_ids.model_fwd_w_cache_latent_models.logit_diffs_cache.model_ablation.ablation_attribution\n", " logit_diffs_attr_ablation: Compiled composition: labels_to_ids.model_fwd_w_cache_latent_models.logit_diffs_cache.model_ablation.ablation_attribution\n", " logit_diffs_attr_grad: Compiled composition: labels_to_ids.model_gradient.gradient_attribution\n", " logit_diffs_base: Compiled composition: labels_to_ids.model_fwd.logit_diffs\n", " logit_diffs_cache: Clean forward pass for computing logit differences including cache activations (composition only)\n", " logit_diffs_sae: Compiled composition: labels_to_ids.model_fwd_w_cache_latent_models.logit_diffs_cache.sae_correct_acts\n", " model_ablation: Model ablation analysis\n", " model_forward: Basic model forward pass\n", " model_fwd: Basic model forward pass\n", " model_fwd_intervention: Apply generalized hook-point interventions and return pre/post intervention logits\n", " model_fwd_w_cache: Model forward pass with activation caching (no latent model hooks)\n", " model_fwd_w_cache_latent_models: Model forward pass with activation caching and latent model (SAE) hooks\n", " model_gradient: Model gradient-based attribution\n", " sae_correct_acts: Compute correct activations from SAE cache\n", " semantic_direction: Aggregate latent concept examples into a normalized concept direction vector\n" ] } ], "source": [ "from interpretune.analysis.ops.dispatcher import DISPATCHER\n", "\n", "print(f\"Total registered ops: {len(DISPATCHER.registered_ops)}\")\n", "for name, op in sorted(DISPATCHER.registered_ops.items()):\n", " desc = getattr(op, \"description\", \"\")\n", " print(f\" {name}: {desc}\")" ] } ], "metadata": { "kernelspec": { "display_name": "it_latest (3.12.8)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.13.11" }, "papermill": { "default_parameters": {}, "duration": 18.275542, "end_time": "2026-07-28T22:53:31.951362+00:00", "environment_variables": {}, "exception": null, "input_path": "/home/speediedan/repos/interpretune/src/it_examples/notebooks/publish/example_op_collections/op_collection_example.ipynb", "output_path": "/home/speediedan/repos/interpretune/docs/notebook_artifacts/example_op_collections/op_collection_example.ipynb", "parameters": {}, "start_time": "2026-07-28T22:53:13.675820+00:00", "version": "2.7.0" }, "widgets": { "application/vnd.jupyter.widget-state+json": { "state": { "1a12a0b44ad04024b4a1851bc244e373": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", "model_name": "ProgressStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "2.0.0", "_model_name": "ProgressStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "2.0.0", "_view_name": "StyleView", "bar_color": null, "description_width": "" } }, "1d9d267189e0421ca035ea6b49ba7b43": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", "model_name": "HTMLStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "2.0.0", "_model_name": "HTMLStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "2.0.0", "_view_name": "StyleView", "background": null, "description_width": "", "font_size": null, "text_color": null } }, "22b22d1d76284842a626e362ad36debf": { "model_module": "@jupyter-widgets/base", "model_module_version": "2.0.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "2.0.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "2.0.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border_bottom": null, "border_left": null, "border_right": null, "border_top": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "28f2a8d05c674567a7757ac61fa5d5a2": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", "model_name": "ProgressStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "2.0.0", "_model_name": "ProgressStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "2.0.0", "_view_name": "StyleView", "bar_color": null, "description_width": "" } }, "42e9aa2f440d4d0f84c2509b470c3580": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", "model_name": "HTMLModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "2.0.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "2.0.0", "_view_name": "HTMLView", "description": "", "description_allow_html": false, "layout": "IPY_MODEL_44f3c60e860b4a91aeeac22f1e356e1b", "placeholder": "​", "style": "IPY_MODEL_fa53e205dbc64738b094de9acda3f6f7", "tabbable": null, "tooltip": null, "value": " 4.29k/? [00:00<00:00, 7.49kB/s]" } }, "43be884fd5004ff9ba66d1d17fdf8988": { "model_module": "@jupyter-widgets/base", "model_module_version": "2.0.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "2.0.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "2.0.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border_bottom": null, "border_left": null, "border_right": null, "border_top": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "padding": null, "right": null, "top": null, "visibility": null, "width": "20px" } }, "44f3c60e860b4a91aeeac22f1e356e1b": { "model_module": "@jupyter-widgets/base", "model_module_version": "2.0.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "2.0.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "2.0.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border_bottom": null, "border_left": null, "border_right": null, "border_top": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "4ae6b6f99fa8488ba8eae67b4cd40571": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", "model_name": "HTMLModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "2.0.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "2.0.0", "_view_name": "HTMLView", "description": "", "description_allow_html": false, "layout": "IPY_MODEL_dde6fb5eed39407b851ff59cfa349488", "placeholder": "​", "style": "IPY_MODEL_1d9d267189e0421ca035ea6b49ba7b43", "tabbable": null, "tooltip": null, "value": "Fetching 5 files: 100%" } }, "643a1f1eb97243bd9473fae5d16a6e58": { "model_module": "@jupyter-widgets/base", "model_module_version": "2.0.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "2.0.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "2.0.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border_bottom": null, "border_left": null, "border_right": null, "border_top": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "65be2d8f97a54dc5b279c9b0c278a08e": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", "model_name": "HTMLStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "2.0.0", "_model_name": "HTMLStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "2.0.0", "_view_name": "StyleView", "background": null, "description_width": "", "font_size": null, "text_color": null } }, "67261cc654f843d7949052b312be7a90": { "model_module": "@jupyter-widgets/base", "model_module_version": "2.0.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "2.0.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "2.0.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border_bottom": null, "border_left": null, "border_right": null, "border_top": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "81807136dd474b76992567fcc6cb9f0f": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", "model_name": "FloatProgressModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "2.0.0", "_model_name": "FloatProgressModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "2.0.0", "_view_name": "ProgressView", "bar_style": "success", "description": "", "description_allow_html": false, "layout": "IPY_MODEL_43be884fd5004ff9ba66d1d17fdf8988", "max": 1.0, "min": 0.0, "orientation": "horizontal", "style": "IPY_MODEL_1a12a0b44ad04024b4a1851bc244e373", "tabbable": null, "tooltip": null, "value": 1.0 } }, "88fa3df06db54fcb8fdce1182412a2c9": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", "model_name": "HBoxModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "2.0.0", "_model_name": "HBoxModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "2.0.0", "_view_name": "HBoxView", "box_style": "", "children": [ "IPY_MODEL_aa53b07127684b378514ecdb16fc33f1", "IPY_MODEL_81807136dd474b76992567fcc6cb9f0f", "IPY_MODEL_42e9aa2f440d4d0f84c2509b470c3580" ], "layout": "IPY_MODEL_22b22d1d76284842a626e362ad36debf", "tabbable": null, "tooltip": null } }, "97099095570047c499f864c5d447a855": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", "model_name": "HBoxModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "2.0.0", "_model_name": "HBoxModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "2.0.0", "_view_name": "HBoxView", "box_style": "", "children": [ "IPY_MODEL_4ae6b6f99fa8488ba8eae67b4cd40571", "IPY_MODEL_cc185e84985844bdb4d77227c5cb00e2", "IPY_MODEL_f1d0789d1b1744ab913b158fdf4547a3" ], "layout": "IPY_MODEL_67261cc654f843d7949052b312be7a90", "tabbable": null, "tooltip": null } }, "aa53b07127684b378514ecdb16fc33f1": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", "model_name": "HTMLModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "2.0.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "2.0.0", "_view_name": "HTMLView", "description": "", "description_allow_html": false, "layout": "IPY_MODEL_bcf1f8f50b2c48a69b3ccbd360cf734e", "placeholder": "​", "style": "IPY_MODEL_65be2d8f97a54dc5b279c9b0c278a08e", "tabbable": null, "tooltip": null, "value": "Download complete: " } }, "bcf1f8f50b2c48a69b3ccbd360cf734e": { "model_module": "@jupyter-widgets/base", "model_module_version": "2.0.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "2.0.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "2.0.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border_bottom": null, "border_left": null, "border_right": null, "border_top": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "c673ecb4ecfb4078bc5097d861706fb7": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", "model_name": "HTMLStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "2.0.0", "_model_name": "HTMLStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "2.0.0", "_view_name": "StyleView", "background": null, "description_width": "", "font_size": null, "text_color": null } }, "c8d779fcd99749da9fc3e5e8b453224a": { "model_module": "@jupyter-widgets/base", "model_module_version": "2.0.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "2.0.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "2.0.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border_bottom": null, "border_left": null, "border_right": null, "border_top": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "cc185e84985844bdb4d77227c5cb00e2": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", "model_name": "FloatProgressModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "2.0.0", "_model_name": "FloatProgressModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "2.0.0", "_view_name": "ProgressView", "bar_style": "success", "description": "", "description_allow_html": false, "layout": "IPY_MODEL_643a1f1eb97243bd9473fae5d16a6e58", "max": 5.0, "min": 0.0, "orientation": "horizontal", "style": "IPY_MODEL_28f2a8d05c674567a7757ac61fa5d5a2", "tabbable": null, "tooltip": null, "value": 5.0 } }, "dde6fb5eed39407b851ff59cfa349488": { "model_module": "@jupyter-widgets/base", "model_module_version": "2.0.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "2.0.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "2.0.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border_bottom": null, "border_left": null, "border_right": null, "border_top": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "f1d0789d1b1744ab913b158fdf4547a3": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", "model_name": "HTMLModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "2.0.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "2.0.0", "_view_name": "HTMLView", "description": "", "description_allow_html": false, "layout": "IPY_MODEL_c8d779fcd99749da9fc3e5e8b453224a", "placeholder": "​", "style": "IPY_MODEL_c673ecb4ecfb4078bc5097d861706fb7", "tabbable": null, "tooltip": null, "value": " 5/5 [00:00<00:00,  5.32it/s]" } }, "fa53e205dbc64738b094de9acda3f6f7": { "model_module": "@jupyter-widgets/controls", "model_module_version": "2.0.0", "model_name": "HTMLStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "2.0.0", "_model_name": "HTMLStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "2.0.0", "_view_name": "StyleView", "background": null, "description_width": "", "font_size": null, "text_color": null } } }, "version_major": 2, "version_minor": 0 } } }, "nbformat": 4, "nbformat_minor": 5 }