npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

slm-env-3dball

v2.0.0

Published

SLM Env

Downloads

9

Readme

SLM-Env

Unity environment binaries for SLM-Lab, built from kengz/ml-agents.

If you're just using prebuilt environments for the Lab, just install the released binaries via yarn: e.g. yarn add slm-env-3dball.

This repository hosts the built Unity environment binaries released to npm.

Installation

You need this repo SLM-Env and the builder repo kengz/ml-agents (use the fork as opposed to Unity/ml-agents).

git clone https://github.com/kengz/SLM-Env.git
git clone https://github.com/kengz/ml-agents.git

Then follow the setup instruction and intro from ml-agents for Unity.

Naming Convention

Since the binaries are committed to Github, released on npm, and used by SLM-Lab, follow the convention compatible to all of them.

  • Unity raw assets can follow Unity convention: CamelCase, e.g. 3DBall
  • built binaries env_name: kebab-case, e.g. 3dball
  • git branch name the same as env_name: kebab-case, e.g. 3dball
  • npm package name prepended with slm-env-, e.g. slm-env-3dball

Build Unity Environment

  1. Build your Unity environment and commit asset source code to ml-agents repo. For the most part follow the original doc. Remember the core settings:

    • Player > Resolution and Presentation > Run in Background (checked)
    • Player > Resolution and Presentation > Display Resolution Dialog (Disabled)
    • Academy > Brain > External
  2. When ready to build binary, decide on an env_name, e.g. 3dball. You may want to check on npm that the name slm-env-3dball is not already taken, so you can release.

  3. Come to this SLM-Env repo, create a new git branch from master:

cd SLM-Env
git checkout master
git checkout -b 3dball
  1. Build these versions of binaries and save to SLM-Env/build/:
  • MacOSX version
    • make Academy > Training Configuration as follow (or leave as-is if smaller than Inference Configuration):
      • Width: 128
      • Height: 72
      • Quality Level: 0
      • Time Scale: 100
    • build directory: SLM-Env/build/
    • save name: 3dball
  • Linux version
    • make Training Configuration same as MacOSX
    • Headless Mode (checked)
    • save name: 3dball

Next, ready to release.

Release

  1. Open up package.json and update:
  • replace envname as proper: "name": "slm-env-3dball",
  • if this is an update, bump version. Default is "version": "1.0.0",
  1. commit and push the new build/ folder and package.json:
git add build/
git add package.json
git commit -m 'add 3dball'
git push --set-upstream origin 3dball
  1. Release to npm (make sure you are logged in first, by npm login):
npm publish

Since the binaries are huge, npm will throw an error near the end of it. Just ignore that.

npm ERR! registry error parsing json
npm ERR! publish Failed PUT 403
npm ERR! code E403
npm ERR! You cannot publish over the previously published version 1.0.0. : slm-env-3dball

It should be available on npmjs.com, just search for your package slm-env-3dball.

  1. Add the release to SLM-Lab for usage: yarn add slm-env-3dball