Vectice Docs
API Reference (Latest)Vectice WebsiteStart Free Trial
25.1
25.1
  • 🏠Introduction
    • Vectice overview
      • Autolog
      • Next-Gen Autolog [BETA]
      • AskAI
      • Vectice for financial services
  • 🏁Quickstart
    • Getting started
    • Quickstart project
    • Tutorial project
    • FAQ
  • ▶️Demo Center
    • Feature videos
  • 📊Manage AI/ML projects
    • Organize workspaces
      • Create a workspace
      • Workspace Dashboard
    • Organize projects
      • Create a project
      • Project templates best practices
    • Invite colleagues
    • Define phase requirements
    • Collaborate with your team
  • 🚀Log and Manage Assets with Vectice API
    • API cheatsheets
      • Vectice Python API cheatsheet
      • Vectice R API cheatsheet
    • Connect to API
    • Log assets to Vectice
      • Autolog your assets
      • Log datasets
      • Log models
      • Log attachments and notes
      • Log code
      • Log a custom data source
      • Log assets using Vectice IDs
      • Log dataset structure and statistics
      • Log custom metadata in a table format
      • Log MLFLow runs
    • Retrieve assets from app
    • Manage your assets
    • Manage your iteration
    • Preserve your code and asset lineage
  • 🤝Create Model documentation and reports
    • Create model documentation with Vectice Reports
    • Streamline documentation with Macros
    • Auto-document Models and Datasets with AskAI Prompts
    • Document phase outcomes
  • 🗂️Admin Guides
    • Organization management
    • Workspace management
    • Teams management
    • User management
      • User roles and permissions
      • Update a user role in your organization
      • Activate and deactivate users
      • Reset a user's password
    • Manage report templates
  • 🔗Integrations
    • Integrations Overview
    • Integrate Vectice with your data platform
  • 💻IT & Security
    • IT & Security Overview
    • Secure Evaluation Environment Overview
    • Deployment
      • SaaS offering (Multi-Tenant SaaS)
      • Kubernetes self-hosted offering
        • General Architecture & Infrastructure
        • Kubernetes on GCP
          • Appendices
        • Kubernetes on AWS
          • Appendices
        • Kubernetes on Azure
          • Appendices
        • GCP Marketplace deployment
        • On premise
        • Configuration
      • Bring Your Own LLM Guide
    • Data privacy
    • User management
    • SSO management
      • Generic SAML integration
      • Okta SSO integration
    • Security
      • Data storage security
      • Network Security
        • HTTPS communication
        • Reverse proxy
        • CORS/CSRF
        • VPC segregation
      • Sessions
      • Secrets and certificates
      • Audit logs
      • SOC2
      • Security updates
      • Best practices
      • Business continuity
    • Monitoring
      • Installation guide
      • Customizing the deployments
    • Maintenance & upgrades
    • Integrating Vectice Securely
  • ⭐Glossary
    • Concepts
      • Workspaces
      • Projects
        • Setup a project
      • Phases
      • Iterations
        • Iterative development
      • Datasets
        • Dataset resources
        • Dataset properties
        • Dataset lineage and versions
      • Models
      • Reports
  • 🎯Release notes
    • Release notes
  • ↗️References
    • Vectice Python API Reference
    • Vectice R API Cheatsheet
    • Notebooks and code samples
    • Vectice website
Powered by GitBook
On this page
  • Prerequisites
  • Git configuration
  • Code capture overview
  • Disable code capture
  • Code capture best practices
  1. Log and Manage Assets with Vectice API
  2. Log assets to Vectice

Log code

PreviousLog attachments and notesNextLog a custom data source

Vectice logs your git commit information, including the repository name, branch name, commit hash, and the commit URL when there is a .git folder or repository available. Only locally changed files not logged in Vectice are logged with each new git commit.

Vectice is not a substitute for a code versioning system and is best used in coordination with a git-based system.

Prerequisites

To log code in Vectice, you will need the following prerequisites:

  • Ensure you have with the correct version

  • Configure your API to

  • Locally configure your Git username and user email

  • Check out a git branch

  • Add a valid remote (origin)

  • Make at least one commit

Git configuration

Vectice supports all git integrations, including GitHub, GitLab, and Bitbucket.

You can obtain the prerequisites by first configuring your environment with your Git user name and email via the Git CLI.

git config --global user.name "My Name"
git config --global user.email "my@email.com"

Then, either clone your existing remote repository or create a new one, followed by adding a valid remote origin.

git clone https://github.com/user/repo # Clone repo 
git init . # New repo
git remote add origin https://github.com/user/repo # Adding a valid remote origin

Lastly, make your first commit to begin code capture.

git add "README.md" # or some other file
git commit -m "Initial commit"

Commits may not include the latest code changes in the Vectice app. Ensure to commit all new code changes.

Code capture overview

Automatic code capture is enabled by default, and it happens when:

  • You push a new commit with code changes that are not already logged

More than one capture can happen within a single iteration.

With automatic code capture enabled, you will see the following log output indicating successful code capture:

Code captured the following changed files; <filename>.txt, <anotherfilename>.txt

In the Vectice app, you can view the git branch and the commit hash. You can click the git hash or View to see your code changes in your repository.

Disable code capture

To disable the automatic capture of your local code, you can set code_capture to False, as shown below. Ensure to set this method at the global level.

import vectice
vectice.code_capture = False

Code capture best practices

  • Don't forget to commit your code before running your iteration so that you log a clean commit into Vectice.

  • Work in a separate branch for each experiment to make it easy to reproduce the work and track changes.

  • Ensure to commit your final code changes before completing an iteration to ensure all the latest commits are logged in the Vectice app.

You within an iteration

You (origin, cleaned, or modeling datasets) within an iteration

🚀
log a model
log a dataset
connect to the Vectice API
installed vectice