Configuration#
ML Research Tools can be configured through multiple methods with a cascading priority system.
Configuration Priority#
Configuration values are determined with the following priority (highest to lowest):
Command-line arguments
Configuration file
Default values
Configuration File#
By default, the configuration is stored in ~/.config/ml_research_tools/config.yaml
.
If this file doesn’t exist, it will be created with default values when the tool is first run.
Example Configuration#
logging:
level: INFO
redis:
host: localhost
port: 6379
db: 0
enabled: true
ttl: 604800 # 7 days in seconds
llm:
default: "openai" # Default preset to use
presets:
openai:
base_url: https://api.openai.com/v1
model: gpt-3.5-turbo
max_tokens: 8000
temperature: 0.01
top_p: 1.0
retry_attempts: 3
retry_delay: 5
api_key: null
tier: standard
ollama:
model: gemma3
base_url: http://127.0.0.1:3333/v1/
perplexity:
base_url: https://api.perplexity.ai/
model: sonar-pro
max_tokens: 128000
temperature: 0.01
api_key: null
tier: premium
Command-line Arguments#
Configuration can be overridden using command-line arguments. Global options apply to all tools:
ml_research_tools --log-level DEBUG --redis-host redis.example.com --llm-preset premium
Configuration Reference#
Usage: ml_research_tools [-h] [--config CONFIG]
[--log-level {DEBUG,INFO,WARNING,ERROR,CRITICAL}]
[--log-file LOG_FILE] [-v] [--redis-host REDIS_HOST]
[--redis-port REDIS_PORT] [--redis-db REDIS_DB]
[--redis-password REDIS_PASSWORD] [--redis-disable]
[--redis-recache] [--llm-preset LLM_PRESET]
[--llm-tier LLM_TIER] [--llm-api-key LLM_API_KEY]
[--llm-base-url LLM_BASE_URL] [--llm-model LLM_MODEL]
[--llm-max-tokens LLM_MAX_TOKENS]
[--llm-temperature LLM_TEMPERATURE]
[--llm-top-p LLM_TOP_P]
[--llm-retry-attempts LLM_RETRY_ATTEMPTS]
[--llm-retry-delay LLM_RETRY_DELAY] [--list-presets]
[--list-tools]
[--rich-capture-output RICH_CAPTURE_OUTPUT]
{help,ask-document,wandb-downloader,kube-pod-forward,latex-grammar}
...
ML Research Tools - A collection of utilities for ML research
Options:
-h, --help show this help message and exit
--list-presets List available LLM presets and exit
--list-tools List available tools and exit
--rich-capture-output RICH_CAPTURE_OUTPUT
Capture output in a rich format to this file
Configuration:
--config CONFIG Path to configuration file (default:
~/.config/ml_research_tools/config.yaml)
Logging:
--log-level {DEBUG,INFO,WARNING,ERROR,CRITICAL}
Logging level
--log-file LOG_FILE Path to log file
-v, --verbose Enable verbose logging
Redis:
--redis-host REDIS_HOST
Redis host
--redis-port REDIS_PORT
Redis port
--redis-db REDIS_DB Redis database number
--redis-password REDIS_PASSWORD
Redis password
--redis-disable Disable Redis caching
--redis-recache Disable Redis caching retrieval, but allow saving
Llm:
--llm-preset LLM_PRESET
LLM preset name to use (e.g., 'standard', 'premium')
--llm-tier LLM_TIER LLM tier to use (e.g., 'standard', 'premium')
--llm-api-key LLM_API_KEY
API key for LLM service
--llm-base-url LLM_BASE_URL
Base URL for the LLM API endpoint
--llm-model LLM_MODEL
LLM model to use
--llm-max-tokens LLM_MAX_TOKENS
Maximum tokens for LLM response
--llm-temperature LLM_TEMPERATURE
Temperature for LLM sampling
--llm-top-p LLM_TOP_P
Top-p value for LLM sampling
--llm-retry-attempts LLM_RETRY_ATTEMPTS
Number of retry attempts for LLM API calls
--llm-retry-delay LLM_RETRY_DELAY
Delay between retry attempts for LLM API calls
(seconds)
Tools:
{help,ask-document,wandb-downloader,kube-pod-forward,latex-grammar}
Available tools
help Display help information about available tools
ask-document Interactive chat with document content using LLMs
wandb-downloader Download artifacts and runs from Weights & Biases
kube-pod-forward Forward port to a Kubernetes pod with a specific name
pattern.
latex-grammar Check and improve LaTeX grammar and style with LLM
Tool-Specific Configuration#
Some tools have additional configuration options that can be specified in the configuration file or as command-line arguments. See the documentation for each tool for details.