Giter Club home page Giter Club logo

typedb-console's Introduction

TypeDB Console

Factory GitHub release Discord Discussion Forum Stack Overflow Stack Overflow

Running TypeDB Console in the terminal

Go to the directory whe you have your typedb-all or typedb-console distribution unarchived, and run ./typedb console

cd <your_typedb_console_dir>/
./typedb console

Command line arguments

You can provide several command arguments when running console in the terminal.

  • --core=<address> : TypeDB server address to which the console will connect to.
  • --cloud=<address> : TypeDB Cloud server address to which the console will connect to.
  • --username=<username> : TypeDB Cloud username to connect with.
  • --password : Interactively enter password to connect to TypeDB Cloud with.
  • --script=<script> : Run commands in the script file in non-interactive mode.
  • --tls-enabled: Enable TLS for connecting to TypeDB Cloud.
  • --tls-root-ca: Path to root CA certificate for TLS encryption.
  • --command=<command1> --command=<command2> ... : Run commands in non-interactive mode.
  • -V, --version : Print version information and exit.
  • -h, --help : Show help message.

Console commands

TypeDB Console provides two levels of interaction: database-level commands and transaction-level commands. The database-level command is the first level of interaction, i.e. first-level REPL. From one of the database-level commands, you can open a transaction to the database. This will open a transaction-level interface, i.e. second-level REPL.

Console also offers command completion, accessible with a tab keypress.

Database-level commands

  • database create <db> : Create a database with name <db> on the server. For example:
    > database create my-typedb-database
    Database 'my-typedb-database' created
    
  • database list : List the databases on the server. For example:
    > database list
    my-typedb-database
    
  • database delete <db> : Delete a database with name <db> on the server. For example:
    > database delete my-typedb-database
    Database 'my-typedb-database' deleted
    
  • database schema <db> : Print the schema of a database with name <db> on the server. For example:
    > database schema my-typedb-database
    define
    person sub entity;
    
  • transaction <db> schema|data read|write : Start a transaction to database <db> with session type schema or data, and transaction type write or read. For example:
    > transaction my-typedb-database schema write
    my-typedb-database::schema::write>
    
    This will then take you to the transaction-level interface, i.e. the second-level REPL.
  • help : Print help menu
  • clear : Clear console screen
  • exit : Exit console

Transaction-level commands

  • <query> : Once you're in the transaction REPL, the terminal immediately accepts a multi-line TypeQL query, and will execute it when you hit enter twice. For example:
    my-typedb-database::schema::write> define
                                       name sub attribute, value string;
                                       person sub entity, owns name;
    
    Concepts have been defined
    
  • source <file> : Run TypeQL queries in a file, which you can refer to using relative or absolute path. For example:
    my-typedb-database::schema::write> source ./schema.gql
    Concepts have been defined
    
  • commit : Commit the transaction changes and close transaction. For example:
    my-typedb-database::schema::write> commit
    Transaction changes committed
    
  • rollback : Will remove any uncommitted changes you've made in the transaction, while leaving transaction open. For example:
    my-typedb-database::schema::write> rollback
    Rolled back to the beginning of the transaction
    
  • close : Close the transaction without committing changes, and takes you back to the database-level interface, i.e. first-level REPL. For example:
    my-typedb-database::schema::write> close
    Transaction closed without committing changes
    
  • help : Print this help menu
  • clear : Clear console screen
  • exit : Exit console

Non-interactive mode

To invoke console in a non-interactive manner, we can define a script file that contains the list of commands to run, then invoke console with ./typedb console --script=<script>. We can also specify the commands to run directly from the command line using ./typedb console --command=<command1> --command=<command2> ....

For example given the following command script file:

database create test
transaction test schema write
    define person sub entity;
    commit
transaction test data write
    insert $x isa person;
    commit
transaction test data read
    match $x isa person;
    close
database delete test

You will see the following output:

> ./typedb console --script=script                                                                                                                                                                                                                    73.830s
+ database create test
Database 'test' created
+ transaction test schema write
++ define person sub entity;
Concepts have been defined
++ commit
Transaction changes committed
+ transaction test data write
++ insert $x isa person;
{ $x iid 0x966e80017fffffffffffffff isa person; }
answers: 1, duration: 87 ms
++ commit
Transaction changes committed
+ transaction test data read
++ match $x isa person;
{ $x iid 0x966e80018000000000000000 isa person; }
answers: 1, duration: 25 ms
++ close
Transaction closed without committing changes
+ database delete test
Database 'test' deleted

The indentation in the script file are only for visual guide and will be ignored by the console. Each line in the script is interpreted as one command, so multiline query is not available in this mode.

typedb-console's People

Contributors

alexjpwalker avatar dmitrii-ubskii avatar flyingsilverfin avatar grabl avatar haikalpribadi avatar jamesreprise avatar kasper-piskorski avatar krishnangovindraj avatar lolski avatar lriuui0x0 avatar vaticle-bot avatar vmax avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

typedb-console's Issues

Bring back the ability to open a text editor to input query

Back in the old console we used to be able to open a text editor, by typing in editor, and the console would open our default text editor configured on the OS, and we can input our query there. When we close (not sure if we needed saving?) the window, then the query immediately gets executed. We should bring this back in the new console.

Errors when Grakn server is not running are unhelpful

Description

When a Grakn server was never running, or was shut down while the user was active in the console, the errors given are internal exceptions rather than giving informative help to the user.

Reproducible Steps

Two cases are given here:

Case 1

Without starting a Grakn server, open a console and try to list the databases:

> database list
io exception

You see a very succinct io exception with no helpful prompt!

If you try to open a transaction the exception is more informative, but clearly we can tell the user in this case that there is no server running:

> transaction test data read
Exception in thread "main" io.grpc.StatusRuntimeException: UNAVAILABLE: io exception
	at io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:262)
	at io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:243)
	at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:156)
	at grakn.protocol.GraknGrpc$GraknBlockingStub.sessionOpen(GraknGrpc.java:571)
	at grakn.client.rpc.RPCSession.<init>(RPCSession.java:56)
	at grakn.client.GraknClient.session(GraknClient.java:56)
	at grakn.client.GraknClient.session(GraknClient.java:51)
	at grakn.console.GraknConsole.runTransactionRepl(GraknConsole.java:130)
	at grakn.console.GraknConsole.runRepl(GraknConsole.java:118)
	at grakn.console.GraknConsole.run(GraknConsole.java:70)
	at grakn.console.GraknConsole.main(GraknConsole.java:231)
Caused by: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: localhost/0:0:0:0:0:0:0:1:1729
Caused by: java.net.ConnectException: Connection refused
	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
	at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:330)
	at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:334)
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:702)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:650)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:576)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.lang.Thread.run(Thread.java:748)

Case 2

Start a Grakn server, create a db called test and open a transaction to it. When the transaction is open, shut down the server to see the exception below.

> database list
diagnosis
> database create test
Database 'test' created
> transaction test data read
test::data::read> Exception in thread "Timer-0" io.grpc.StatusRuntimeException: UNAVAILABLE: io exception
	at io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:262)
	at io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:243)
	at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:156)
	at grakn.protocol.GraknGrpc$GraknBlockingStub.sessionPulse(GraknGrpc.java:588)
	at grakn.client.rpc.RPCSession$PulseTask.run(RPCSession.java:112)
	at java.util.TimerThread.mainLoop(Timer.java:555)
	at java.util.TimerThread.run(Timer.java:505)
Caused by: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: localhost/0:0:0:0:0:0:0:1:1729
Caused by: java.net.ConnectException: Connection refused
	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
	at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:330)
	at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:334)
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:702)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:650)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:576)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.lang.Thread.run(Thread.java:748)

The above exception is the same exception as in Case 1, however this time the server also reports an exception, presumably because there was an open transaction when it was shut down:

Grakn Core version: 2.0.0-alpha
Grakn Core Server has been started (in 2428 ms)
^C
Shutting down Grakn Core Server...
[SRV09] Invalid Server Operation: Grakn Core server has been shutdown.
grakn.core.common.exception.GraknException: [SRV09] Invalid Server Operation: Grakn Core server has been shutdown.
	at grakn.core.common.exception.GraknException.of(GraknException.java:51)
	at grakn.core.server.rpc.GraknRPCService.lambda$close$1(GraknRPCService.java:175)
	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
	at java.util.concurrent.ConcurrentHashMap$ValueSpliterator.forEachRemaining(ConcurrentHashMap.java:3566)
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
	at java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:291)
	at java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:731)
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
	at java.util.concurrent.ForkJoinTask.doInvoke(ForkJoinTask.java:401)
	at java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:734)
	at java.util.stream.ForEachOps$ForEachOp.evaluateParallel(ForEachOps.java:160)
	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateParallel(ForEachOps.java:174)
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:233)
	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
	at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:583)
	at grakn.core.server.rpc.GraknRPCService.close(GraknRPCService.java:175)
	at grakn.core.server.GraknServer.close(GraknServer.java:270)
	at java.lang.Thread.run(Thread.java:748)
Grakn Core Server has been shutdown

Could refactor to single deployable artifact.

Currently we deploy console-distribution as a separate artifact to various release versions for different platforms. Ideally we can cut this down to a single release distribution package but currently this requires working around the difficult assemble_targz macro and there are difficulties with bazel and archive directory structure.

A counter-argument is that since console-distribution is not platform specific, it can be thought of as the "base artifact" from which all platform specific artifacts are built.

List rules from within console

Because rules are no longer concepts, we cannot query for them using Graql. However, it is very useful to be able to list all rules, which allows us to then undefine rules by name.

The transaction API that exposes this information is LogicManager.all() - we should allow this to be called from console in a transaction.

Workaround:

  • run the schema exporter: ./grakn server schema [database-name] which will also dump the existing rules

Console 1.0.4 prints verbose log lines when started

Version: Console 1.0.4

Steps to reproduce:

$ ./grakn console
18:39:16,422 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
18:39:16,422 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
18:39:16,422 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [jar:file:/Users/lolski/grakn.ai/graknlabs/grabl-2.0/local/grakn-core-all-mac/console/services/lib/console-binary-jar.jar!/logback.xml]
18:39:16,423 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs multiple times on the classpath.
18:39:16,423 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs at [file:/Users/lolski/grakn.ai/graknlabs/grabl-2.0/local/grakn-core-all-mac/console/conf/logback.xml]
18:39:16,423 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs at [jar:file:/Users/lolski/grakn.ai/graknlabs/grabl-2.0/local/grakn-core-all-mac/console/services/lib/console-binary-jar.jar!/logback.xml]
18:39:16,433 |-INFO in ch.qos.logback.core.joran.spi.ConfigurationWatchList@721e0f4f - URL [jar:file:/Users/lolski/grakn.ai/graknlabs/grabl-2.0/local/grakn-core-all-mac/console/services/lib/console-binary-jar.jar!/logback.xml] is not of type file
18:39:16,472 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
18:39:16,473 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
18:39:16,475 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT]
18:39:16,479 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
18:39:16,518 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to INFO
18:39:16,518 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [STDOUT] to Logger[ROOT]
18:39:16,519 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
18:39:16,519 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@28864e92 - Registering current configuration as safe fallback point
grakn>

Move over to maven() rules completely from bazel-deps

We are unable to move over completely to maven() because rules_jvm_external() doesn't yet support the processorClasses configuration. The processor configuration is needed by the com.google.auto.value:auto-value artifact.

in grakn console, `transaction my_database schema rea` opens up a write transaction

Description

in grakn console, I accidentally hit enter after typing the incomplete command transaction test schema rea
this then opened up a write transaction:

test::schema::write>

Environment

  1. OS (where Grakn server runs): Mac OS 10
  2. Grakn version (and platform): Grakn Core 2.0.0-alpha-6
  3. Grakn client: N/A

Reproducible Steps

Steps to create the smallest reproducible scenario:

  1. grakn server
  2. grakn console
  3. database create my_database
  4. transaction my_database schema rea

Expected Output

Unrecognised command, please check help menu

Actual Output

test::schema::write>

Log on console doesn't work

Commit version: 752b85f

Changed console/conf/logback.xml to:

<!--
  ~ Copyright (C) 2020 Grakn Labs
  ~
  ~ This program is free software: you can redistribute it and/or modify
  ~ it under the terms of the GNU Affero General Public License as
  ~ published by the Free Software Foundation, either version 3 of the
  ~ License, or (at your option) any later version.
  ~
  ~ This program is distributed in the hope that it will be useful,
  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  ~ GNU Affero General Public License for more details.
  ~
  ~ You should have received a copy of the GNU Affero General Public License
  ~ along with this program.  If not, see <https://www.gnu.org/licenses/>.
  -->
<configuration>
    <root level="TRACE" />
</configuration>

And no logs are seen.

Release 2.1.2 console will not connect to local server

when you try to start the console using the ttypedb batch file in windows 10 running a local server you get the following message

> C:\?????????????\typedb 212>typedb console
'--username' must be supplied with '--cluster'
Usage: typedb console [-hV] [--tls-enabled] [--password[=<password>]]
                      [--cluster=<cluster>] [--script=<script>]
                      [--server=<server>] [--tls-root-ca=<tlsRootCA>]
                      [--username=<username>] [--command=<commands>]...
      --cluster=<cluster>    TypeDB Cluster address to which Console will
                               connect to
      --command=<commands>   Commands to run in the Console, without
                               interactive mode
  -h, --help                 Show this help message and exit.
      --password[=<password>]
                             Password
      --script=<script>      Script with commands to run in the Console,
                               without interactive mode
      --server=<server>      TypeDB address to which Console will connect to
      --tls-enabled          Whether to connect to TypeDB Cluster with TLS
                               encryption
      --tls-root-ca=<tlsRootCA>
                             Path to the TLS root CA file
      --username=<username>  Username
  -V, --version              Print version information and exit.

after testing I found out that the console is not picking up the port address from the typedb.properties file the console dose open if you include --server=<port#> when typing the batch command

so much for that fix it did give me this message when I included --server=<port#>:

Welcome to TypeDB Console. You are now in TypeDB Wonderland!
Copyright (C) 2021 Vaticle

But when I tried to list the databases I got this

> database list
[CLI04] Client Error: Unable to connect to TypeDB server.

Bug: console input not buffering on Windows

Please replace every line in curly brackets { like this } with an appropriate answer, and remove this line.

Description

Freshly installed on Windows, after starting the server and the console, the input is not enabled and the commands do not run. Pressing Ctrl+C one time shows a new line with the typed keys above

Environment

  1. OS (where TypeDB server runs): Windows 10
  2. TypeDB version (and platform): TypeDB 2.1.3
  3. TypeDB client: console
  4. Other environment details:
  • Java version: 14 (OpenJDK)

Expected Output

Input and commands are correctly buffered and executed

Actual Output

No input is running.

Additional information

Setting the debug ON in the console configuration shows this
|-WARN in Logger[io.netty.util.internal.logging.InternalLoggerFactory] - No appenders present in context [default] for logger [io.netty.util.internal.logging.InternalLoggerFactory].

Load multiple files

This issue was originally posted by @haikalpribadi on 2017-06-27 18:14.

Editing multiple files is easier in terms of workflow so we (Miko & other ontology designers) currently do this:

graql.sh -k $2 -f $GRAQL/ldbc-snb-1-resources.gql -r $1
graql.sh -k $2 -f $GRAQL/ldbc-snb-2-relations.gql -r $1
graql.sh -k $2 -f $GRAQL/ldbc-snb-3-entities.gql -r $1
graql.sh -k $2 -f $GRAQL/ldbc-snb-4-rules.gql -r $1
Loading like this breaks in a load balanced environment though so it would be nice to have:

graql.sh -k $2 -r $1 -f $GRAQL/ldbc-snb-1-resources.gql -f $GRAQL/ldbc-snb-2-relations.gql etc

match get: order the variables of console output

This issue was originally posted by @jmsfltchr on 2018-04-20 19:50.

When performing a match in the Grakn Console, and multiple combinations are returned, the variables should be returned in the same order for each combination. For example, we see that $x, $y and $z are returned in a different order for each result, which is bad for readability:

 match $x id "V2687112"; $y id "V1490968"; ($z, $x); ($y, $z); get; 

$y id V1490968 isa stop; $z id V1552408 isa stop; $x id V2687112 isa stop; 
$y id V1490968 isa stop; $x id V2687112 isa stop; $z id V2781240 isa stop; 
$z id V1335360 isa stop; $y id V1490968 isa stop; $x id V2687112 isa stop; 
$y id V1490968 isa stop; $x id V2687112 isa stop; $z id V1630352 isa stop;
$z id V1421456 isa stop; $y id V1490968 isa stop; $x id V2687112 isa stop; 
$y id V1490968 isa stop; $z id V2695304 isa stop; $x id V2687112 isa stop; 
$y id V1490968 isa stop; $x id V2687112 isa stop; $z id V2785336 isa stop; 
$y id V1490968 isa stop; $z id V1470608 isa stop; $x id V2687112 isa stop; 
$z id V2752568 isa stop; $y id V1490968 isa stop; $x id V2687112 isa stop; 

Query ignores limit when pasted multiline query contains comments

Description

When pasting a multi-line query into the console, where the query contains comment and a limit, the limit is ignored.

Reproducible Steps

Add and commit a basic schema:

define 
person sub entity, 
  plays friendship:friend;
friendship sub relation, 
  relates friend;

Insert 5 instances of friendship:

insert $p1 isa person; $p2 isa person; (friend: $p1, friend: $p2) isa friendship;

Run this 5 times and commit.

Try making the following query. Typing it out into the console vs copy-pasting it into the console. In the latter case the limit is ignored!

match $f($p1, $p2) isa friendship;
$p1 isa person; # my comment
$p2 isa person;
limit 2;

To prove I'm not crazy (first is pasted, second is typed):

test::data::read> match $f($p1, $p2) isa friendship;
> $p1 isa person; # my comment
> $p2 isa person;
> limit 2;

{ p1 iid 0x966e80018000000000000000 isa person; p2 iid 0x966e80018000000000000001 isa person; f iid 0xaa8280018000000000000003 (friend: iid 0x966e80018000000000000001, friend: iid 0x966e80018000000000000000) isa friendship; }
{ p1 iid 0x966e80018000000000000002 isa person; p2 iid 0x966e80018000000000000003 isa person; f iid 0xaa8280018000000000000004 (friend: iid 0x966e80018000000000000003, friend: iid 0x966e80018000000000000002) isa friendship; }
{ p1 iid 0x966e80018000000000000009 isa person; p2 iid 0x966e80018000000000000004 isa person; f iid 0xaa8280018000000000000001 (friend: iid 0x966e80018000000000000004, friend: iid 0x966e80018000000000000009) isa friendship; }
{ p1 iid 0x966e80018000000000000006 isa person; p2 iid 0x966e80018000000000000007 isa person; f iid 0xaa8280018000000000000002 (friend: iid 0x966e80018000000000000007, friend: iid 0x966e80018000000000000006) isa friendship; }
{ p1 iid 0x966e80018000000000000008 isa person; p2 iid 0x966e80018000000000000005 isa person; f iid 0xaa8280018000000000000000 (friend: iid 0x966e80018000000000000005, friend: iid 0x966e80018000000000000008) isa friendship; }
{ p1 iid 0x966e80018000000000000003 isa person; p2 iid 0x966e80018000000000000002 isa person; f iid 0xaa8280018000000000000004 (friend: iid 0x966e80018000000000000003, friend: iid 0x966e80018000000000000002) isa friendship; }
{ p1 iid 0x966e80018000000000000004 isa person; p2 iid 0x966e80018000000000000009 isa person; f iid 0xaa8280018000000000000001 (friend: iid 0x966e80018000000000000004, friend: iid 0x966e80018000000000000009) isa friendship; }
{ p1 iid 0x966e80018000000000000001 isa person; p2 iid 0x966e80018000000000000000 isa person; f iid 0xaa8280018000000000000003 (friend: iid 0x966e80018000000000000001, friend: iid 0x966e80018000000000000000) isa friendship; }
{ p1 iid 0x966e80018000000000000005 isa person; p2 iid 0x966e80018000000000000008 isa person; f iid 0xaa8280018000000000000000 (friend: iid 0x966e80018000000000000005, friend: iid 0x966e80018000000000000008) isa friendship; }
{ p1 iid 0x966e80018000000000000007 isa person; p2 iid 0x966e80018000000000000006 isa person; f iid 0xaa8280018000000000000002 (friend: iid 0x966e80018000000000000007, friend: iid 0x966e80018000000000000006) isa friendship; }
test::data::read> match $f($p1, $p2) isa friendship;
                  $p1 isa person; # my comment
                  $p2 isa person;
                  limit 2;

{ p1 iid 0x966e80018000000000000006 isa person; p2 iid 0x966e80018000000000000007 isa person; f iid 0xaa8280018000000000000002 (friend: iid 0x966e80018000000000000007, friend: iid 0x966e80018000000000000006) isa friendship; }
{ p1 iid 0x966e80018000000000000009 isa person; p2 iid 0x966e80018000000000000004 isa person; f iid 0xaa8280018000000000000001 (friend: iid 0x966e80018000000000000004, friend: iid 0x966e80018000000000000009) isa friendship; }
test::data::read>

schema write crashing console when last definition in file dose not end with a semicolon

running GRAKN 2.0.2 on windows 10

Not only dose it crash the transaction and the GRAKN Console and kick you all the way back to the windows console it dose not give a meaningful error message so I was three days trying to debug the problem. I would expect that most users would not even consider that the crash could be caused by a syntax error since that syntax errors any ware except the last definition throw proper error messages.

The error message read as follows

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Index 64 out of bounds for length 64
at java.base/java.util.Arrays$ArrayList.get(Arrays.java:4164)
at graql.lang.parser.ErrorListener.syntaxError(ErrorListener.java:65)
at org.antlr.v4.runtime.ProxyErrorListener.syntaxError(ProxyErrorListener.java:41)
at org.antlr.v4.runtime.Parser.notifyErrorListeners(Parser.java:544)
at org.antlr.v4.runtime.DefaultErrorStrategy.reportInputMismatch(DefaultErrorStrategy.java:327)
at org.antlr.v4.runtime.DefaultErrorStrategy.reportError(DefaultErrorStrategy.java:139)
at graql.grammar.GraqlParser.eof_queries(GraqlParser.java:272)
at graql.lang.parser.Parser.parse(Parser.java:137)
at graql.lang.parser.Parser.parseQueriesEOF(Parser.java:152)
at graql.lang.Graql.parseQueries(Graql.java:67)
at grakn.console.GraknConsole.runQuery(GraknConsole.java:394)
at grakn.console.GraknConsole.runSource(GraknConsole.java:384)
at grakn.console.GraknConsole.runTransactionRepl(GraknConsole.java:293)
at grakn.console.GraknConsole.runRepl(GraknConsole.java:254)
at grakn.console.GraknConsole.runInteractive(GraknConsole.java:209)
at grakn.console.GraknConsole.main(GraknConsole.java:465)

Source command failed to work when file name has a space

  1. Run TypeDB
  2. Run TypeDB Console
  3. Create a database
  4. Open transaction
  5. Run the source command with a file that has a space in the file path, for example: source /Users/tasabat/Desktop/Financial-Knowledge-Graph-2.0\ .tql
    Error shown:
[TXN1] Invalid Transaction command: 'source' does not have an optional argument '.tql'.

If we remove the space in the file path, then the loading works.

Copy-pasting multi-line query yields unexpected but welcome behaviour

Description

When writing a multi-line query in the console I see:

mydb:data:read> match $p isa person;
                $c isa company;
                $e($p, $c) isa employment;

But copy-pasting a multi-line query I get:

mydb:data:read> match $p isa person;
> $c isa company;
> $e($p, $c) isa employment;

This actually seems to work fine, and is better than writing the multiline manually! (Besides at one point seeing this, probably unrelated issue.)

There are two benefits to this different multiline mode:

  1. The user can move between the multiple lines and edit the query.
  2. The query history remembers the whole multi-line query as one, rather than remembering it line-by-line as it does currently.

//test:grakn-console-it should use real Grakn Core

Right now, //test:grakn-console-it uses @graknlabs_grakn_core//test-integration/rule:grakn-test-server. This contributes to the cyclic dependency between grakn-core and console, and also does not demonstrate the "separation of concern" between the two code base. Console should test with a real and released version of Grakn Core.

Automatically open and commit transactions

Currently, a transaction is opened after every commit/rollback statement and all statements entered are executed as part of one transaction. While the use case is legitimate (see ex.1), SQL shells generally execute every statement as its own transaction. Current behaviour can lead to users' confusion where they don't see changes committed from another session.

Ex.1:

Say, you need to replace attribute marked as key and the only way to do that is to remove the existing attribute (1) and attach a new one (2). Committing automatically after (1) would throw an error

Console colours printed as special characters on Windows

Description

When receiving answers to a query the answers are returned with a jumble of special characters mixed in. I have observed this for Windows users only. The strong hypothesis is that desired text colours of the elements of the answer are printed incorrectly, which manifests as special characters. Smells strongly of a string format issue.

Match query without limit should be automatically limited to a default value

When a user writes a query without limit in console, we should automatically add a limit to it. With reasoner enabled now, I think we should automatically set a limit to a query, otherwise letting the reasoner exhaustively determine there are no more answers can drag the response time.

We can make the default number to configurable in the console, and the user obviously can override the limit with their own.

Refactor command to print database schema as database <name> schema

You can't do ./grakn server schema anymore on master. The database schema is now retrievable on Database.schema() (i.e. graknClient.databases().get("name").schema() (implemented in client-java). We need to implement the feature in console to do database <name> schema.

While we're at it, also change the syntax of database delete <name> to database <name> delete.

Improve console architecture using multiple levels of PicoCLI

Make sure the style and terminology is consistent with TypeDB
TypeDB is the reference implementation which we should adhere to.

Make the logic that parses the command terser and stricter, and with minimal boilerplate
Please take a look at this Demonstrational PR on how much effort it takes to add relatively simple functionality. The parser is not strict and error prone, and it requires a lot of boilerplate. There are some nuances in how we should best approach the refactor, which we should discuss verbally.

Console: integration and optimisation

This issue was originally posted by @haikalpribadi on 2018-04-09 17:11.

Why:
Grakn functions are exposed through different executables - some through grakn, some through graql, and some others through the KGMS console.
How:
Merge all console interfaces into one grakn-[core|kgms]-console.jar

This issue needs vaticle/typedb#3087, needs #7, needs graknlabs/grakn#3581, needs vaticle/typedb#3743, needs vaticle/typedb#3798, needs vaticle/typedb#3807, needs graknlabs/grakn#3868, needs graknlabs/grakn#3871

Loading relations is slow due to serial Concept API calls

Problem to Solve

When you have a database with a moderate amount of data (say, 3000 relations) , the query match $x sub relation; takes 11 seconds to execute on localhost, and significantly longer in a database hosted on a remote server.

This is because each relation concept loaded triggers a serial Concept API call to getPlayersByRoleType. With 20ms network latency, this query would take over a minute - to load just 3000 relations.

NOTE: This issue also affects schema queries, which do serial Concept API calls to getSupertype for each Type loaded.

Proposed Solution

This issue could be solved by introducing an Async Concept API, or by not loading the connected concepts, or by an alternative solution such as adding options to load connected vertices with the query (discussed in the Async Concept API feature proposal)

`keyspaces` is not recognised as an invalid command

keyspace is now a valid console command. However, keyspaces also startswith keyspace, so we don't get an error in the console if the plural is used. We should resolve this to error out and print a help menu instead.

match $r sub role fails

Description

It is intuitively possible to retrieve all roles using match $r sub role;, if a role is considered a fully-fledged type, but this fails in the console.

Environment

  1. OS (where Grakn server runs): Mac OS 10
  2. Grakn version (and platform): Grakn 2.0 alpha
  3. Grakn client: console

Reproducible Steps

Run match $r sub role;

> transaction diagnosis data read
diagnosis::data::read> match $x sub role;

[TYR03] Invalid Type Read: The type 'role' does not exist. Please check server logs for the stack trace.

In comparison, this query can fetch all roles. The output shows that each role is sub role, so it's confusing that these aren't returned by the query above:

> transaction diagnosis data read
diagnosis::data::read> match $x sub relation, relates $role;

{ role type role; x type relation sub thing; }
{ role type risked-disease sub role; x type risk-factor sub relation; }
{ role type person-at-risk sub role; x type risk-factor sub relation; }
{ role type candidate-patient sub role; x type candidate-diagnosis sub relation; }
{ role type candidate-diagnosed-disease sub role; x type candidate-diagnosis sub relation; }
{ role type diagnoser sub role; x type diagnosis sub relation; }
{ role type patient sub role; x type diagnosis sub relation; }
{ role type doctor sub role; x type diagnosis sub relation; }
{ role type diagnosed-disease sub role; x type diagnosis sub relation; }
{ role type consumed-substance sub role; x type consumption sub relation; }
{ role type consumer sub role; x type consumption sub relation; }
{ role type effect sub role; x type causality sub relation; }
{ role type cause sub role; x type causality sub relation; }
{ role type symptomatic-patient sub role; x type symptom-presentation sub relation; }
{ role type presented-symptom sub role; x type symptom-presentation sub relation; }
{ role type child sub role; x type parentship sub relation; }
{ role type parent sub role; x type parentship sub relation; }

Console Help Menu

When inside a console session, there is no help menu available. Available commands may include things like keyspace list/keyspace delete, clean, exit, and [valid graql query]. These should all be listed in the help menu, and ideally every documented command would be tested against the keywords in the help menu!

Build optimised bulk file load

Issue to Solve

To improve the getting-started UX, we want to enable users to have an easy way to load a large amount of data quickly (to show the speeds that are attainable), without themselves having to write a producer/multi-consumer parallelised loader. Instead, we can build this paradigm into console.

The goal is to have a way to consume a file consisting purely of insert or match-insert, which we can restrict to having one query per line. This file can be large (100s of mb or some gb's probably), so it must use multiple transactions to load the data. Compare this to the source command that we currently have within the transaction inner REPL, which is by definition of being in the transaction REPL, a single transaction.

The feature will probably live at a session or top level repl and could look like this:

> bulk-load <database> <TypeQL inserts file path> [--parallel]

Without the --parallel flag, we should sequentially load the queries in batches, because the queries may have inter-dependencies between each other. In the help menu we should print that using the --parallel flag requires that each query be independent of each other (eg. not use prior insert's results). This allows us to go the BioGrakn-Semmed migrator style of data loading with a file-reader thread piped into a blocking queue and read by multiple writer threads, which parallelise transaction batches into the server.

This loader command should also be silent, or show a progress bar, unlike the source command which prints the output of every query, making it slow not only on the extra network time and round trips for collecting the printed data, but also because printing itself is slow.

"Failed to load history" warning when entering in console

  1. Start Grakn 2.0
  2. Enter the console using ./grakn server
  3. Then the following warning appears:
Welcome to Grakn Console. You are now in Grakn Wonderland!
Copyright (C) 2020 Grakn Labs

Jan 09, 2021 9:04:30 PM org.jline.utils.Log logr
WARNING: Failed to load history
java.lang.IllegalArgumentException: Bad history file syntax! The history file `/Users/tasabat/.grakn-console-history` may be an older history: please remove it or use a different history file.
	at org.jline.reader.impl.history.DefaultHistory.addHistoryLine(DefaultHistory.java:179)
	at org.jline.reader.impl.history.DefaultHistory.addHistoryLine(DefaultHistory.java:169)
	at org.jline.reader.impl.history.DefaultHistory.lambda$load$0(DefaultHistory.java:86)
	at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133)
	at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
	at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:658)
	at org.jline.reader.impl.history.DefaultHistory.load(DefaultHistory.java:86)
	at org.jline.reader.impl.history.DefaultHistory.attach(DefaultHistory.java:69)
	at org.jline.reader.impl.LineReaderImpl.readLine(LineReaderImpl.java:594)
	at org.jline.reader.impl.LineReaderImpl.readLine(LineReaderImpl.java:459)
	at grakn.console.Utils.getTokens(Utils.java:49)
	at grakn.console.ReplCommand.getCommand(ReplCommand.java:120)
	at grakn.console.GraknConsole.runRepl(GraknConsole.java:84)
	at grakn.console.GraknConsole.run(GraknConsole.java:70)
	at grakn.console.GraknConsole.main(GraknConsole.java:231)

Syntax Error reported for social-network tutorial.

I was attempting to follow your tutorial with the social network schema using grakn-server/console version 2.0.0-alpha-4. The following command reports a syntax error, which I found rather perplexing after looking at the docs and the reported line 71.

social-network::schema::write> source /Users/conley/scratch/grakn-core/schema/social-network-schema.gql

[GQL03] Graql Error: There is a syntax error at line 71:
plays spoken,
^
no viable alternative at input 'spoken'
[GQL03] Graql Error: There is a syntax error at line 71:
plays spoken,
^
mismatched input 'spoken' expecting {'match', 'define', 'undefine', 'insert', 'compute'}

Is this simply an incompatibility between the latest version and older versions when the tutorial was developed?
Thanks in advance,
Chris Conley

"INTERNAL" appears at the start of the error message when Grakn throws an error

Problem to Solve

"INTERNAL" appears at the start of the error message when Grakn throws an error

Proposed Solution

INTERNAL is a gRPC status code.

We could hack it out by parsing the exception string, but the "right" solution here is most likely to extract the error message from the StatusRuntimeException and wrap that in a GraknClientException, without the status code.

All errors transmitted over gRPC are of type StatusRuntimeException.

This would be done in all Grakn clients - currently Java, Python and NodeJS.

Cannot cancel process in console with ctrl-C

After running a read query in the console, Grakn streams data back, but when I want to cancel that stream using "ctrl-c" nothing happens and the console seems to get stuck.

  1. Use this distro: https://www.dropbox.com/s/1y3ophwlv6xyg2z/grakn-2.0-alpha-tomas-20210109.zip?dl=0
  2. Run match ($g, $p); ($p, $1);get $g;
  3. Grakn starts to return data (while my CPU goes through the roof)
  4. After a while it stops returning data (CPU still going through the roof)
  5. At that point I can't use ctrl + c any more
  6. I end up killing the GraknConsole process using kill -9, however, my CPU does not stop so I end up killing the Grakn process as well

image

Console: automatically set query limit when not specified

At the moment, it's possible for someone to write a query that produces a very long result, e.g. printing the database by doing match $x isa thing; get;. This may not be favourable in most cases, so let's automatically set the query limit (e.g. limit 30;) which the user can configure, and obviously also override.

Graql shell crashes if a user doesn't have a home directory

This issue was originally posted by @kasper-piskorski on 2018-01-26 12:11.

NB: not sure if we should fix that, just logging it here so that we know

 java.io.IOException: No such file or directory at java.io.UnixFileSystem.createFileExclusively(Native Method) at java.io.File.createNewFile(File.java:1012) at ai.grakn.graql.GraqlShell.setupHistory(GraqlShell.java:474) at ai.grakn.graql.GraqlShell.executeRepl(GraqlShell.java:394) at ai.grakn.graql.GraqlShell.start(GraqlShell.java:370) at ai.grakn.graql.GraqlShell.runShell(GraqlShell.java:266) at ai.grakn.graql.GraqlShell.runShell(GraqlShell.java:170) at ai.grakn.graql.GraqlShell.main(GraqlShell.java:165) at ai.grakn.dist.DistGraql.run(DistGraql.java:52) at ai.grakn.dist.DistGraql.main(DistGraql.java:44) 

I believe the cause is this:

 private static final String HISTORY_FILENAME = StandardSystemProperty.USER_HOME.value() + "/.graql-history"; 

If a user doesn't have a home directory it throws an exception on file creation.

Console design

Grakn Core

NOTE: The console change has been drastically modified. Please check the other comments below.

Below is the list of commands we want to support within console.

exit

Exit the console.

help

Print the list of commands to support

database list

List the databases on the server. We can also consider using a different flavoured syntax list database which is more readable, but less hierarchical when there're multiple types of entities you need to manage.

database create <db>

Create a database.

database delete <db>

Delete a database. The <db> argument is optional. When not specified, the command will try to delete the currently connected database.

database use <db>

Switch the database the user is currently connecting to. In the prompt we will show what's the database that's currently connected to. It's possible for the user not connecting to any database (as opposed to creating a default database grakn on the fly in the current behaviour).

<query>

Run a query and commit it immediately. This is different from the current behaviour, which will not commit any changes unless explicit commit. This is more friendly and more consistent with other DBMS.

The session type will be inferred from the query type. The transaction type will always be write.

We need to take extra care that the command keywords don't clash with query keywords (match, insert, delete ...), however, this is more user friendly.

source <file1> <file2> ...

Run a list of files and commit them. Each file can contain multiple queries.

The session type will be infererd from the first query that's parsed.

Some other command keywords we thought about are run, execute.

transaction

Start a new transaction. This alters the following query and source commands that they will not commit automatically but batched in the current transaction.

We will show an indicator at prompt suggesting the user that it's now within a transaction.

rollback

Rollback the current transaction.

commit

Commit the current transaction.

close

Close the current transaction without commit it. This is useful when the user opens a transaction, but then decides not to use the transaction, so he needs a way to escape from the current transation state.

If we don't provide this command, the user can do rollback then commit which commits an empty transaction.

Other possible command keywords are transaction / transaction close, since just having close is slightly to general. Or transaction begin / transaction end. Or just begin / end.

option <key> <value>

Change the future options to use for transactions. For example, we can have option infer true/false, or option batch_size 1000

Command line interface

Given that most of the commands can be done within the console, we don't need to have many mandatory command line arguments. The only thing we need to provide is the server address, and we can even have a default value for that.

One question is what functionality of console commands should we expose to the command line interface. One idea was to expose every command so that providing them in the command line arguments will be equivalent to running the commands in the interactive mode in sequence, e.g.:

./console --database-use grakn --transaction --source <file1> --query 'insert $x isa person;' --commit

This has the advantage of giving the command line interface the same power as interactive commands, also the semantics of the argument combination is clear to communicate.

Note that this usage is compatible with typical interactive usage of console. Say the user wants to get into the console and connect to database grakn at the same time, we can just say:

./console --database-use grakn

Another question is when we run console command, should we get into interactive mode or not? What we can do is, when certain options are present in the arguments, we don't get into interactive mode, otherwise we get into interactive mode.

Command line functionalities

The following functionalities will be implemented:

  • Syntax highlighting
  • Easy line navigation and editing
  • Multiline query support
  • History

Cluster permission model

We decided to have three level permission model: user -> role -> permission. Each user can have any number of roles, and each role can have any number of permissions.

Currently the permission levels are coarse. We will have the following permissions:

  • admin: user, role, database management
  • read <db>/all: reading access to <db> or all databases
  • write <db>/all: writing access to <db> or all databases.

Initially we will have one user root, with password root, assigned to one role root, with all the above permissions.

These permission data (and other future cluster management data), will be saved in a database system which will be modelled by normal grakn schema. We leverage raft to replicate these data.

Below is the list of commands we want to support:

role create <role> <permission1> <permission2> ...

Create a role with following permissions. The permission list can be empty.

role grant <permission1> <permission2> ...

Add following permissions to the role.

role revoke <permission1> <permission2> ...

Remove following permissions to the role.

user create <user> <role1> <role2> ...

This command will prompt to create a password for the user. Grant the roles to the user, the role list can be empty.

user grant <role1> <role2> ...

Add following roles to the user.

user revoke <role1> <role2> ...

Remove following roles to the user.

user delete <user>

Delete the user.

user use <user>

Switch the current logged in user, will be prompted for password.

user password

Prompt to change the current user's password.

Command line interface

Given that we pretty much cannot do anything without knowing the user, we disallow people interact with console without user specified. Therefore we will add the following mandatory command line arguments:

./console --user root --password <password>

Cluster membership change

Currently how cluster should handle membership change is still not very clear, as that depends on a deeper look into how raft handles membership changes, as well as more detailed thought on the UX side.

Below are some preliminary thoughts on what are the semantics of membership change commands we can consider supporting.

  • start: Start the current server as single node cluster, or the configuration saved in the log.
  • stop: Stop the current server without affecting the log and data.
  • join: Clean all of current data (prompt for confirmation) and join an existing cluster.
  • leave: Leave the current cluster and form a single node cluster.
  • list: List the current information in the cluster.

There're following points that needs to be considered while designing this:

  • Do we support a file of static configuration or not? Having a static configuration file will face the problem of:
    • Dynamic changes after cluster starts run out of sync with the static file.
    • There needs to be an extra bootstrapping process that validates the static cluster configuration across nodes.
  • We should be able to use cluster in the same way as using core.
  • How easy is it to operate with cluster management commands?

Queries have a character limit on windows

Description

Using either the default command prompt, and using power shell, I have seen that when users try to write long queries they hit a character limit. At some point the prompt stops accepting new characters.

Workaround

The same limit does not apply when pasting a query into the console from elsewhere, so the workaround is to write long queries in any IDE and paste them into the console instead.

Unable to create system terminal, creating dumb terminal

Hi,

We are currently experiencing an issue with the console on a machine with Windows 10.

As you can see, java 11 has been installed as stated in the requirements:
3

We are indeed able to start the server:
1

But when we run the command ./grakn console we receive the following output:
2

Why do we have this error? How can we solve this?

In addition, when we try to run a query on Grakn Workbase, we get the error:
workbase
With the server stack trace:
wokbase-server

Could this be related to the console issue?

Thanks.
Best regards,
Nicola

Incorrect error message when the grakn server is not started

Description

When the Grakn server is not started and the user tries to run the command databse list in console, instead of showing a clear and understandable exception, the console prints an
io exception
message.

The same may be the case for the rest of the commands, but not tested.

Expected Output

The message should indicate that the server is not started.

GRPC Warning when opening transaction in console

  1. Clone and run Grakn on commit: vaticle/typedb@8b5f884
  2. Go to this repository: https://github.com/graknlabs/biograkn-covid
  3. On this branch: biograkn_benchmarking_2
  4. Run migrate.py on a running Grakn
  5. Stop the migrator when it started hang
  6. When to console with ./grakn console
  7. Went into a transaction: transaction biograkn_covid_19 data read
  8. And then you get this warning below:
Tomass-MacBook-Pro:grakn-alpha-210121 tasabat$ ./grakn console

Welcome to Grakn Console. You are now in Grakn Wonderland!
Copyright (C) 2021 Grakn Labs

> transaction biograkn_covid_19 read data
Unrecognised command, please check help menu
> transaction biograkn_covid_19 data read
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.protobuf.UnsafeUtil (file:/Users/tasabat/Documents/Grakn/GraknDists/grakn-alpha-210121/console/services/lib/com-google-protobuf-protobuf-java-3-5-1.jar) to field java.nio.Buffer.address
WARNING: Please consider reporting this to the maintainers of com.google.protobuf.UnsafeUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.